mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +00:00
Add dox feature to everything as needed
This commit is contained in:
parent
a557a8d66e
commit
d4bd1c2d76
6 changed files with 112 additions and 111 deletions
|
@ -182,7 +182,8 @@ pub struct VideoInfoBuilder<'a> {
|
||||||
stride: Option<&'a [i32]>,
|
stride: Option<&'a [i32]>,
|
||||||
multiview_mode: Option<::VideoMultiviewMode>,
|
multiview_mode: Option<::VideoMultiviewMode>,
|
||||||
multiview_flags: Option<::VideoMultiviewFlags>,
|
multiview_flags: Option<::VideoMultiviewFlags>,
|
||||||
#[cfg(feature = "v1_12")] field_order: Option<::VideoFieldOrder>,
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
|
field_order: Option<::VideoFieldOrder>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> VideoInfoBuilder<'a> {
|
impl<'a> VideoInfoBuilder<'a> {
|
||||||
|
@ -263,7 +264,7 @@ impl<'a> VideoInfoBuilder<'a> {
|
||||||
ptr::write(ptr.offset(1), multiview_flags.to_glib().bits());
|
ptr::write(ptr.offset(1), multiview_flags.to_glib().bits());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_12")]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
{
|
{
|
||||||
if let Some(field_order) = self.field_order {
|
if let Some(field_order) = self.field_order {
|
||||||
let ptr = &mut info._gst_reserved as *mut _ as *mut i32;
|
let ptr = &mut info._gst_reserved as *mut _ as *mut i32;
|
||||||
|
@ -359,7 +360,7 @@ impl<'a> VideoInfoBuilder<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_12")]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
pub fn field_order(self, field_order: ::VideoFieldOrder) -> Self {
|
pub fn field_order(self, field_order: ::VideoFieldOrder) -> Self {
|
||||||
Self {
|
Self {
|
||||||
field_order: Some(field_order),
|
field_order: Some(field_order),
|
||||||
|
@ -372,7 +373,7 @@ impl VideoInfo {
|
||||||
pub fn new<'a>(format: ::VideoFormat, width: u32, height: u32) -> VideoInfoBuilder<'a> {
|
pub fn new<'a>(format: ::VideoFormat, width: u32, height: u32) -> VideoInfoBuilder<'a> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
|
|
||||||
#[cfg(not(feature = "v1_12"))]
|
#[cfg(not(any(feature = "v1_12", feature = "dox")))]
|
||||||
{
|
{
|
||||||
VideoInfoBuilder {
|
VideoInfoBuilder {
|
||||||
format: format,
|
format: format,
|
||||||
|
@ -392,7 +393,7 @@ impl VideoInfo {
|
||||||
multiview_flags: None,
|
multiview_flags: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_12")]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
{
|
{
|
||||||
VideoInfoBuilder {
|
VideoInfoBuilder {
|
||||||
format: format,
|
format: format,
|
||||||
|
@ -509,7 +510,7 @@ impl VideoInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_12")]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
pub fn field_order(&self) -> ::VideoFieldOrder {
|
pub fn field_order(&self) -> ::VideoFieldOrder {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ptr = &self.0._gst_reserved as *const _ as *const i32;
|
let ptr = &self.0._gst_reserved as *const _ as *const i32;
|
||||||
|
@ -667,7 +668,7 @@ impl glib::translate::FromGlibPtrFull<*mut ffi::GstVideoInfo> for VideoInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_12")]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
impl ::VideoFieldOrder {
|
impl ::VideoFieldOrder {
|
||||||
pub fn to_string(&self) -> String {
|
pub fn to_string(&self) -> String {
|
||||||
unsafe { from_glib_full(ffi::gst_video_field_order_to_string(self.to_glib())) }
|
unsafe { from_glib_full(ffi::gst_video_field_order_to_string(self.to_glib())) }
|
||||||
|
@ -680,7 +681,7 @@ impl ::VideoFieldOrder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_12")]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
impl str::FromStr for ::VideoFieldOrder {
|
impl str::FromStr for ::VideoFieldOrder {
|
||||||
type Err = ();
|
type Err = ();
|
||||||
|
|
||||||
|
@ -690,7 +691,7 @@ impl str::FromStr for ::VideoFieldOrder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_12")]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
impl fmt::Display for ::VideoFieldOrder {
|
impl fmt::Display for ::VideoFieldOrder {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||||
f.write_str(&self.to_string())
|
f.write_str(&self.to_string())
|
||||||
|
|
|
@ -16,17 +16,6 @@ use glib_ffi;
|
||||||
use glib_ffi::{gboolean, gpointer};
|
use glib_ffi::{gboolean, gpointer};
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
#[cfg(feature = "futures")]
|
|
||||||
use std::sync::{Arc, Mutex};
|
|
||||||
#[cfg(feature = "futures")]
|
|
||||||
use futures;
|
|
||||||
#[cfg(feature = "futures")]
|
|
||||||
use futures::{Async, Poll};
|
|
||||||
#[cfg(feature = "futures")]
|
|
||||||
use futures::task::Task;
|
|
||||||
#[cfg(feature = "futures")]
|
|
||||||
use futures::stream::Stream;
|
|
||||||
|
|
||||||
use Bus;
|
use Bus;
|
||||||
use BusSyncReply;
|
use BusSyncReply;
|
||||||
use Message;
|
use Message;
|
||||||
|
@ -145,52 +134,61 @@ impl Bus {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "futures")]
|
#[cfg(any(feature = "futures", feature = "dox"))]
|
||||||
pub struct BusStream(Bus, Arc<Mutex<Option<Task>>>);
|
mod futures {
|
||||||
|
use std::sync::{Arc, Mutex};
|
||||||
|
use futures;
|
||||||
|
use futures::{Async, Poll};
|
||||||
|
use futures::task::Task;
|
||||||
|
use futures::stream::Stream;
|
||||||
|
use super::*;
|
||||||
|
|
||||||
#[cfg(feature = "futures")]
|
pub struct BusStream(Bus, Arc<Mutex<Option<Task>>>);
|
||||||
impl BusStream {
|
|
||||||
pub fn new(bus: &Bus) -> Self {
|
|
||||||
skip_assert_initialized!();
|
|
||||||
let task = Arc::new(Mutex::new(None));
|
|
||||||
let task_clone = task.clone();
|
|
||||||
|
|
||||||
bus.set_sync_handler(move |_, _| {
|
impl BusStream {
|
||||||
let mut task = task_clone.lock().unwrap();
|
pub fn new(bus: &Bus) -> Self {
|
||||||
if let Some(task) = task.take() {
|
skip_assert_initialized!();
|
||||||
// FIXME: Force type...
|
let task = Arc::new(Mutex::new(None));
|
||||||
let task: Task = task;
|
let task_clone = task.clone();
|
||||||
task.notify();
|
|
||||||
|
bus.set_sync_handler(move |_, _| {
|
||||||
|
let mut task = task_clone.lock().unwrap();
|
||||||
|
if let Some(task) = task.take() {
|
||||||
|
// FIXME: Force type...
|
||||||
|
let task: Task = task;
|
||||||
|
task.notify();
|
||||||
|
}
|
||||||
|
|
||||||
|
BusSyncReply::Pass
|
||||||
|
});
|
||||||
|
|
||||||
|
BusStream(bus.clone(), task)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Drop for BusStream {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
self.0.unset_sync_handler();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Stream for BusStream {
|
||||||
|
type Item = Message;
|
||||||
|
type Error = ();
|
||||||
|
|
||||||
|
fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error> {
|
||||||
|
let mut task = self.1.lock().unwrap();
|
||||||
|
|
||||||
|
let msg = self.0.pop();
|
||||||
|
if let Some(msg) = msg {
|
||||||
|
Ok(Async::Ready(Some(msg)))
|
||||||
|
} else {
|
||||||
|
*task = Some(futures::task::current());
|
||||||
|
Ok(Async::NotReady)
|
||||||
}
|
}
|
||||||
|
|
||||||
BusSyncReply::Pass
|
|
||||||
});
|
|
||||||
|
|
||||||
BusStream(bus.clone(), task)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "futures")]
|
|
||||||
impl Drop for BusStream {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
self.0.unset_sync_handler();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "futures")]
|
|
||||||
impl Stream for BusStream {
|
|
||||||
type Item = Message;
|
|
||||||
type Error = ();
|
|
||||||
|
|
||||||
fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error> {
|
|
||||||
let mut task = self.1.lock().unwrap();
|
|
||||||
|
|
||||||
let msg = self.0.pop();
|
|
||||||
if let Some(msg) = msg {
|
|
||||||
Ok(Async::Ready(Some(msg)))
|
|
||||||
} else {
|
|
||||||
*task = Some(futures::task::current());
|
|
||||||
Ok(Async::NotReady)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "futures", feature = "dox"))]
|
||||||
|
pub use bus::futures::BusStream;
|
||||||
|
|
|
@ -98,7 +98,7 @@ pub trait ElementExtManual {
|
||||||
function: &str,
|
function: &str,
|
||||||
line: u32,
|
line: u32,
|
||||||
);
|
);
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
fn message_full_with_details<T: ::MessageErrorDomain>(
|
fn message_full_with_details<T: ::MessageErrorDomain>(
|
||||||
&self,
|
&self,
|
||||||
type_: ElementMessageType,
|
type_: ElementMessageType,
|
||||||
|
@ -248,7 +248,7 @@ impl<O: IsA<Element>> ElementExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
fn message_full_with_details<T: ::MessageErrorDomain>(
|
fn message_full_with_details<T: ::MessageErrorDomain>(
|
||||||
&self,
|
&self,
|
||||||
type_: ElementMessageType,
|
type_: ElementMessageType,
|
||||||
|
|
|
@ -18,7 +18,7 @@ use glib;
|
||||||
use glib::value::ToValue;
|
use glib::value::ToValue;
|
||||||
use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibPtr};
|
use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibPtr};
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
use glib::translate::FromGlibPtrContainer;
|
use glib::translate::FromGlibPtrContainer;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
@ -138,7 +138,7 @@ impl GstRc<EventRef> {
|
||||||
SegmentBuilder::new(segment)
|
SegmentBuilder::new(segment)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_stream_collection<'a>(
|
pub fn new_stream_collection<'a>(
|
||||||
stream_collection: &'a ::StreamCollection,
|
stream_collection: &'a ::StreamCollection,
|
||||||
) -> StreamCollectionBuilder<'a> {
|
) -> StreamCollectionBuilder<'a> {
|
||||||
|
@ -169,7 +169,7 @@ impl GstRc<EventRef> {
|
||||||
SinkMessageBuilder::new(name, msg)
|
SinkMessageBuilder::new(name, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_stream_group_done<'a>(group_id: u32) -> StreamGroupDoneBuilder<'a> {
|
pub fn new_stream_group_done<'a>(group_id: u32) -> StreamGroupDoneBuilder<'a> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
StreamGroupDoneBuilder::new(group_id)
|
StreamGroupDoneBuilder::new(group_id)
|
||||||
|
@ -262,7 +262,7 @@ impl GstRc<EventRef> {
|
||||||
TocSelectBuilder::new(uid)
|
TocSelectBuilder::new(uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_select_streams<'a>(streams: &'a [&'a str]) -> SelectStreamsBuilder<'a> {
|
pub fn new_select_streams<'a>(streams: &'a [&'a str]) -> SelectStreamsBuilder<'a> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
SelectStreamsBuilder::new(streams)
|
SelectStreamsBuilder::new(streams)
|
||||||
|
@ -418,7 +418,7 @@ impl<'a> Segment<'a> {
|
||||||
|
|
||||||
pub struct StreamCollection<'a>(&'a EventRef);
|
pub struct StreamCollection<'a>(&'a EventRef);
|
||||||
impl<'a> StreamCollection<'a> {
|
impl<'a> StreamCollection<'a> {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_stream_collection(&self) -> ::StreamCollection {
|
pub fn get_stream_collection(&self) -> ::StreamCollection {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut stream_collection = ptr::null_mut();
|
let mut stream_collection = ptr::null_mut();
|
||||||
|
@ -480,7 +480,7 @@ impl<'a> SinkMessage<'a> {
|
||||||
|
|
||||||
pub struct StreamGroupDone<'a>(&'a EventRef);
|
pub struct StreamGroupDone<'a>(&'a EventRef);
|
||||||
impl<'a> StreamGroupDone<'a> {
|
impl<'a> StreamGroupDone<'a> {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_group_id(&self) -> u32 {
|
pub fn get_group_id(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut group_id = mem::uninitialized();
|
let mut group_id = mem::uninitialized();
|
||||||
|
@ -688,7 +688,7 @@ impl<'a> TocSelect<'a> {
|
||||||
|
|
||||||
pub struct SelectStreams<'a>(&'a EventRef);
|
pub struct SelectStreams<'a>(&'a EventRef);
|
||||||
impl<'a> SelectStreams<'a> {
|
impl<'a> SelectStreams<'a> {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_streams(&self) -> Vec<String> {
|
pub fn get_streams(&self) -> Vec<String> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut streams = ptr::null_mut();
|
let mut streams = ptr::null_mut();
|
||||||
|
@ -889,14 +889,14 @@ impl<'a> SegmentBuilder<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub struct StreamCollectionBuilder<'a> {
|
pub struct StreamCollectionBuilder<'a> {
|
||||||
seqnum: Option<u32>,
|
seqnum: Option<u32>,
|
||||||
running_time_offset: Option<i64>,
|
running_time_offset: Option<i64>,
|
||||||
other_fields: Vec<(&'a str, &'a ToValue)>,
|
other_fields: Vec<(&'a str, &'a ToValue)>,
|
||||||
stream_collection: &'a ::StreamCollection,
|
stream_collection: &'a ::StreamCollection,
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> StreamCollectionBuilder<'a> {
|
impl<'a> StreamCollectionBuilder<'a> {
|
||||||
fn new(stream_collection: &'a ::StreamCollection) -> Self {
|
fn new(stream_collection: &'a ::StreamCollection) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
|
@ -991,14 +991,14 @@ impl<'a> SinkMessageBuilder<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub struct StreamGroupDoneBuilder<'a> {
|
pub struct StreamGroupDoneBuilder<'a> {
|
||||||
seqnum: Option<u32>,
|
seqnum: Option<u32>,
|
||||||
running_time_offset: Option<i64>,
|
running_time_offset: Option<i64>,
|
||||||
other_fields: Vec<(&'a str, &'a ToValue)>,
|
other_fields: Vec<(&'a str, &'a ToValue)>,
|
||||||
uid: u32,
|
uid: u32,
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> StreamGroupDoneBuilder<'a> {
|
impl<'a> StreamGroupDoneBuilder<'a> {
|
||||||
fn new(uid: u32) -> Self {
|
fn new(uid: u32) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
|
@ -1326,14 +1326,14 @@ impl<'a> TocSelectBuilder<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub struct SelectStreamsBuilder<'a> {
|
pub struct SelectStreamsBuilder<'a> {
|
||||||
seqnum: Option<u32>,
|
seqnum: Option<u32>,
|
||||||
running_time_offset: Option<i64>,
|
running_time_offset: Option<i64>,
|
||||||
other_fields: Vec<(&'a str, &'a ToValue)>,
|
other_fields: Vec<(&'a str, &'a ToValue)>,
|
||||||
streams: &'a [&'a str],
|
streams: &'a [&'a str],
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> SelectStreamsBuilder<'a> {
|
impl<'a> SelectStreamsBuilder<'a> {
|
||||||
fn new(streams: &'a [&'a str]) -> Self {
|
fn new(streams: &'a [&'a str]) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
|
|
|
@ -22,7 +22,7 @@ extern crate glib;
|
||||||
|
|
||||||
extern crate num_rational;
|
extern crate num_rational;
|
||||||
|
|
||||||
#[cfg(feature = "futures")]
|
#[cfg(any(feature = "futures", feature = "dox"))]
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
|
|
||||||
extern crate muldiv;
|
extern crate muldiv;
|
||||||
|
@ -118,7 +118,7 @@ pub use tag_setter::TagSetterExtManual;
|
||||||
pub use self::iterator::{Iterator, IteratorError, IteratorImpl};
|
pub use self::iterator::{Iterator, IteratorError, IteratorImpl};
|
||||||
pub use device_provider::DeviceProviderExtManual;
|
pub use device_provider::DeviceProviderExtManual;
|
||||||
pub use parse_context::ParseContext;
|
pub use parse_context::ParseContext;
|
||||||
#[cfg(feature = "futures")]
|
#[cfg(any(feature = "futures", feature = "dox"))]
|
||||||
pub use bus::BusStream;
|
pub use bus::BusStream;
|
||||||
pub use enums::{StateChangeError, StateChangeSuccess};
|
pub use enums::{StateChangeError, StateChangeSuccess};
|
||||||
pub use clock_time::ClockTime;
|
pub use clock_time::ClockTime;
|
||||||
|
|
|
@ -300,7 +300,7 @@ impl GstRc<MessageRef> {
|
||||||
DeviceRemovedBuilder::new(device)
|
DeviceRemovedBuilder::new(device)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_property_notify<'a>(
|
pub fn new_property_notify<'a>(
|
||||||
property_name: &'a str,
|
property_name: &'a str,
|
||||||
value: &'a glib::Value,
|
value: &'a glib::Value,
|
||||||
|
@ -309,7 +309,7 @@ impl GstRc<MessageRef> {
|
||||||
PropertyNotifyBuilder::new(property_name, value)
|
PropertyNotifyBuilder::new(property_name, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_stream_collection<'a>(
|
pub fn new_stream_collection<'a>(
|
||||||
collection: &'a ::StreamCollection,
|
collection: &'a ::StreamCollection,
|
||||||
) -> StreamCollectionBuilder<'a> {
|
) -> StreamCollectionBuilder<'a> {
|
||||||
|
@ -317,7 +317,7 @@ impl GstRc<MessageRef> {
|
||||||
StreamCollectionBuilder::new(collection)
|
StreamCollectionBuilder::new(collection)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_streams_selected<'a>(
|
pub fn new_streams_selected<'a>(
|
||||||
collection: &'a ::StreamCollection,
|
collection: &'a ::StreamCollection,
|
||||||
) -> StreamsSelectedBuilder<'a> {
|
) -> StreamsSelectedBuilder<'a> {
|
||||||
|
@ -325,7 +325,7 @@ impl GstRc<MessageRef> {
|
||||||
StreamsSelectedBuilder::new(collection)
|
StreamsSelectedBuilder::new(collection)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_redirect<'a>(
|
pub fn new_redirect<'a>(
|
||||||
location: &'a str,
|
location: &'a str,
|
||||||
tag_list: Option<&'a TagList>,
|
tag_list: Option<&'a TagList>,
|
||||||
|
@ -408,7 +408,7 @@ impl<'a> Error<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_details(&self) -> Option<&StructureRef> {
|
pub fn get_details(&self) -> Option<&StructureRef> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut details = ptr::null();
|
let mut details = ptr::null();
|
||||||
|
@ -446,7 +446,7 @@ impl<'a> Warning<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_details(&self) -> Option<&StructureRef> {
|
pub fn get_details(&self) -> Option<&StructureRef> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut details = ptr::null();
|
let mut details = ptr::null();
|
||||||
|
@ -484,7 +484,7 @@ impl<'a> Info<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_details(&self) -> Option<&StructureRef> {
|
pub fn get_details(&self) -> Option<&StructureRef> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut details = ptr::null();
|
let mut details = ptr::null();
|
||||||
|
@ -1008,7 +1008,7 @@ impl<'a> DeviceRemoved<'a> {
|
||||||
|
|
||||||
pub struct PropertyNotify<'a>(&'a MessageRef);
|
pub struct PropertyNotify<'a>(&'a MessageRef);
|
||||||
impl<'a> PropertyNotify<'a> {
|
impl<'a> PropertyNotify<'a> {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get(&self) -> (Object, &str, ::Value) {
|
pub fn get(&self) -> (Object, &str, ::Value) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut object = ptr::null_mut();
|
let mut object = ptr::null_mut();
|
||||||
|
@ -1033,7 +1033,7 @@ impl<'a> PropertyNotify<'a> {
|
||||||
|
|
||||||
pub struct StreamCollection<'a>(&'a MessageRef);
|
pub struct StreamCollection<'a>(&'a MessageRef);
|
||||||
impl<'a> StreamCollection<'a> {
|
impl<'a> StreamCollection<'a> {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_stream_collection(&self) -> ::StreamCollection {
|
pub fn get_stream_collection(&self) -> ::StreamCollection {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut collection = ptr::null_mut();
|
let mut collection = ptr::null_mut();
|
||||||
|
@ -1046,7 +1046,7 @@ impl<'a> StreamCollection<'a> {
|
||||||
}
|
}
|
||||||
pub struct StreamsSelected<'a>(&'a MessageRef);
|
pub struct StreamsSelected<'a>(&'a MessageRef);
|
||||||
impl<'a> StreamsSelected<'a> {
|
impl<'a> StreamsSelected<'a> {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_stream_collection(&self) -> ::StreamCollection {
|
pub fn get_stream_collection(&self) -> ::StreamCollection {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut collection = ptr::null_mut();
|
let mut collection = ptr::null_mut();
|
||||||
|
@ -1057,7 +1057,7 @@ impl<'a> StreamsSelected<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_streams(&self) -> Vec<::Stream> {
|
pub fn get_streams(&self) -> Vec<::Stream> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let n = ffi::gst_message_streams_selected_get_size(self.0.as_mut_ptr());
|
let n = ffi::gst_message_streams_selected_get_size(self.0.as_mut_ptr());
|
||||||
|
@ -1076,7 +1076,7 @@ impl<'a> StreamsSelected<'a> {
|
||||||
|
|
||||||
pub struct Redirect<'a>(&'a MessageRef);
|
pub struct Redirect<'a>(&'a MessageRef);
|
||||||
impl<'a> Redirect<'a> {
|
impl<'a> Redirect<'a> {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn get_entries(&self) -> Vec<(&str, Option<TagList>, Option<&StructureRef>)> {
|
pub fn get_entries(&self) -> Vec<(&str, Option<TagList>, Option<&StructureRef>)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let n = ffi::gst_message_get_num_redirect_entries(self.0.as_mut_ptr());
|
let n = ffi::gst_message_get_num_redirect_entries(self.0.as_mut_ptr());
|
||||||
|
@ -1220,7 +1220,7 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn details(self, details: Structure) -> Self {
|
pub fn details(self, details: Structure) -> Self {
|
||||||
Self {
|
Self {
|
||||||
details: Some(details),
|
details: Some(details),
|
||||||
|
@ -1229,7 +1229,7 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
message_builder_generic_impl!(|s: &mut Self, src| {
|
message_builder_generic_impl!(|s: &mut Self, src| {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
{
|
{
|
||||||
let details = match s.details.take() {
|
let details = match s.details.take() {
|
||||||
None => ptr::null_mut(),
|
None => ptr::null_mut(),
|
||||||
|
@ -1245,7 +1245,7 @@ impl<'a, T: MessageErrorDomain> ErrorBuilder<'a, T> {
|
||||||
details,
|
details,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "v1_10"))]
|
#[cfg(not(any(feature = "v1_10", feature = "dox")))]
|
||||||
{
|
{
|
||||||
let error = glib::Error::new(s.error, s.message);
|
let error = glib::Error::new(s.error, s.message);
|
||||||
|
|
||||||
|
@ -1288,7 +1288,7 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn details(self, details: Structure) -> Self {
|
pub fn details(self, details: Structure) -> Self {
|
||||||
Self {
|
Self {
|
||||||
details: Some(details),
|
details: Some(details),
|
||||||
|
@ -1297,7 +1297,7 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
message_builder_generic_impl!(|s: &mut Self, src| {
|
message_builder_generic_impl!(|s: &mut Self, src| {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
{
|
{
|
||||||
let details = match s.details.take() {
|
let details = match s.details.take() {
|
||||||
None => ptr::null_mut(),
|
None => ptr::null_mut(),
|
||||||
|
@ -1313,7 +1313,7 @@ impl<'a, T: MessageErrorDomain> WarningBuilder<'a, T> {
|
||||||
details,
|
details,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "v1_10"))]
|
#[cfg(not(any(feature = "v1_10", feature = "dox")))]
|
||||||
{
|
{
|
||||||
let error = glib::Error::new(s.error, s.message);
|
let error = glib::Error::new(s.error, s.message);
|
||||||
|
|
||||||
|
@ -1356,7 +1356,7 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn details(self, details: Structure) -> Self {
|
pub fn details(self, details: Structure) -> Self {
|
||||||
Self {
|
Self {
|
||||||
details: Some(details),
|
details: Some(details),
|
||||||
|
@ -1365,7 +1365,7 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
message_builder_generic_impl!(|s: &mut Self, src| {
|
message_builder_generic_impl!(|s: &mut Self, src| {
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
{
|
{
|
||||||
let details = match s.details.take() {
|
let details = match s.details.take() {
|
||||||
None => ptr::null_mut(),
|
None => ptr::null_mut(),
|
||||||
|
@ -1381,7 +1381,7 @@ impl<'a, T: MessageErrorDomain> InfoBuilder<'a, T> {
|
||||||
details,
|
details,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "v1_10"))]
|
#[cfg(not(any(feature = "v1_10", feature = "dox")))]
|
||||||
{
|
{
|
||||||
let error = glib::Error::new(s.error, s.message);
|
let error = glib::Error::new(s.error, s.message);
|
||||||
|
|
||||||
|
@ -2219,7 +2219,7 @@ impl<'a> DeviceRemovedBuilder<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub struct PropertyNotifyBuilder<'a> {
|
pub struct PropertyNotifyBuilder<'a> {
|
||||||
src: Option<Object>,
|
src: Option<Object>,
|
||||||
seqnum: Option<u32>,
|
seqnum: Option<u32>,
|
||||||
|
@ -2227,7 +2227,7 @@ pub struct PropertyNotifyBuilder<'a> {
|
||||||
property_name: &'a str,
|
property_name: &'a str,
|
||||||
value: &'a glib::Value,
|
value: &'a glib::Value,
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> PropertyNotifyBuilder<'a> {
|
impl<'a> PropertyNotifyBuilder<'a> {
|
||||||
fn new(property_name: &'a str, value: &'a glib::Value) -> Self {
|
fn new(property_name: &'a str, value: &'a glib::Value) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
|
@ -2249,14 +2249,14 @@ impl<'a> PropertyNotifyBuilder<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub struct StreamCollectionBuilder<'a> {
|
pub struct StreamCollectionBuilder<'a> {
|
||||||
src: Option<Object>,
|
src: Option<Object>,
|
||||||
seqnum: Option<u32>,
|
seqnum: Option<u32>,
|
||||||
other_fields: Vec<(&'a str, &'a ToValue)>,
|
other_fields: Vec<(&'a str, &'a ToValue)>,
|
||||||
collection: &'a ::StreamCollection,
|
collection: &'a ::StreamCollection,
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> StreamCollectionBuilder<'a> {
|
impl<'a> StreamCollectionBuilder<'a> {
|
||||||
fn new(collection: &'a ::StreamCollection) -> Self {
|
fn new(collection: &'a ::StreamCollection) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
|
@ -2273,15 +2273,17 @@ impl<'a> StreamCollectionBuilder<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub struct StreamsSelectedBuilder<'a> {
|
pub struct StreamsSelectedBuilder<'a> {
|
||||||
src: Option<Object>,
|
src: Option<Object>,
|
||||||
seqnum: Option<u32>,
|
seqnum: Option<u32>,
|
||||||
other_fields: Vec<(&'a str, &'a ToValue)>,
|
other_fields: Vec<(&'a str, &'a ToValue)>,
|
||||||
#[cfg(feature = "v1_10")] collection: &'a ::StreamCollection,
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
#[cfg(feature = "v1_10")] streams: Option<&'a [&'a ::Stream]>,
|
collection: &'a ::StreamCollection,
|
||||||
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
|
streams: Option<&'a [&'a ::Stream]>,
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> StreamsSelectedBuilder<'a> {
|
impl<'a> StreamsSelectedBuilder<'a> {
|
||||||
fn new(collection: &'a ::StreamCollection) -> Self {
|
fn new(collection: &'a ::StreamCollection) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
|
@ -2312,7 +2314,7 @@ impl<'a> StreamsSelectedBuilder<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub struct RedirectBuilder<'a> {
|
pub struct RedirectBuilder<'a> {
|
||||||
src: Option<Object>,
|
src: Option<Object>,
|
||||||
seqnum: Option<u32>,
|
seqnum: Option<u32>,
|
||||||
|
@ -2323,7 +2325,7 @@ pub struct RedirectBuilder<'a> {
|
||||||
#[cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
|
#[cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
|
||||||
entries: Option<&'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)]>,
|
entries: Option<&'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)]>,
|
||||||
}
|
}
|
||||||
#[cfg(feature = "v1_10")]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> RedirectBuilder<'a> {
|
impl<'a> RedirectBuilder<'a> {
|
||||||
fn new(
|
fn new(
|
||||||
location: &'a str,
|
location: &'a str,
|
||||||
|
|
Loading…
Reference in a new issue