1use crate::ffi;
4use glib::translate::*;
5
6pub use crate::functions::{
7 tag_from_id3_tag as from_id3_tag, tag_from_id3_user_tag as from_id3_user_tag,
8 tag_from_vorbis_tag as from_vorbis_tag, tag_id3_genre_count as id3_genre_count,
9 tag_id3_genre_get as id3_genre, tag_parse_extended_comment as parse_extended_comment,
10 tag_to_id3_tag as to_id3_tag, tag_to_vorbis_tag as to_vorbis_tag,
11 tag_xmp_list_schemas as xmp_list_schemas,
12};
13
14#[doc(alias = "gst_tag_freeform_string_to_utf8")]
15pub fn freeform_string_to_utf8(data: &[u8], env_vars: &[&str]) -> Option<glib::GString> {
16 assert_initialized_main_thread!();
17 unsafe {
18 from_glib_none(ffi::gst_tag_freeform_string_to_utf8(
19 data.as_ptr() as *const std::ffi::c_char,
20 data.len() as i32,
21 env_vars.to_glib_none().0,
22 ))
23 }
24}
25
26#[doc(alias = "gst_tag_get_id3v2_tag_size")]
27pub fn id3v2_tag_size(buffer: &gst::Buffer) -> u32 {
28 assert_initialized_main_thread!();
29 unsafe { ffi::gst_tag_get_id3v2_tag_size(buffer.to_glib_none().0) }
30}