gstreamer_pbutils/auto/
functions.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{ffi, EncodingTarget};
7use glib::translate::*;
8
9/// Returns the channels of the given AAC stream.
10/// ## `audio_config`
11/// a pointer to the AudioSpecificConfig
12///  as specified in the Elementary Stream Descriptor (esds)
13///  in ISO/IEC 14496-1.
14///
15/// # Returns
16///
17/// The channels or 0 if the channel could not be determined.
18#[doc(alias = "gst_codec_utils_aac_get_channels")]
19pub fn codec_utils_aac_get_channels(audio_config: &[u8]) -> u32 {
20    assert_initialized_main_thread!();
21    let len = audio_config.len() as _;
22    unsafe { ffi::gst_codec_utils_aac_get_channels(audio_config.to_glib_none().0, len) }
23}
24
25/// Translates the sample rate to the index corresponding to it in AAC spec.
26/// ## `rate`
27/// Sample rate
28///
29/// # Returns
30///
31/// The AAC index for this sample rate, -1 if the rate is not a
32/// valid AAC sample rate.
33#[doc(alias = "gst_codec_utils_aac_get_index_from_sample_rate")]
34pub fn codec_utils_aac_get_index_from_sample_rate(rate: u32) -> i32 {
35    assert_initialized_main_thread!();
36    unsafe { ffi::gst_codec_utils_aac_get_index_from_sample_rate(rate) }
37}
38
39/// Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC
40/// streams, the constraints from the AAC audio profile are applied. For AAC
41/// Main, LTP, SSR and others, the Main profile is used.
42///
43/// The `audio_config` parameter follows the following format, starting from the
44/// most significant bit of the first byte:
45///
46///  * Bit 0:4 contains the AudioObjectType (if this is 0x5, then the
47///  real AudioObjectType is carried after the rate and channel data)
48///  * Bit 5:8 contains the sample frequency index (if this is 0xf, then the
49///  next 24 bits define the actual sample frequency, and subsequent
50///  fields are appropriately shifted).
51///  * Bit 9:12 contains the channel configuration
52/// ## `audio_config`
53/// a pointer to the AudioSpecificConfig
54///  as specified in the Elementary Stream Descriptor (esds)
55///  in ISO/IEC 14496-1.
56///
57/// # Returns
58///
59/// The level as a const string and [`None`] if the level could not be
60/// determined.
61#[doc(alias = "gst_codec_utils_aac_get_level")]
62pub fn codec_utils_aac_get_level(audio_config: &[u8]) -> Result<glib::GString, glib::BoolError> {
63    assert_initialized_main_thread!();
64    let len = audio_config.len() as _;
65    unsafe {
66        Option::<_>::from_glib_none(ffi::gst_codec_utils_aac_get_level(
67            audio_config.to_glib_none().0,
68            len,
69        ))
70        .ok_or_else(|| glib::bool_error!("Failed to get AAC level"))
71    }
72}
73
74/// Returns the profile of the given AAC stream as a string. The profile is
75/// normally determined using the AudioObjectType field which is in the first
76/// 5 bits of `audio_config`
77/// ## `audio_config`
78/// a pointer to the AudioSpecificConfig
79///  as specified in the Elementary Stream Descriptor (esds)
80///  in ISO/IEC 14496-1.
81///
82/// # Returns
83///
84/// The profile as a const string and [`None`] if the profile could not be
85/// determined.
86#[doc(alias = "gst_codec_utils_aac_get_profile")]
87pub fn codec_utils_aac_get_profile(audio_config: &[u8]) -> Result<glib::GString, glib::BoolError> {
88    assert_initialized_main_thread!();
89    let len = audio_config.len() as _;
90    unsafe {
91        Option::<_>::from_glib_none(ffi::gst_codec_utils_aac_get_profile(
92            audio_config.to_glib_none().0,
93            len,
94        ))
95        .ok_or_else(|| glib::bool_error!("Failed to get AAC profile"))
96    }
97}
98
99/// Translates the sample rate index found in AAC headers to the actual sample
100/// rate.
101/// ## `audio_config`
102/// a pointer to the AudioSpecificConfig
103///  as specified in the Elementary Stream Descriptor (esds)
104///  in ISO/IEC 14496-1.
105///
106/// # Returns
107///
108/// The sample rate if sr_idx is valid, 0 otherwise.
109#[doc(alias = "gst_codec_utils_aac_get_sample_rate")]
110pub fn codec_utils_aac_get_sample_rate(audio_config: &[u8]) -> u32 {
111    assert_initialized_main_thread!();
112    let len = audio_config.len() as _;
113    unsafe { ffi::gst_codec_utils_aac_get_sample_rate(audio_config.to_glib_none().0, len) }
114}
115
116/// Translates the sample rate index found in AAC headers to the actual sample
117/// rate.
118/// ## `sr_idx`
119/// Sample rate index as from the AudioSpecificConfig (MPEG-4
120///  container) or ADTS frame header
121///
122/// # Returns
123///
124/// The sample rate if `sr_idx` is valid, 0 otherwise.
125#[doc(alias = "gst_codec_utils_aac_get_sample_rate_from_index")]
126pub fn codec_utils_aac_get_sample_rate_from_index(sr_idx: u32) -> u32 {
127    assert_initialized_main_thread!();
128    unsafe { ffi::gst_codec_utils_aac_get_sample_rate_from_index(sr_idx) }
129}
130
131/// Transform a seq_level_idx into the level string
132/// ## `seq_level_idx`
133/// A seq_level_idx
134///
135/// # Returns
136///
137/// the level string or [`None`] if the seq_level_idx is unknown
138#[cfg(feature = "v1_26")]
139#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
140#[doc(alias = "gst_codec_utils_av1_get_level")]
141pub fn codec_utils_av1_get_level(seq_level_idx: u8) -> Result<glib::GString, glib::BoolError> {
142    assert_initialized_main_thread!();
143    unsafe {
144        Option::<_>::from_glib_none(ffi::gst_codec_utils_av1_get_level(seq_level_idx))
145            .ok_or_else(|| glib::bool_error!("Failed to get AV1 level"))
146    }
147}
148
149/// Transform a level string from the caps into the seq_level_idx
150/// ## `level`
151/// A level string from caps
152///
153/// # Returns
154///
155/// the seq_level_idx or 31 (max-level) if the level is unknown
156#[cfg(feature = "v1_26")]
157#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
158#[doc(alias = "gst_codec_utils_av1_get_seq_level_idx")]
159pub fn codec_utils_av1_get_seq_level_idx(level: &str) -> u8 {
160    assert_initialized_main_thread!();
161    unsafe { ffi::gst_codec_utils_av1_get_seq_level_idx(level.to_glib_none().0) }
162}
163
164/// Converts a RFC 6381 compatible codec string to [`gst::Caps`][crate::gst::Caps]. More than one codec
165/// string can be present (separated by `,`).
166///
167/// Registered codecs can be found at http://mp4ra.org/#/codecs
168/// ## `codecs_field`
169/// A mime codec string field
170///
171/// # Returns
172///
173/// The corresponding [`gst::Caps`][crate::gst::Caps] or [`None`]
174#[cfg(feature = "v1_22")]
175#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
176#[doc(alias = "gst_codec_utils_caps_from_mime_codec")]
177pub fn codec_utils_caps_from_mime_codec(codecs_field: &str) -> Option<gst::Caps> {
178    assert_initialized_main_thread!();
179    unsafe {
180        from_glib_full(ffi::gst_codec_utils_caps_from_mime_codec(
181            codecs_field.to_glib_none().0,
182        ))
183    }
184}
185
186/// Converts the level indication (level_idc) in the stream's
187/// sequence parameter set into a string. The SPS is expected to have the
188/// same format as for [`codec_utils_h264_get_profile()`][crate::codec_utils_h264_get_profile()].
189/// ## `sps`
190/// Pointer to the sequence parameter set for the stream.
191///
192/// # Returns
193///
194/// The level as a const string, or [`None`] if there is an error.
195#[doc(alias = "gst_codec_utils_h264_get_level")]
196pub fn codec_utils_h264_get_level(sps: &[u8]) -> Result<glib::GString, glib::BoolError> {
197    assert_initialized_main_thread!();
198    let len = sps.len() as _;
199    unsafe {
200        Option::<_>::from_glib_none(ffi::gst_codec_utils_h264_get_level(
201            sps.to_glib_none().0,
202            len,
203        ))
204        .ok_or_else(|| glib::bool_error!("Failed to get H264 level"))
205    }
206}
207
208/// Transform a level string from the caps into the level_idc
209/// ## `level`
210/// A level string from caps
211///
212/// # Returns
213///
214/// the level_idc or 0 if the level is unknown
215#[doc(alias = "gst_codec_utils_h264_get_level_idc")]
216pub fn codec_utils_h264_get_level_idc(level: &str) -> u8 {
217    assert_initialized_main_thread!();
218    unsafe { ffi::gst_codec_utils_h264_get_level_idc(level.to_glib_none().0) }
219}
220
221/// Converts the profile indication (profile_idc) in the stream's
222/// sequence parameter set into a string. The SPS is expected to have the
223/// following format, as defined in the H.264 specification. The SPS is viewed
224/// as a bitstream here, with bit 0 being the most significant bit of the first
225/// byte.
226///
227/// * Bit 0:7 - Profile indication
228/// * Bit 8 - constraint_set0_flag
229/// * Bit 9 - constraint_set1_flag
230/// * Bit 10 - constraint_set2_flag
231/// * Bit 11 - constraint_set3_flag
232/// * Bit 12 - constraint_set3_flag
233/// * Bit 13:15 - Reserved
234/// * Bit 16:24 - Level indication
235/// ## `sps`
236/// Pointer to the sequence parameter set for the stream.
237///
238/// # Returns
239///
240/// The profile as a const string, or [`None`] if there is an error.
241#[doc(alias = "gst_codec_utils_h264_get_profile")]
242pub fn codec_utils_h264_get_profile(sps: &[u8]) -> Result<glib::GString, glib::BoolError> {
243    assert_initialized_main_thread!();
244    let len = sps.len() as _;
245    unsafe {
246        Option::<_>::from_glib_none(ffi::gst_codec_utils_h264_get_profile(
247            sps.to_glib_none().0,
248            len,
249        ))
250        .ok_or_else(|| glib::bool_error!("Failed to get H264 profile"))
251    }
252}
253
254/// Converts the level indication (general_level_idc) in the stream's
255/// profile_tier_level structure into a string. The profiel_tier_level is
256/// expected to have the same format as for [`codec_utils_h264_get_profile()`][crate::codec_utils_h264_get_profile()].
257/// ## `profile_tier_level`
258/// Pointer to the profile_tier_level
259///  for the stream
260///
261/// # Returns
262///
263/// The level as a const string, or [`None`] if there is an error.
264#[doc(alias = "gst_codec_utils_h265_get_level")]
265pub fn codec_utils_h265_get_level(
266    profile_tier_level: &[u8],
267) -> Result<glib::GString, glib::BoolError> {
268    assert_initialized_main_thread!();
269    let len = profile_tier_level.len() as _;
270    unsafe {
271        Option::<_>::from_glib_none(ffi::gst_codec_utils_h265_get_level(
272            profile_tier_level.to_glib_none().0,
273            len,
274        ))
275        .ok_or_else(|| glib::bool_error!("Failed to get H265 level"))
276    }
277}
278
279/// Transform a level string from the caps into the level_idc
280/// ## `level`
281/// A level string from caps
282///
283/// # Returns
284///
285/// the level_idc or 0 if the level is unknown
286#[doc(alias = "gst_codec_utils_h265_get_level_idc")]
287pub fn codec_utils_h265_get_level_idc(level: &str) -> u8 {
288    assert_initialized_main_thread!();
289    unsafe { ffi::gst_codec_utils_h265_get_level_idc(level.to_glib_none().0) }
290}
291
292/// Converts the profile indication (general_profile_idc) in the stream's
293/// profile_level_tier structure into a string. The profile_tier_level is
294/// expected to have the following format, as defined in the H.265
295/// specification. The profile_tier_level is viewed as a bitstream here,
296/// with bit 0 being the most significant bit of the first byte.
297///
298/// * Bit 0:1 - general_profile_space
299/// * Bit 2 - general_tier_flag
300/// * Bit 3:7 - general_profile_idc
301/// * Bit 8:39 - gernal_profile_compatibility_flags
302/// * Bit 40 - general_progressive_source_flag
303/// * Bit 41 - general_interlaced_source_flag
304/// * Bit 42 - general_non_packed_constraint_flag
305/// * Bit 43 - general_frame_only_constraint_flag
306/// * Bit 44:87 - See below
307/// * Bit 88:95 - general_level_idc
308/// ## `profile_tier_level`
309/// Pointer to the profile_tier_level
310///  structure for the stream.
311///
312/// # Returns
313///
314/// The profile as a const string, or [`None`] if there is an error.
315#[doc(alias = "gst_codec_utils_h265_get_profile")]
316pub fn codec_utils_h265_get_profile(
317    profile_tier_level: &[u8],
318) -> Result<glib::GString, glib::BoolError> {
319    assert_initialized_main_thread!();
320    let len = profile_tier_level.len() as _;
321    unsafe {
322        Option::<_>::from_glib_none(ffi::gst_codec_utils_h265_get_profile(
323            profile_tier_level.to_glib_none().0,
324            len,
325        ))
326        .ok_or_else(|| glib::bool_error!("Failed to get H265 profile"))
327    }
328}
329
330/// Converts the tier indication (general_tier_flag) in the stream's
331/// profile_tier_level structure into a string. The profile_tier_level
332/// is expected to have the same format as for [`codec_utils_h264_get_profile()`][crate::codec_utils_h264_get_profile()].
333/// ## `profile_tier_level`
334/// Pointer to the profile_tier_level
335///  for the stream.
336///
337/// # Returns
338///
339/// The tier as a const string, or [`None`] if there is an error.
340#[doc(alias = "gst_codec_utils_h265_get_tier")]
341pub fn codec_utils_h265_get_tier(
342    profile_tier_level: &[u8],
343) -> Result<glib::GString, glib::BoolError> {
344    assert_initialized_main_thread!();
345    let len = profile_tier_level.len() as _;
346    unsafe {
347        Option::<_>::from_glib_none(ffi::gst_codec_utils_h265_get_tier(
348            profile_tier_level.to_glib_none().0,
349            len,
350        ))
351        .ok_or_else(|| glib::bool_error!("Failed to get H265 tier"))
352    }
353}
354
355/// Converts the level indication (general_level_idc) in the stream's
356/// ptl_record structure into a string.
357/// ## `ptl_record`
358/// Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.
359///
360/// # Returns
361///
362/// The level as a const string, or [`None`] if there is an error.
363#[cfg(feature = "v1_26")]
364#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
365#[doc(alias = "gst_codec_utils_h266_get_level")]
366pub fn codec_utils_h266_get_level(ptl_record: &[u8]) -> Result<glib::GString, glib::BoolError> {
367    assert_initialized_main_thread!();
368    let len = ptl_record.len() as _;
369    unsafe {
370        Option::<_>::from_glib_none(ffi::gst_codec_utils_h266_get_level(
371            ptl_record.to_glib_none().0,
372            len,
373        ))
374        .ok_or_else(|| glib::bool_error!("Failed to get H266 level"))
375    }
376}
377
378/// Transform a level string from the caps into the level_idc
379/// ## `level`
380/// A level string from caps
381///
382/// # Returns
383///
384/// the level_idc or 0 if the level is unknown
385#[cfg(feature = "v1_26")]
386#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
387#[doc(alias = "gst_codec_utils_h266_get_level_idc")]
388pub fn codec_utils_h266_get_level_idc(level: &str) -> u8 {
389    assert_initialized_main_thread!();
390    unsafe { ffi::gst_codec_utils_h266_get_level_idc(level.to_glib_none().0) }
391}
392
393/// Converts the profile indication (general_profile_idc) in the stream's
394/// ptl_record structure into a string.
395/// ## `ptl_record`
396/// Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.
397///
398/// # Returns
399///
400/// The profile as a const string, or [`None`] if there is an error.
401#[cfg(feature = "v1_26")]
402#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
403#[doc(alias = "gst_codec_utils_h266_get_profile")]
404pub fn codec_utils_h266_get_profile(ptl_record: &[u8]) -> Result<glib::GString, glib::BoolError> {
405    assert_initialized_main_thread!();
406    let len = ptl_record.len() as _;
407    unsafe {
408        Option::<_>::from_glib_none(ffi::gst_codec_utils_h266_get_profile(
409            ptl_record.to_glib_none().0,
410            len,
411        ))
412        .ok_or_else(|| glib::bool_error!("Failed to get H266 profile"))
413    }
414}
415
416/// Converts the tier indication (general_tier_flag) in the stream's
417/// ptl_record structure into a string.
418/// ## `ptl_record`
419/// Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.
420///
421/// # Returns
422///
423/// The tier as a const string, or [`None`] if there is an error.
424#[cfg(feature = "v1_26")]
425#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
426#[doc(alias = "gst_codec_utils_h266_get_tier")]
427pub fn codec_utils_h266_get_tier(ptl_record: &[u8]) -> Result<glib::GString, glib::BoolError> {
428    assert_initialized_main_thread!();
429    let len = ptl_record.len() as _;
430    unsafe {
431        Option::<_>::from_glib_none(ffi::gst_codec_utils_h266_get_tier(
432            ptl_record.to_glib_none().0,
433            len,
434        ))
435        .ok_or_else(|| glib::bool_error!("Failed to get H266 tier"))
436    }
437}
438
439/// Converts the level indication in the stream's visual object sequence into
440/// a string. `vis_obj_seq` is expected to be the data following the visual
441/// object sequence start code. Only the first byte
442/// (profile_and_level_indication) is used.
443/// ## `vis_obj_seq`
444/// Pointer to the visual object
445///  sequence for the stream.
446///
447/// # Returns
448///
449/// The level as a const string, or NULL if there is an error.
450#[doc(alias = "gst_codec_utils_mpeg4video_get_level")]
451pub fn codec_utils_mpeg4video_get_level(
452    vis_obj_seq: &[u8],
453) -> Result<glib::GString, glib::BoolError> {
454    assert_initialized_main_thread!();
455    let len = vis_obj_seq.len() as _;
456    unsafe {
457        Option::<_>::from_glib_none(ffi::gst_codec_utils_mpeg4video_get_level(
458            vis_obj_seq.to_glib_none().0,
459            len,
460        ))
461        .ok_or_else(|| glib::bool_error!("Failed to get MPEG4 video level"))
462    }
463}
464
465/// Converts the profile indication in the stream's visual object sequence into
466/// a string. `vis_obj_seq` is expected to be the data following the visual
467/// object sequence start code. Only the first byte
468/// (profile_and_level_indication) is used.
469/// ## `vis_obj_seq`
470/// Pointer to the visual object
471///  sequence for the stream.
472///
473/// # Returns
474///
475/// The profile as a const string, or NULL if there is an error.
476#[doc(alias = "gst_codec_utils_mpeg4video_get_profile")]
477pub fn codec_utils_mpeg4video_get_profile(
478    vis_obj_seq: &[u8],
479) -> Result<glib::GString, glib::BoolError> {
480    assert_initialized_main_thread!();
481    let len = vis_obj_seq.len() as _;
482    unsafe {
483        Option::<_>::from_glib_none(ffi::gst_codec_utils_mpeg4video_get_profile(
484            vis_obj_seq.to_glib_none().0,
485            len,
486        ))
487        .ok_or_else(|| glib::bool_error!("Failed to get MPEG4 video profile"))
488    }
489}
490
491/// List all available [`EncodingTarget`][crate::EncodingTarget] for the specified category, or all categories
492/// if `categoryname` is [`None`].
493/// ## `categoryname`
494/// The category, for ex: `GST_ENCODING_CATEGORY_DEVICE`.
495/// Can be [`None`].
496///
497/// # Returns
498///
499/// The list of [`EncodingTarget`][crate::EncodingTarget]
500#[doc(alias = "gst_encoding_list_all_targets")]
501pub fn encoding_list_all_targets(categoryname: Option<&str>) -> Vec<EncodingTarget> {
502    assert_initialized_main_thread!();
503    unsafe {
504        FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_all_targets(
505            categoryname.to_glib_none().0,
506        ))
507    }
508}
509
510/// Lists all [`EncodingTarget`][crate::EncodingTarget] categories present on disk.
511///
512/// # Returns
513///
514/// A list
515/// of [`EncodingTarget`][crate::EncodingTarget] categories.
516#[doc(alias = "gst_encoding_list_available_categories")]
517pub fn encoding_list_available_categories() -> Vec<glib::GString> {
518    assert_initialized_main_thread!();
519    unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_available_categories()) }
520}
521
522/// Returns a localised string describing the given element, for use in
523/// error dialogs or other messages to be seen by the user.
524///
525/// This function is mainly for internal use, applications would typically
526/// use `gst_missing_plugin_message_get_description()` to get a description of
527/// a missing feature from a missing-plugin message.
528/// ## `factory_name`
529/// the name of the element, e.g. "giosrc"
530///
531/// # Returns
532///
533/// a newly-allocated description string. Free
534///  string with `g_free()` when not needed any longer.
535#[doc(alias = "gst_pb_utils_get_element_description")]
536pub fn pb_utils_get_element_description(factory_name: &str) -> glib::GString {
537    assert_initialized_main_thread!();
538    unsafe {
539        from_glib_full(ffi::gst_pb_utils_get_element_description(
540            factory_name.to_glib_none().0,
541        ))
542    }
543}
544
545/// Returns a localised string describing a sink element handling the protocol
546/// specified in `protocol`, for use in error dialogs or other messages to be
547/// seen by the user.
548///
549/// This function is mainly for internal use, applications would typically
550/// use `gst_missing_plugin_message_get_description()` to get a description of
551/// a missing feature from a missing-plugin message.
552/// ## `protocol`
553/// the protocol the sink element needs to handle, e.g. "http"
554///
555/// # Returns
556///
557/// a newly-allocated description string. Free
558///  string with `g_free()` when not needed any longer.
559#[doc(alias = "gst_pb_utils_get_sink_description")]
560pub fn pb_utils_get_sink_description(protocol: &str) -> glib::GString {
561    assert_initialized_main_thread!();
562    unsafe {
563        from_glib_full(ffi::gst_pb_utils_get_sink_description(
564            protocol.to_glib_none().0,
565        ))
566    }
567}
568
569/// Returns a localised string describing a source element handling the protocol
570/// specified in `protocol`, for use in error dialogs or other messages to be
571/// seen by the user.
572///
573/// This function is mainly for internal use, applications would typically
574/// use `gst_missing_plugin_message_get_description()` to get a description of
575/// a missing feature from a missing-plugin message.
576/// ## `protocol`
577/// the protocol the source element needs to handle, e.g. "http"
578///
579/// # Returns
580///
581/// a newly-allocated description string. Free
582///  string with `g_free()` when not needed any longer.
583#[doc(alias = "gst_pb_utils_get_source_description")]
584pub fn pb_utils_get_source_description(protocol: &str) -> glib::GString {
585    assert_initialized_main_thread!();
586    unsafe {
587        from_glib_full(ffi::gst_pb_utils_get_source_description(
588            protocol.to_glib_none().0,
589        ))
590    }
591}
592
593/// Gets the version number of the GStreamer Plugins Base libraries.
594///
595/// # Returns
596///
597///
598/// ## `major`
599/// pointer to a guint to store the major version number, or [`None`]
600///
601/// ## `minor`
602/// pointer to a guint to store the minor version number, or [`None`]
603///
604/// ## `micro`
605/// pointer to a guint to store the micro version number, or [`None`]
606///
607/// ## `nano`
608/// pointer to a guint to store the nano version number, or [`None`]
609#[doc(alias = "gst_plugins_base_version")]
610pub fn plugins_base_version() -> (u32, u32, u32, u32) {
611    skip_assert_initialized!();
612    unsafe {
613        let mut major = std::mem::MaybeUninit::uninit();
614        let mut minor = std::mem::MaybeUninit::uninit();
615        let mut micro = std::mem::MaybeUninit::uninit();
616        let mut nano = std::mem::MaybeUninit::uninit();
617        ffi::gst_plugins_base_version(
618            major.as_mut_ptr(),
619            minor.as_mut_ptr(),
620            micro.as_mut_ptr(),
621            nano.as_mut_ptr(),
622        );
623        (
624            major.assume_init(),
625            minor.assume_init(),
626            micro.assume_init(),
627            nano.assume_init(),
628        )
629    }
630}
631
632/// This function returns a string that is useful for describing this version
633/// of GStreamer's gst-plugins-base libraries to the outside world: user agent
634/// strings, logging, about dialogs ...
635///
636/// # Returns
637///
638/// a newly allocated string describing this version of gst-plugins-base
639#[doc(alias = "gst_plugins_base_version_string")]
640pub fn plugins_base_version_string() -> glib::GString {
641    skip_assert_initialized!();
642    unsafe { from_glib_full(ffi::gst_plugins_base_version_string()) }
643}