Remove automatically inserted docs from git

This commit is contained in:
Sebastian Dröge 2018-10-08 09:08:49 +03:00
parent 382138b75a
commit 3069af42bb
8 changed files with 0 additions and 335 deletions

View file

@ -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<ffi::GstDiscoverer, ffi::GstDiscovererClass>);
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<Discoverer, Error> {
assert_initialized_main_thread!();
unsafe {

View file

@ -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<ffi::GstDiscovererAudioInfo>): 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<String> {
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)

View file

@ -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<ffi::GstDiscovererContainerInfo>): 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<DiscovererStreamInfo> {
unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_container_info_get_streams(self.to_glib_none().0))

View file

@ -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<ffi::GstDiscovererInfo>);
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<DiscovererInfo> {
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<DiscovererStreamInfo>;
/// 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<DiscovererStreamInfo>;
///
/// # 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<gst::Structure>;
/// 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<String>;
///
/// # 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<DiscovererStreamInfo>;
///
/// # Returns
///
/// the list of
/// all streams contained in the `info`. Free after usage
/// with `DiscovererStreamInfo::list_free`.
fn get_stream_list(&self) -> Vec<DiscovererStreamInfo>;
/// 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<DiscovererStreamInfo>;
/// 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<DiscovererStreamInfo>;
///
/// # 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<gst::TagList>;
///
/// # 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<gst::Toc>;
///
/// # 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<String>;
/// 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<DiscovererStreamInfo>;
/// 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<glib::Variant>;
}

View file

@ -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<ffi::GstDiscovererStreamInfo>);
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<gst::Caps>;
///
/// # 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<gst::Structure>;
///
/// # 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<DiscovererStreamInfo>;
///
/// # 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<DiscovererStreamInfo>;
///
/// # 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<String>;
///
/// # 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<gst::TagList>;
///
/// # 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<gst::Toc>;
}

View file

@ -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<ffi::GstDiscovererSubtitleInfo>): 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<String> {
unsafe {
from_glib_none(ffi::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0))

View file

@ -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<ffi::GstDiscovererVideoInfo>): 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))

View file

@ -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 {