mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 11:31:06 +00:00
gstreamer: Remove API that was deprecated in 0.16
This commit is contained in:
parent
23174629b6
commit
a4239c3462
3 changed files with 0 additions and 855 deletions
|
@ -240,308 +240,6 @@ impl EventRef {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Event {
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::FlushStart::new` or `event::FlushStart::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_flush_start<'a>() -> FlushStartBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
FlushStartBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::FlushStop::new` or `event::FlushStop::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_flush_stop<'a>(reset_time: bool) -> FlushStopBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
FlushStopBuilder::new(reset_time)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::StreamStart::new` or `event::StreamStart::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_stream_start(stream_id: &str) -> StreamStartBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StreamStartBuilder::new(stream_id)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Caps::new` or `event::Caps::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_caps(caps: &::Caps) -> CapsBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
CapsBuilder::new(caps)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Segment::new` or `event::Segment::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_segment<F: ::FormattedValue>(segment: &::FormattedSegment<F>) -> SegmentBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
SegmentBuilder::new(segment.as_ref())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::StreamCollection::new` or `event::StreamCollection::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_stream_collection(
|
|
||||||
stream_collection: &::StreamCollection,
|
|
||||||
) -> StreamCollectionBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StreamCollectionBuilder::new(stream_collection)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Tag::new` or `event::Tag::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_tag<'a>(tags: ::TagList) -> TagBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
TagBuilder::new(tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::BufferSize::new` or `event::BufferSize::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_buffer_size<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
minsize: V,
|
|
||||||
maxsize: V,
|
|
||||||
async: bool,
|
|
||||||
) -> BufferSizeBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
let minsize = minsize.into();
|
|
||||||
let maxsize = maxsize.into();
|
|
||||||
assert_eq!(minsize.get_format(), maxsize.get_format());
|
|
||||||
|
|
||||||
BufferSizeBuilder::new(minsize, maxsize, async)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::SinkMessage::new` or `event::SinkMessage::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_sink_message<'a>(name: &'a str, msg: &'a ::Message) -> SinkMessageBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
SinkMessageBuilder::new(name, msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::StreamGroupDone::new` or `event::StreamGroupDone::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_stream_group_done<'a>(group_id: GroupId) -> StreamGroupDoneBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StreamGroupDoneBuilder::new(group_id)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Eos::new` or `event::Eos::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_eos<'a>() -> EosBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
EosBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Toc::new` or `event::Toc::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_toc(toc: &::Toc, updated: bool) -> TocBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
TocBuilder::new(toc, updated)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Protection::new` or `event::Protection::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_protection<'a>(system_id: &'a str, data: &'a ::Buffer) -> ProtectionBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ProtectionBuilder::new(system_id, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::SegmentDone::new` or `event::SegmentDone::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_segment_done<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
position: V,
|
|
||||||
) -> SegmentDoneBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
let position = position.into();
|
|
||||||
SegmentDoneBuilder::new(position)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Gap::new` or `event::Gap::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_gap<'a>(timestamp: ::ClockTime, duration: ::ClockTime) -> GapBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
GapBuilder::new(timestamp, duration)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Qos::new` or `event::Qos::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_qos<'a>(
|
|
||||||
type_: ::QOSType,
|
|
||||||
proportion: f64,
|
|
||||||
diff: i64,
|
|
||||||
timestamp: ::ClockTime,
|
|
||||||
) -> QosBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
QosBuilder::new(type_, proportion, diff, timestamp)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Seek::new` or `event::Seek::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_seek<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
rate: f64,
|
|
||||||
flags: ::SeekFlags,
|
|
||||||
start_type: ::SeekType,
|
|
||||||
start: V,
|
|
||||||
stop_type: ::SeekType,
|
|
||||||
stop: V,
|
|
||||||
) -> SeekBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
let start = start.into();
|
|
||||||
let stop = stop.into();
|
|
||||||
assert_eq!(start.get_format(), stop.get_format());
|
|
||||||
|
|
||||||
SeekBuilder::new(rate, flags, start_type, start, stop_type, stop)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Navigation::new` or `event::Navigation::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_navigation<'a>(structure: ::Structure) -> NavigationBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
NavigationBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Latency::new` or `event::Latency::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_latency<'a>(latency: ::ClockTime) -> LatencyBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
LatencyBuilder::new(latency)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Step::new` or `event::Step::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_step<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
amount: V,
|
|
||||||
rate: f64,
|
|
||||||
flush: bool,
|
|
||||||
intermediate: bool,
|
|
||||||
) -> StepBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StepBuilder::new(amount.into(), rate, flush, intermediate)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::Reconfigure::new` or `event::Reconfigure::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_reconfigure<'a>() -> ReconfigureBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ReconfigureBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::TocSelect::new` or `event::TocSelect::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_toc_select(uid: &str) -> TocSelectBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
TocSelectBuilder::new(uid)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::SelectStreams::new` or `event::SelectStreams::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_select_streams<'a>(streams: &'a [&'a str]) -> SelectStreamsBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
SelectStreamsBuilder::new(streams)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::CustomUpstream::new` or `event::CustomUpstream::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_custom_upstream<'a>(structure: ::Structure) -> CustomUpstreamBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
CustomUpstreamBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::CustomDownstream::new` or `event::CustomDownstream::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_custom_downstream<'a>(structure: ::Structure) -> CustomDownstreamBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
CustomDownstreamBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::CustomDownstreamOob::new` or `event::CustomDownstreamOob::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_custom_downstream_oob<'a>(structure: ::Structure) -> CustomDownstreamOobBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
CustomDownstreamOobBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::CustomDownstreamSticky::new` or `event::CustomDownstreamSticky::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_custom_downstream_sticky<'a>(
|
|
||||||
structure: ::Structure,
|
|
||||||
) -> CustomDownstreamStickyBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
CustomDownstreamStickyBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::CustomBoth::new` or `event::CustomBoth::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_custom_both<'a>(structure: ::Structure) -> CustomBothBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
CustomBothBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `event::CustomBothOob::new` or `event::CustomBothOob::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_custom_both_oob<'a>(structure: ::Structure) -> CustomBothOobBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
CustomBothOobBuilder::new(structure)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl fmt::Debug for Event {
|
impl fmt::Debug for Event {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
EventRef::fmt(self, f)
|
EventRef::fmt(self, f)
|
||||||
|
|
|
@ -117,402 +117,6 @@ impl MessageRef {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Message {
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Eos::new` or `message::Eos::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_eos<'a>() -> EosBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
EosBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Error::new` or `message::Error::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_error<T: MessageErrorDomain>(error: T, message: &str) -> ErrorBuilder<T> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ErrorBuilder::new(error, message)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Warning::new` or `message::Warning::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_warning<T: MessageErrorDomain>(error: T, message: &str) -> WarningBuilder<T> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
WarningBuilder::new(error, message)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Info::new` or `message::Info::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_info<T: MessageErrorDomain>(error: T, message: &str) -> InfoBuilder<T> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
InfoBuilder::new(error, message)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Tag::new` or `message::Tag::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_tag(tags: &TagList) -> TagBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
TagBuilder::new(tags)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Buffering::new` or `message::Buffering::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_buffering<'a>(percent: i32) -> BufferingBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
BufferingBuilder::new(percent)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StateChanged::new` or `message::StateChanged::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_state_changed<'a>(
|
|
||||||
old: ::State,
|
|
||||||
new: ::State,
|
|
||||||
pending: ::State,
|
|
||||||
) -> StateChangedBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StateChangedBuilder::new(old, new, pending)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StateDirty::new` or `message::StateDirty::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_state_dirty<'a>() -> StateDirtyBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StateDirtyBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StepDone::new` or `message::StepDone::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_step_done<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
amount: V,
|
|
||||||
rate: f64,
|
|
||||||
flush: bool,
|
|
||||||
intermediate: bool,
|
|
||||||
duration: V,
|
|
||||||
eos: bool,
|
|
||||||
) -> StepDoneBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StepDoneBuilder::new(
|
|
||||||
amount.into(),
|
|
||||||
rate,
|
|
||||||
flush,
|
|
||||||
intermediate,
|
|
||||||
duration.into(),
|
|
||||||
eos,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::ClockProvide::new` or `message::ClockProvide::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_clock_provide(clock: &::Clock, ready: bool) -> ClockProvideBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ClockProvideBuilder::new(clock, ready)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::ClockLost::new` or `message::ClockLost::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_clock_lost(clock: &::Clock) -> ClockLostBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ClockLostBuilder::new(clock)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::NewClock::new` or `message::NewClock::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_new_clock(clock: &::Clock) -> NewClockBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
NewClockBuilder::new(clock)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StructureChange::new` or `message::StructureChange::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_structure_change(
|
|
||||||
type_: ::StructureChangeType,
|
|
||||||
owner: &::Element,
|
|
||||||
busy: bool,
|
|
||||||
) -> StructureChangeBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StructureChangeBuilder::new(type_, owner, busy)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StreamStatus::new` or `message::StreamStatus::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_stream_status(type_: ::StreamStatusType, owner: &::Element) -> StreamStatusBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StreamStatusBuilder::new(type_, owner)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Application::new` or `message::Application::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_application<'a>(structure: ::Structure) -> ApplicationBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ApplicationBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Element::new` or `message::Element::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_element<'a>(structure: ::Structure) -> ElementBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ElementBuilder::new(structure)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::SegmentStart::new` or `message::SegmentStart::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_segment_start<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
position: V,
|
|
||||||
) -> SegmentStartBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
let position = position.into();
|
|
||||||
SegmentStartBuilder::new(position)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::SegmentDone::new` or `message::SegmentDone::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_segment_done<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
position: V,
|
|
||||||
) -> SegmentDoneBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
let position = position.into();
|
|
||||||
SegmentDoneBuilder::new(position)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::DurationChanged::new` or `message::DurationChanged::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_duration_changed<'a>() -> DurationChangedBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
DurationChangedBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Latency::new` or `message::Latency::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_latency<'a>() -> LatencyBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
LatencyBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::AsyncStart::new` or `message::AsyncStart::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_async_start<'a>() -> AsyncStartBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
AsyncStartBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::AsyncDone::new` or `message::AsyncDone::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_async_done<'a>(running_time: ::ClockTime) -> AsyncDoneBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
AsyncDoneBuilder::new(running_time)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::RequestState::new` or `message::RequestState::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_request_state<'a>(state: ::State) -> RequestStateBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
RequestStateBuilder::new(state)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StepStart::new` or `message::StepStart::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_step_start<'a, V: Into<GenericFormattedValue>>(
|
|
||||||
active: bool,
|
|
||||||
amount: V,
|
|
||||||
rate: f64,
|
|
||||||
flush: bool,
|
|
||||||
intermediate: bool,
|
|
||||||
) -> StepStartBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StepStartBuilder::new(active, amount.into(), rate, flush, intermediate)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Qos::new` or `message::Qos::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_qos_builder<'a>(
|
|
||||||
live: bool,
|
|
||||||
running_time: ::ClockTime,
|
|
||||||
stream_time: ::ClockTime,
|
|
||||||
timestamp: ::ClockTime,
|
|
||||||
duration: ::ClockTime,
|
|
||||||
) -> QosBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
QosBuilder::new(live, running_time, stream_time, timestamp, duration)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Progress::new` or `message::Progress::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_progress<'a>(
|
|
||||||
type_: ::ProgressType,
|
|
||||||
code: &'a str,
|
|
||||||
text: &'a str,
|
|
||||||
) -> ProgressBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ProgressBuilder::new(type_, code, text)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Toc::new` or `message::Toc::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_toc(toc: &::Toc, updated: bool) -> TocBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
TocBuilder::new(toc, updated)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::ResetTime::new` or `message::ResetTime::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_reset_time<'a>(running_time: ::ClockTime) -> ResetTimeBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
ResetTimeBuilder::new(running_time)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StreamStart::new` or `message::StreamStart::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_stream_start<'a>() -> StreamStartBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StreamStartBuilder::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::NeedContext::new` or `message::NeedContext::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_need_context(context_type: &str) -> NeedContextBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
NeedContextBuilder::new(context_type)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::HaveContext::new` or `message::HaveContext::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_have_context<'a>(context: ::Context) -> HaveContextBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
HaveContextBuilder::new(context)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::DeviceAdded::new` or `message::DeviceAdded::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_device_added(device: &::Device) -> DeviceAddedBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
DeviceAddedBuilder::new(device)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::DeviceRemoved::new` or `message::DeviceRemoved::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_device_removed(device: &::Device) -> DeviceRemovedBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
DeviceRemovedBuilder::new(device)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::PropertyNotify::new` or `message::PropertyNotify::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_property_notify(property_name: &str) -> PropertyNotifyBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
PropertyNotifyBuilder::new(property_name)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StreamCollection::new` or `message::StreamCollection::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_stream_collection(collection: &::StreamCollection) -> StreamCollectionBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StreamCollectionBuilder::new(collection)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::StreamsSelected::new` or `message::StreamsSelected::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_streams_selected(collection: &::StreamCollection) -> StreamsSelectedBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
StreamsSelectedBuilder::new(collection)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::Redirect::new` or `message::Redirect::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_redirect(location: &str) -> RedirectBuilder {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
RedirectBuilder::new(location)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.16.0",
|
|
||||||
note = "use `message::DeviceChanged::new` or `message::DeviceChanged::builder` instead"
|
|
||||||
)]
|
|
||||||
pub fn new_device_changed<'a>(
|
|
||||||
device: &'a ::Device,
|
|
||||||
changed_device: &'a ::Device,
|
|
||||||
) -> DeviceChangedBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
DeviceChangedBuilder::new(device, changed_device)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl fmt::Debug for Message {
|
impl fmt::Debug for Message {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
MessageRef::fmt(self, f)
|
MessageRef::fmt(self, f)
|
||||||
|
|
|
@ -24,163 +24,6 @@ gst_define_mini_object_wrapper!(Query, QueryRef, gst_sys::GstQuery, || {
|
||||||
gst_sys::gst_query_get_type()
|
gst_sys::gst_query_get_type()
|
||||||
});
|
});
|
||||||
|
|
||||||
impl Query {
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Position::new` instead")]
|
|
||||||
pub fn new_position(fmt: ::Format) -> Position<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Position::<Self>(from_glib_full(gst_sys::gst_query_new_position(
|
|
||||||
fmt.to_glib(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Duration::new` instead")]
|
|
||||||
pub fn new_duration(fmt: ::Format) -> Duration<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Duration::<Self>(from_glib_full(gst_sys::gst_query_new_duration(
|
|
||||||
fmt.to_glib(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Latency::new` instead")]
|
|
||||||
pub fn new_latency() -> Latency<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe { Latency::<Self>(from_glib_full(gst_sys::gst_query_new_latency())) }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Seeking::new` instead")]
|
|
||||||
pub fn new_seeking(fmt: ::Format) -> Seeking<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Seeking::<Self>(from_glib_full(gst_sys::gst_query_new_seeking(
|
|
||||||
fmt.to_glib(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Segment::new` instead")]
|
|
||||||
pub fn new_segment(fmt: ::Format) -> Segment<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Segment::<Self>(from_glib_full(gst_sys::gst_query_new_segment(
|
|
||||||
fmt.to_glib(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Convert::new` instead")]
|
|
||||||
pub fn new_convert<V: Into<GenericFormattedValue>>(
|
|
||||||
value: V,
|
|
||||||
dest_fmt: ::Format,
|
|
||||||
) -> Convert<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
let value = value.into();
|
|
||||||
unsafe {
|
|
||||||
Convert::<Self>(from_glib_full(gst_sys::gst_query_new_convert(
|
|
||||||
value.get_format().to_glib(),
|
|
||||||
value.get_value(),
|
|
||||||
dest_fmt.to_glib(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Formats::new` instead")]
|
|
||||||
pub fn new_formats() -> Formats<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe { Formats::<Self>(from_glib_full(gst_sys::gst_query_new_formats())) }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Buffering::new` instead")]
|
|
||||||
pub fn new_buffering(fmt: ::Format) -> Buffering<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Buffering::<Self>(from_glib_full(gst_sys::gst_query_new_buffering(
|
|
||||||
fmt.to_glib(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Custom::new` instead")]
|
|
||||||
pub fn new_custom(structure: ::Structure) -> Custom<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Custom::<Self>(from_glib_full(gst_sys::gst_query_new_custom(
|
|
||||||
gst_sys::GST_QUERY_CUSTOM,
|
|
||||||
structure.into_ptr(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Uri::new` instead")]
|
|
||||||
pub fn new_uri() -> Uri<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe { Uri::<Self>(from_glib_full(gst_sys::gst_query_new_uri())) }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Allocation::new` instead")]
|
|
||||||
pub fn new_allocation(caps: &::Caps, need_pool: bool) -> Allocation<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Allocation::<Self>(from_glib_full(gst_sys::gst_query_new_allocation(
|
|
||||||
caps.as_mut_ptr(),
|
|
||||||
need_pool.to_glib(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Scheduling::new` instead")]
|
|
||||||
pub fn new_scheduling() -> Scheduling<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe { Scheduling::<Self>(from_glib_full(gst_sys::gst_query_new_scheduling())) }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::AcceptCaps::new` instead")]
|
|
||||||
pub fn new_accept_caps(caps: &::Caps) -> AcceptCaps<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
AcceptCaps::<Self>(from_glib_full(gst_sys::gst_query_new_accept_caps(
|
|
||||||
caps.as_mut_ptr(),
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Caps::new` instead")]
|
|
||||||
pub fn new_caps(filter: Option<&::Caps>) -> Caps<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Caps::<Self>(from_glib_full(gst_sys::gst_query_new_caps(
|
|
||||||
filter.to_glib_none().0,
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Drain::new` instead")]
|
|
||||||
pub fn new_drain() -> Drain<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe { Drain::<Self>(from_glib_full(gst_sys::gst_query_new_drain())) }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Context::new` instead")]
|
|
||||||
pub fn new_context(context_type: &str) -> Context<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
|
||||||
Context::<Self>(from_glib_full(gst_sys::gst_query_new_context(
|
|
||||||
context_type.to_glib_none().0,
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
||||||
#[deprecated(since = "0.16.0", note = "use `query::Bitrate::new` instead")]
|
|
||||||
pub fn new_bitrate() -> Bitrate<Self> {
|
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe { Bitrate::<Self>(from_glib_full(gst_sys::gst_query_new_bitrate())) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl QueryRef {
|
impl QueryRef {
|
||||||
pub fn get_structure(&self) -> Option<&StructureRef> {
|
pub fn get_structure(&self) -> Option<&StructureRef> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in a new issue