diff --git a/gstreamer-pbutils/src/auto/discoverer.rs b/gstreamer-pbutils/src/auto/discoverer.rs index 1893f4c15..45fc0668e 100644 --- a/gstreamer-pbutils/src/auto/discoverer.rs +++ b/gstreamer-pbutils/src/auto/discoverer.rs @@ -19,26 +19,6 @@ use std::mem::transmute; use std::ptr; glib_wrapper! { - /// The `Discoverer` is a utility object which allows to get as much - /// information as possible from one or many URIs. - /// - /// It provides two APIs, allowing usage in blocking or non-blocking mode. - /// - /// The blocking mode just requires calling `Discoverer::discover_uri` - /// with the URI one wishes to discover. - /// - /// The non-blocking mode requires a running `glib::MainLoop` iterating a - /// `glib::MainContext`, where one connects to the various signals, appends the - /// URIs to be processed (through `Discoverer::discover_uri_async`) and then - /// asks for the discovery to begin (through `Discoverer::start`). - /// By default this will use the GLib default main context unless you have - /// set a custom context using `glib::MainContext::push_thread_default`. - /// - /// All the information is returned in a `DiscovererInfo` structure. - /// - /// # Implements - /// - /// [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) pub struct Discoverer(Object); match fn { @@ -47,17 +27,6 @@ glib_wrapper! { } impl Discoverer { - /// Creates a new `Discoverer` with the provided timeout. - /// ## `timeout` - /// timeout per file, in nanoseconds. Allowed are values between - /// one second (`GST_SECOND`) and one hour (3600 * `GST_SECOND`) - /// - /// # Returns - /// - /// The new `Discoverer`. - /// If an error occurred when creating the discoverer, `err` will be set - /// accordingly and `None` will be returned. If `err` is set, the caller must - /// free it when no longer needed using `glib::Error::free`. pub fn new(timeout: gst::ClockTime) -> Result { assert_initialized_main_thread!(); unsafe { diff --git a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs index 3becd718e..2407d875c 100644 --- a/gstreamer-pbutils/src/auto/discoverer_audio_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_audio_info.rs @@ -11,11 +11,6 @@ use std::mem; use std::ptr; glib_wrapper! { - /// `DiscovererStreamInfo` specific to audio streams. - /// - /// # Implements - /// - /// [`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) pub struct DiscovererAudioInfo(Object): DiscovererStreamInfo; match fn { @@ -24,25 +19,12 @@ glib_wrapper! { } impl DiscovererAudioInfo { - /// - /// # Returns - /// - /// the average or nominal bitrate of the stream in bits/second. pub fn get_bitrate(&self) -> u32 { unsafe { ffi::gst_discoverer_audio_info_get_bitrate(self.to_glib_none().0) } } - /// - /// Feature: `v1_14` - /// - /// - /// # Returns - /// - /// the channel-mask of the stream, refer to - /// `gst_audio_channel_positions_from_mask` for more - /// information. #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn get_channel_mask(&self) -> u64 { unsafe { @@ -50,50 +32,30 @@ impl DiscovererAudioInfo { } } - /// - /// # Returns - /// - /// the number of channels in the stream. pub fn get_channels(&self) -> u32 { unsafe { ffi::gst_discoverer_audio_info_get_channels(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// the number of bits used per sample in each channel. pub fn get_depth(&self) -> u32 { unsafe { ffi::gst_discoverer_audio_info_get_depth(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// the language of the stream, or NULL if unknown. pub fn get_language(&self) -> Option { unsafe { from_glib_none(ffi::gst_discoverer_audio_info_get_language(self.to_glib_none().0)) } } - /// - /// # Returns - /// - /// the maximum bitrate of the stream in bits/second. pub fn get_max_bitrate(&self) -> u32 { unsafe { ffi::gst_discoverer_audio_info_get_max_bitrate(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// the sample rate of the stream in Hertz. pub fn get_sample_rate(&self) -> u32 { unsafe { ffi::gst_discoverer_audio_info_get_sample_rate(self.to_glib_none().0) diff --git a/gstreamer-pbutils/src/auto/discoverer_container_info.rs b/gstreamer-pbutils/src/auto/discoverer_container_info.rs index fa6f5159f..53be43a63 100644 --- a/gstreamer-pbutils/src/auto/discoverer_container_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_container_info.rs @@ -11,11 +11,6 @@ use std::mem; use std::ptr; glib_wrapper! { - /// `DiscovererStreamInfo` specific to container streams. - /// - /// # Implements - /// - /// [`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) pub struct DiscovererContainerInfo(Object): DiscovererStreamInfo; match fn { @@ -24,12 +19,6 @@ glib_wrapper! { } impl DiscovererContainerInfo { - /// - /// # Returns - /// - /// the list of - /// `DiscovererStreamInfo` this container stream offers. - /// Free with `DiscovererStreamInfo::list_free` after usage. pub fn get_streams(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_container_info_get_streams(self.to_glib_none().0)) diff --git a/gstreamer-pbutils/src/auto/discoverer_info.rs b/gstreamer-pbutils/src/auto/discoverer_info.rs index 6a53840cd..d7212c24a 100644 --- a/gstreamer-pbutils/src/auto/discoverer_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_info.rs @@ -16,11 +16,6 @@ use std::mem; use std::ptr; glib_wrapper! { - /// Structure containing the information of a URI analyzed by `Discoverer`. - /// - /// # Implements - /// - /// [`DiscovererInfoExt`](trait.DiscovererInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) pub struct DiscovererInfo(Object); match fn { @@ -29,14 +24,6 @@ glib_wrapper! { } impl DiscovererInfo { - /// Parses a `glib::Variant` as produced by `DiscovererInfoExt::to_variant` - /// back to a `DiscovererInfo`. - /// ## `variant` - /// A `glib::Variant` to deserialize into a `DiscovererInfo`. - /// - /// # Returns - /// - /// A newly-allocated `DiscovererInfo`. pub fn from_variant(variant: &glib::Variant) -> Option { assert_initialized_main_thread!(); unsafe { @@ -48,167 +35,42 @@ impl DiscovererInfo { unsafe impl Send for DiscovererInfo {} unsafe impl Sync for DiscovererInfo {} -/// Trait containing all `DiscovererInfo` methods. -/// -/// # Implementors -/// -/// [`DiscovererInfo`](struct.DiscovererInfo.html) pub trait DiscovererInfoExt { - /// - /// # Returns - /// - /// A copy of the `DiscovererInfo` fn copy(&self) -> DiscovererInfo; - /// Finds all the `DiscovererAudioInfo` contained in `self` - /// - /// # Returns - /// - /// A `glib::List` of - /// matching `DiscovererStreamInfo`. The caller should free it with - /// `DiscovererStreamInfo::list_free`. fn get_audio_streams(&self) -> Vec; - /// Finds all the `DiscovererContainerInfo` contained in `self` - /// - /// # Returns - /// - /// A `glib::List` of - /// matching `DiscovererStreamInfo`. The caller should free it with - /// `DiscovererStreamInfo::list_free`. fn get_container_streams(&self) -> Vec; - /// - /// # Returns - /// - /// the duration of the URI in `gst::ClockTime` (nanoseconds). fn get_duration(&self) -> gst::ClockTime; - /// - /// Feature: `v1_14` - /// - /// - /// # Returns - /// - /// whether the URI is live. #[cfg(any(feature = "v1_14", feature = "dox"))] fn get_live(&self) -> bool; - /// - /// # Deprecated - /// - /// This functions is deprecated since version 1.4, use - /// `DiscovererInfoExt::get_missing_elements_installer_details` - /// - /// # Returns - /// - /// Miscellaneous information stored as a `gst::Structure` - /// (for example: information about missing plugins). If you wish to use the - /// `gst::Structure` after the life-time of `self`, you will need to copy it. fn get_misc(&self) -> Option; - /// Get the installer details for missing elements - /// - /// # Returns - /// - /// An array of strings - /// containing informations about how to install the various missing elements - /// for `self` to be usable. If you wish to use the strings after the life-time - /// of `self`, you will need to copy them. fn get_missing_elements_installer_details(&self) -> Vec; - /// - /// # Returns - /// - /// the result of the discovery as a `DiscovererResult`. fn get_result(&self) -> DiscovererResult; - /// - /// # Returns - /// - /// the whether the URI is seekable. fn get_seekable(&self) -> bool; - /// - /// # Returns - /// - /// the structure (or topology) of the URI as a - /// `DiscovererStreamInfo`. - /// This structure can be traversed to see the original hierarchy. Unref with - /// `gst_discoverer_stream_info_unref` after usage. fn get_stream_info(&self) -> Option; - /// - /// # Returns - /// - /// the list of - /// all streams contained in the `info`. Free after usage - /// with `DiscovererStreamInfo::list_free`. fn get_stream_list(&self) -> Vec; - /// Finds the `DiscovererStreamInfo` contained in `self` that match the - /// given `streamtype`. - /// ## `streamtype` - /// a `glib::Type` derived from `DiscovererStreamInfo` - /// - /// # Returns - /// - /// A `glib::List` of - /// matching `DiscovererStreamInfo`. The caller should free it with - /// `DiscovererStreamInfo::list_free`. fn get_streams(&self, streamtype: glib::types::Type) -> Vec; - /// Finds all the `DiscovererSubtitleInfo` contained in `self` - /// - /// # Returns - /// - /// A `glib::List` of - /// matching `DiscovererStreamInfo`. The caller should free it with - /// `DiscovererStreamInfo::list_free`. fn get_subtitle_streams(&self) -> Vec; - /// - /// # Returns - /// - /// all tags contained in the URI. If you wish to use - /// the tags after the life-time of `self`, you will need to copy them. fn get_tags(&self) -> Option; - /// - /// # Returns - /// - /// TOC contained in the URI. If you wish to use - /// the TOC after the life-time of `self`, you will need to copy it. fn get_toc(&self) -> Option; - /// - /// # Returns - /// - /// the URI to which this information corresponds to. - /// Copy it if you wish to use it after the life-time of `self`. fn get_uri(&self) -> Option; - /// Finds all the `DiscovererVideoInfo` contained in `self` - /// - /// # Returns - /// - /// A `glib::List` of - /// matching `DiscovererStreamInfo`. The caller should free it with - /// `DiscovererStreamInfo::list_free`. fn get_video_streams(&self) -> Vec; - /// Serializes `self` to a `glib::Variant` that can be parsed again - /// through `DiscovererInfo::from_variant`. - /// - /// Note that any `gst::Toc` (s) that might have been discovered will not be serialized - /// for now. - /// ## `flags` - /// A combination of `DiscovererSerializeFlags` to specify - /// what needs to be serialized. - /// - /// # Returns - /// - /// A newly-allocated `glib::Variant` representing `self`. fn to_variant(&self, flags: DiscovererSerializeFlags) -> Option; } diff --git a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs index 851a63e31..fd7219f93 100644 --- a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs @@ -12,25 +12,6 @@ use std::mem; use std::ptr; glib_wrapper! { - /// Base structure for information concerning a media stream. Depending on the - /// stream type, one can find more media-specific information in - /// `DiscovererAudioInfo`, `DiscovererVideoInfo`, and - /// `DiscovererContainerInfo`. - /// - /// The `DiscovererStreamInfo` represents the topology of the stream. Siblings - /// can be iterated over with `DiscovererStreamInfoExt::get_next` and - /// `DiscovererStreamInfoExt::get_previous`. Children (sub-streams) of a - /// stream can be accessed using the `DiscovererContainerInfo` API. - /// - /// As a simple example, if you run `Discoverer` on an AVI file with one audio - /// and one video stream, you will get a `DiscovererContainerInfo` - /// corresponding to the AVI container, which in turn will have a - /// `DiscovererAudioInfo` sub-stream and a `DiscovererVideoInfo` sub-stream - /// for the audio and video streams respectively. - /// - /// # Implements - /// - /// [`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) pub struct DiscovererStreamInfo(Object); match fn { @@ -41,74 +22,21 @@ glib_wrapper! { unsafe impl Send for DiscovererStreamInfo {} unsafe impl Sync for DiscovererStreamInfo {} -/// Trait containing all `DiscovererStreamInfo` methods. -/// -/// # Implementors -/// -/// [`DiscovererAudioInfo`](struct.DiscovererAudioInfo.html), [`DiscovererContainerInfo`](struct.DiscovererContainerInfo.html), [`DiscovererStreamInfo`](struct.DiscovererStreamInfo.html), [`DiscovererSubtitleInfo`](struct.DiscovererSubtitleInfo.html), [`DiscovererVideoInfo`](struct.DiscovererVideoInfo.html) pub trait DiscovererStreamInfoExt { - /// - /// # Returns - /// - /// the `gst::Caps` of the stream. Unref with - /// `gst_caps_unref` after usage. fn get_caps(&self) -> Option; - /// - /// # Deprecated - /// - /// This functions is deprecated since version 1.4, use - /// `DiscovererInfoExt::get_missing_elements_installer_details` - /// - /// # Returns - /// - /// additional information regarding the stream (for - /// example codec version, profile, etc..). If you wish to use the `gst::Structure` - /// after the life-time of `self` you will need to copy it. fn get_misc(&self) -> Option; - /// - /// # Returns - /// - /// the next `DiscovererStreamInfo` in a chain. `None` - /// for final streams. - /// Unref with `gst_discoverer_stream_info_unref` after usage. fn get_next(&self) -> Option; - /// - /// # Returns - /// - /// the previous `DiscovererStreamInfo` in a chain. - /// `None` for starting points. Unref with `gst_discoverer_stream_info_unref` - /// after usage. fn get_previous(&self) -> Option; - /// - /// # Returns - /// - /// the stream ID of this stream. If you wish to - /// use the stream ID after the life-time of `self` you will need to copy it. fn get_stream_id(&self) -> Option; - /// - /// # Returns - /// - /// a human readable name for the stream type of the given `self` (ex : "audio", - /// "container",...). fn get_stream_type_nick(&self) -> String; - /// - /// # Returns - /// - /// the tags contained in this stream. If you wish to - /// use the tags after the life-time of `self` you will need to copy them. fn get_tags(&self) -> Option; - /// - /// # Returns - /// - /// the TOC contained in this stream. If you wish to - /// use the TOC after the life-time of `self` you will need to copy it. fn get_toc(&self) -> Option; } diff --git a/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs b/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs index a4930c1c5..53b1704fb 100644 --- a/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_subtitle_info.rs @@ -11,12 +11,6 @@ use std::mem; use std::ptr; glib_wrapper! { - /// `DiscovererStreamInfo` specific to subtitle streams (this includes text and - /// image based ones). - /// - /// # Implements - /// - /// [`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) pub struct DiscovererSubtitleInfo(Object): DiscovererStreamInfo; match fn { @@ -25,10 +19,6 @@ glib_wrapper! { } impl DiscovererSubtitleInfo { - /// - /// # Returns - /// - /// the language of the stream, or NULL if unknown. pub fn get_language(&self) -> Option { unsafe { from_glib_none(ffi::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0)) diff --git a/gstreamer-pbutils/src/auto/discoverer_video_info.rs b/gstreamer-pbutils/src/auto/discoverer_video_info.rs index 26846b084..3de2a0dc0 100644 --- a/gstreamer-pbutils/src/auto/discoverer_video_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_video_info.rs @@ -11,11 +11,6 @@ use std::mem; use std::ptr; glib_wrapper! { - /// `DiscovererStreamInfo` specific to video streams (this includes images). - /// - /// # Implements - /// - /// [`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) pub struct DiscovererVideoInfo(Object): DiscovererStreamInfo; match fn { @@ -24,71 +19,42 @@ glib_wrapper! { } impl DiscovererVideoInfo { - /// - /// # Returns - /// - /// the average or nominal bitrate of the video stream in bits/second. pub fn get_bitrate(&self) -> u32 { unsafe { ffi::gst_discoverer_video_info_get_bitrate(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// the depth in bits of the video stream. pub fn get_depth(&self) -> u32 { unsafe { ffi::gst_discoverer_video_info_get_depth(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// the height of the video stream in pixels. pub fn get_height(&self) -> u32 { unsafe { ffi::gst_discoverer_video_info_get_height(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// the maximum bitrate of the video stream in bits/second. pub fn get_max_bitrate(&self) -> u32 { unsafe { ffi::gst_discoverer_video_info_get_max_bitrate(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// the width of the video stream in pixels. pub fn get_width(&self) -> u32 { unsafe { ffi::gst_discoverer_video_info_get_width(self.to_glib_none().0) } } - /// - /// # Returns - /// - /// `true` if the video stream corresponds to an image (i.e. only contains - /// one frame). pub fn is_image(&self) -> bool { unsafe { from_glib(ffi::gst_discoverer_video_info_is_image(self.to_glib_none().0)) } } - /// - /// # Returns - /// - /// `true` if the stream is interlaced, else `false`. pub fn is_interlaced(&self) -> bool { unsafe { from_glib(ffi::gst_discoverer_video_info_is_interlaced(self.to_glib_none().0)) diff --git a/gstreamer-pbutils/src/auto/enums.rs b/gstreamer-pbutils/src/auto/enums.rs index 1af9e9d3e..37f60915c 100644 --- a/gstreamer-pbutils/src/auto/enums.rs +++ b/gstreamer-pbutils/src/auto/enums.rs @@ -12,7 +12,6 @@ use glib::value::SetValue; use glib::value::Value; use gobject_ffi; -/// Result values for the discovery process. #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] pub enum DiscovererResult {