mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
Update for pad default functions API changes
This commit is contained in:
parent
2bffdec691
commit
e49138516c
29 changed files with 102 additions and 101 deletions
|
@ -1659,7 +1659,7 @@ impl AudioLoudNorm {
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::single_match)]
|
#[allow(clippy::single_match)]
|
||||||
|
@ -1682,7 +1682,7 @@ impl AudioLoudNorm {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,7 +300,7 @@ impl Decrypter {
|
||||||
}
|
}
|
||||||
QueryViewMut::Duration(q) => {
|
QueryViewMut::Duration(q) => {
|
||||||
if q.format() != gst::Format::Bytes {
|
if q.format() != gst::Format::Bytes {
|
||||||
return pad.query_default(Some(&*self.instance()), query);
|
return gst::Pad::query_default(pad, Some(&*self.instance()), query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First let's query the bytes duration upstream */
|
/* First let's query the bytes duration upstream */
|
||||||
|
@ -341,7 +341,7 @@ impl Decrypter {
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -243,9 +243,9 @@ impl Encrypter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ impl Encrypter {
|
||||||
|
|
||||||
match event.view() {
|
match event.view() {
|
||||||
EventView::Seek(_) => false,
|
EventView::Seek(_) => false,
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ impl Encrypter {
|
||||||
}
|
}
|
||||||
QueryViewMut::Duration(q) => {
|
QueryViewMut::Duration(q) => {
|
||||||
if q.format() != gst::Format::Bytes {
|
if q.format() != gst::Format::Bytes {
|
||||||
return pad.query_default(Some(&*self.instance()), query);
|
return gst::Pad::query_default(pad, Some(&*self.instance()), query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First let's query the bytes duration upstream */
|
/* First let's query the bytes duration upstream */
|
||||||
|
@ -318,7 +318,7 @@ impl Encrypter {
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ pub trait PadSrcHandler: Clone + Send + Sync + 'static {
|
||||||
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
||||||
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
||||||
|
|
||||||
pad.gst_pad().event_default(Some(element), event)
|
gst::Pad::event_default(pad.gst_pad(), Some(element), event)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn src_event_full(
|
fn src_event_full(
|
||||||
|
@ -206,7 +206,7 @@ pub trait PadSrcHandler: Clone + Send + Sync + 'static {
|
||||||
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
||||||
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
||||||
|
|
||||||
pad.gst_pad().query_default(Some(element), query)
|
gst::Pad::query_default(pad.gst_pad(), Some(element), query)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -578,7 +578,7 @@ pub trait PadSinkHandler: Clone + Send + Sync + 'static {
|
||||||
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
||||||
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
||||||
|
|
||||||
pad.gst_pad().event_default(Some(element), event)
|
gst::Pad::event_default(pad.gst_pad(), Some(element), event)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sink_event_serialized(
|
fn sink_event_serialized(
|
||||||
|
@ -598,7 +598,7 @@ pub trait PadSinkHandler: Clone + Send + Sync + 'static {
|
||||||
let pad = pad.upgrade().expect("PadSink no longer exists");
|
let pad = pad.upgrade().expect("PadSink no longer exists");
|
||||||
gst::log!(RUNTIME_CAT, obj: pad.gst_pad(), "Handling {:?}", event);
|
gst::log!(RUNTIME_CAT, obj: pad.gst_pad(), "Handling {:?}", event);
|
||||||
|
|
||||||
pad.gst_pad().event_default(Some(&element), event)
|
gst::Pad::event_default(pad.gst_pad(), Some(&element), event)
|
||||||
}
|
}
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
@ -653,7 +653,7 @@ pub trait PadSinkHandler: Clone + Send + Sync + 'static {
|
||||||
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
// Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`.
|
||||||
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
let element = unsafe { elem.unsafe_cast_ref::<gst::Element>() };
|
||||||
|
|
||||||
pad.gst_pad().query_default(Some(element), query)
|
gst::Pad::query_default(pad.gst_pad(), Some(element), query)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,10 +225,10 @@ impl TranscribeParse {
|
||||||
EventView::FlushStop(..) => {
|
EventView::FlushStop(..) => {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
*state = State::default();
|
*state = State::default();
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Eos(..) => match self.drain() {
|
EventView::Eos(..) => match self.drain() {
|
||||||
Ok(()) => pad.event_default(Some(&*self.instance()), event),
|
Ok(()) => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
gst::error!(CAT, imp: self, "failed to drain on EOS: {}", err);
|
gst::error!(CAT, imp: self, "failed to drain on EOS: {}", err);
|
||||||
element_imp_error!(
|
element_imp_error!(
|
||||||
|
@ -241,7 +241,7 @@ impl TranscribeParse {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
EventView::Segment(..) | EventView::Caps(..) => true,
|
EventView::Segment(..) | EventView::Caps(..) => true,
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -648,7 +648,7 @@ impl Transcriber {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,7 +667,7 @@ impl Transcriber {
|
||||||
},
|
},
|
||||||
EventView::FlushStart(_) => {
|
EventView::FlushStart(_) => {
|
||||||
gst::info!(CAT, imp: self, "Received flush start, disconnecting");
|
gst::info!(CAT, imp: self, "Received flush start, disconnecting");
|
||||||
let mut ret = pad.event_default(Some(&*self.instance()), event);
|
let mut ret = gst::Pad::event_default(pad, Some(&*self.instance()), event);
|
||||||
|
|
||||||
match self.srcpad.stop_task() {
|
match self.srcpad.stop_task() {
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
@ -687,7 +687,7 @@ impl Transcriber {
|
||||||
EventView::FlushStop(_) => {
|
EventView::FlushStop(_) => {
|
||||||
gst::info!(CAT, imp: self, "Received flush stop, restarting task");
|
gst::info!(CAT, imp: self, "Received flush stop, restarting task");
|
||||||
|
|
||||||
if pad.event_default(Some(&*self.instance()), event) {
|
if gst::Pad::event_default(pad, Some(&*self.instance()), event) {
|
||||||
match self.start_task() {
|
match self.start_task() {
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
gst::error!(CAT, imp: self, "Failed to start srcpad task: {}", err);
|
gst::error!(CAT, imp: self, "Failed to start srcpad task: {}", err);
|
||||||
|
@ -725,7 +725,7 @@ impl Transcriber {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
EventView::StreamStart(_) => true,
|
EventView::StreamStart(_) => true,
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -705,9 +705,9 @@ impl OnvifMetadataOverlay {
|
||||||
EventView::FlushStop(..) => {
|
EventView::FlushStop(..) => {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
state.composition = None;
|
state.composition = None;
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -821,7 +821,7 @@ impl OnvifMetadataParse {
|
||||||
drop(state);
|
drop(state);
|
||||||
self.cond.notify_all();
|
self.cond.notify_all();
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
gst::EventView::FlushStop(_) => {
|
gst::EventView::FlushStop(_) => {
|
||||||
let _ = self.srcpad.stop_task();
|
let _ = self.srcpad.stop_task();
|
||||||
|
@ -835,7 +835,7 @@ impl OnvifMetadataParse {
|
||||||
state.out_segment.set_position(gst::ClockTime::NONE);
|
state.out_segment.set_position(gst::ClockTime::NONE);
|
||||||
state.last_flow_ret = Ok(gst::FlowSuccess::Ok);
|
state.last_flow_ret = Ok(gst::FlowSuccess::Ok);
|
||||||
drop(state);
|
drop(state);
|
||||||
let mut res = pad.event_default(Some(&*self.instance()), event);
|
let mut res = gst::Pad::event_default(pad, Some(&*self.instance()), event);
|
||||||
if res {
|
if res {
|
||||||
res = self.src_start_task().is_ok();
|
res = self.src_start_task().is_ok();
|
||||||
}
|
}
|
||||||
|
@ -991,7 +991,7 @@ impl OnvifMetadataParse {
|
||||||
gst::StreamError::Failed,
|
gst::StreamError::Failed,
|
||||||
["Got EOS event before creating UTC/running time mapping"]
|
["Got EOS event before creating UTC/running time mapping"]
|
||||||
);
|
);
|
||||||
return pad.event_default(Some(&*self.instance()), event);
|
return gst::Pad::event_default(pad, Some(&*self.instance()), event);
|
||||||
}
|
}
|
||||||
|
|
||||||
let current_running_time = in_segment
|
let current_running_time = in_segment
|
||||||
|
@ -1009,7 +1009,7 @@ impl OnvifMetadataParse {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,7 +1040,7 @@ impl OnvifMetadataParse {
|
||||||
gst::fixme!(CAT, obj: pad, "Dropping allocation query");
|
gst::fixme!(CAT, obj: pad, "Dropping allocation query");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1057,7 +1057,7 @@ impl OnvifMetadataParse {
|
||||||
drop(state);
|
drop(state);
|
||||||
self.cond.notify_all();
|
self.cond.notify_all();
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
gst::EventView::FlushStop(_) => {
|
gst::EventView::FlushStop(_) => {
|
||||||
let _ = self.srcpad.stop_task();
|
let _ = self.srcpad.stop_task();
|
||||||
|
@ -1071,13 +1071,13 @@ impl OnvifMetadataParse {
|
||||||
state.out_segment.set_position(gst::ClockTime::NONE);
|
state.out_segment.set_position(gst::ClockTime::NONE);
|
||||||
state.last_flow_ret = Ok(gst::FlowSuccess::Ok);
|
state.last_flow_ret = Ok(gst::FlowSuccess::Ok);
|
||||||
drop(state);
|
drop(state);
|
||||||
let mut res = pad.event_default(Some(&*self.instance()), event);
|
let mut res = gst::Pad::event_default(pad, Some(&*self.instance()), event);
|
||||||
if res {
|
if res {
|
||||||
res = self.src_start_task().is_ok();
|
res = self.src_start_task().is_ok();
|
||||||
}
|
}
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1132,7 +1132,7 @@ impl OnvifMetadataParse {
|
||||||
|
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -497,7 +497,7 @@ impl RaptorqDec {
|
||||||
self.reset();
|
self.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fec_sink_event(&self, pad: &gst::Pad, event: gst::Event) -> bool {
|
fn fec_sink_event(&self, pad: &gst::Pad, event: gst::Event) -> bool {
|
||||||
|
@ -516,7 +516,7 @@ impl RaptorqDec {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn iterate_internal_links(&self, pad: &gst::Pad) -> gst::Iterator<gst::Pad> {
|
fn iterate_internal_links(&self, pad: &gst::Pad) -> gst::Iterator<gst::Pad> {
|
||||||
|
|
|
@ -543,7 +543,7 @@ impl RaptorqEnc {
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn iterate_internal_links(&self, pad: &gst::Pad) -> gst::Iterator<gst::Pad> {
|
fn iterate_internal_links(&self, pad: &gst::Pad) -> gst::Iterator<gst::Pad> {
|
||||||
|
|
|
@ -304,7 +304,7 @@ impl TextAhead {
|
||||||
while !state.pending.is_empty() {
|
while !state.pending.is_empty() {
|
||||||
let _ = self.push_pending(&mut state);
|
let _ = self.push_pending(&mut state);
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
gst::EventView::Caps(_caps) => {
|
gst::EventView::Caps(_caps) => {
|
||||||
// set caps on src pad
|
// set caps on src pad
|
||||||
|
@ -326,9 +326,9 @@ impl TextAhead {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,8 +169,8 @@ impl JsonGstEnc {
|
||||||
let caps = gst::Caps::builder("application/x-json").build();
|
let caps = gst::Caps::builder("application/x-json").build();
|
||||||
self.srcpad.push_event(gst::event::Caps::new(&caps))
|
self.srcpad.push_event(gst::event::Caps::new(&caps))
|
||||||
}
|
}
|
||||||
EventView::Eos(_) => pad.event_default(Some(&*self.instance()), event),
|
EventView::Eos(_) => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -633,14 +633,14 @@ impl JsonGstParse {
|
||||||
self.flush(&mut state);
|
self.flush(&mut state);
|
||||||
drop(state);
|
drop(state);
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Eos(_) => {
|
EventView::Eos(_) => {
|
||||||
gst::log!(CAT, obj: pad, "Draining");
|
gst::log!(CAT, obj: pad, "Draining");
|
||||||
if let Err(err) = self.handle_buffer(None) {
|
if let Err(err) = self.handle_buffer(None) {
|
||||||
gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err);
|
gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err);
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if event.is_sticky()
|
if event.is_sticky()
|
||||||
|
@ -652,7 +652,7 @@ impl JsonGstParse {
|
||||||
state.pending_events.push(event);
|
state.pending_events.push(event);
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -757,7 +757,7 @@ impl JsonGstParse {
|
||||||
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
||||||
match event.view() {
|
match event.view() {
|
||||||
EventView::Seek(e) => self.perform_seek(e),
|
EventView::Seek(e) => self.perform_seek(e),
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ impl JsonGstParse {
|
||||||
self.sinkpad.peer_query(query)
|
self.sinkpad.peer_query(query)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,7 +324,7 @@ impl TextWrap {
|
||||||
if state.start_ts.is_some() {
|
if state.start_ts.is_some() {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EventView::FlushStart(_) => {
|
EventView::FlushStart(_) => {
|
||||||
|
@ -333,7 +333,7 @@ impl TextWrap {
|
||||||
*state = State::default();
|
*state = State::default();
|
||||||
state.options = options;
|
state.options = options;
|
||||||
drop(state);
|
drop(state);
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Eos(_) => {
|
EventView::Eos(_) => {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
|
@ -357,9 +357,9 @@ impl TextWrap {
|
||||||
} else {
|
} else {
|
||||||
drop(state);
|
drop(state);
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ impl TextWrap {
|
||||||
}
|
}
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -953,7 +953,7 @@ impl FallbackSwitch {
|
||||||
self.active_sinkpad.lock().as_ref() == Some(pad)
|
self.active_sinkpad.lock().as_ref() == Some(pad)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
pad.query_default(Some(&*self.instance()), query);
|
gst::Pad::query_default(pad, Some(&*self.instance()), query);
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1017,7 +1017,7 @@ impl FallbackSwitch {
|
||||||
if let Some(sinkpad) = sinkpad {
|
if let Some(sinkpad) = sinkpad {
|
||||||
sinkpad.peer_query(query)
|
sinkpad.peer_query(query)
|
||||||
} else {
|
} else {
|
||||||
pad.query_default(Some(&*self.instance()), query)
|
gst::Pad::query_default(pad, Some(&*self.instance()), query)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
|
@ -1360,7 +1360,7 @@ impl UriPlaylistBin {
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
_ => pad.event_default(parent, event),
|
_ => gst::Pad::event_default(pad, parent, event),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -527,9 +527,9 @@ impl Cea608Overlay {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
state.caption_frame = CaptionFrame::default();
|
state.caption_frame = CaptionFrame::default();
|
||||||
state.composition = None;
|
state.composition = None;
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -932,7 +932,7 @@ impl Cea608ToJson {
|
||||||
*state = State::default();
|
*state = State::default();
|
||||||
state.settings = old_settings;
|
state.settings = old_settings;
|
||||||
drop(state);
|
drop(state);
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Eos(..) => {
|
EventView::Eos(..) => {
|
||||||
if let Some(lines) = self.state.borrow_mut().drain_pending(self) {
|
if let Some(lines) = self.state.borrow_mut().drain_pending(self) {
|
||||||
|
@ -942,9 +942,9 @@ impl Cea608ToJson {
|
||||||
let _ = self.output(lines);
|
let _ = self.output(lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,7 +367,7 @@ impl Cea608ToTt {
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -435,10 +435,10 @@ impl JsonToVtt {
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event);
|
gst::Pad::event_default(pad, Some(&*self.instance()), event);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ impl JsonToVtt {
|
||||||
let buffers = state.handle_eos(self);
|
let buffers = state.handle_eos(self);
|
||||||
drop(state);
|
drop(state);
|
||||||
let _ = self.output(buffers);
|
let _ = self.output(buffers);
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Caps(..) => {
|
EventView::Caps(..) => {
|
||||||
let mut downstream_caps = match self.srcpad.allowed_caps() {
|
let mut downstream_caps = match self.srcpad.allowed_caps() {
|
||||||
|
@ -506,7 +506,7 @@ impl JsonToVtt {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* FIXME: Handle segment updates by draining? */
|
/* FIXME: Handle segment updates by draining? */
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Gap(ev) => {
|
EventView::Gap(ev) => {
|
||||||
gst::log!(CAT, obj: pad, "Handling gap {:?}", ev);
|
gst::log!(CAT, obj: pad, "Handling gap {:?}", ev);
|
||||||
|
@ -516,7 +516,7 @@ impl JsonToVtt {
|
||||||
let _ = self.output(buffers);
|
let _ = self.output(buffers);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -375,7 +375,7 @@ impl MccEnc {
|
||||||
.build();
|
.build();
|
||||||
self.srcpad.push_event(gst::event::Caps::new(&caps))
|
self.srcpad.push_event(gst::event::Caps::new(&caps))
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ impl MccEnc {
|
||||||
gst::log!(CAT, obj: pad, "Dropping seek event");
|
gst::log!(CAT, obj: pad, "Dropping seek event");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ impl MccEnc {
|
||||||
);
|
);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -883,14 +883,14 @@ impl MccParse {
|
||||||
let state = self.flush(state);
|
let state = self.flush(state);
|
||||||
drop(state);
|
drop(state);
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Eos(_) => {
|
EventView::Eos(_) => {
|
||||||
gst::log!(CAT, obj: pad, "Draining");
|
gst::log!(CAT, obj: pad, "Draining");
|
||||||
if let Err(err) = self.handle_buffer(None, false) {
|
if let Err(err) = self.handle_buffer(None, false) {
|
||||||
gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err);
|
gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err);
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if event.is_sticky()
|
if event.is_sticky()
|
||||||
|
@ -902,7 +902,7 @@ impl MccParse {
|
||||||
state.pending_events.push(event);
|
state.pending_events.push(event);
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1007,7 +1007,7 @@ impl MccParse {
|
||||||
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
||||||
match event.view() {
|
match event.view() {
|
||||||
EventView::Seek(e) => self.perform_seek(e),
|
EventView::Seek(e) => self.perform_seek(e),
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1061,7 +1061,7 @@ impl MccParse {
|
||||||
self.sinkpad.peer_query(query)
|
self.sinkpad.peer_query(query)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,9 +307,9 @@ impl SccEnc {
|
||||||
gst::error!(CAT, obj: pad, "Failed to write a line after EOS: {:?}", err);
|
gst::error!(CAT, obj: pad, "Failed to write a line after EOS: {:?}", err);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ impl SccEnc {
|
||||||
gst::log!(CAT, obj: pad, "Dropping seek event");
|
gst::log!(CAT, obj: pad, "Dropping seek event");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ impl SccEnc {
|
||||||
);
|
);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -762,14 +762,14 @@ impl SccParse {
|
||||||
let state = self.flush(state);
|
let state = self.flush(state);
|
||||||
drop(state);
|
drop(state);
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Eos(_) => {
|
EventView::Eos(_) => {
|
||||||
gst::log!(CAT, obj: pad, "Draining");
|
gst::log!(CAT, obj: pad, "Draining");
|
||||||
if let Err(err) = self.handle_buffer(None) {
|
if let Err(err) = self.handle_buffer(None) {
|
||||||
gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err);
|
gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err);
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if event.is_sticky()
|
if event.is_sticky()
|
||||||
|
@ -781,7 +781,7 @@ impl SccParse {
|
||||||
state.pending_events.push(event);
|
state.pending_events.push(event);
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -886,7 +886,7 @@ impl SccParse {
|
||||||
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
||||||
match event.view() {
|
match event.view() {
|
||||||
EventView::Seek(e) => self.perform_seek(e),
|
EventView::Seek(e) => self.perform_seek(e),
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,7 +940,7 @@ impl SccParse {
|
||||||
self.sinkpad.peer_query(query)
|
self.sinkpad.peer_query(query)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,7 +411,8 @@ impl TranscriberBin {
|
||||||
QueryViewMut::Latency(q) => {
|
QueryViewMut::Latency(q) => {
|
||||||
let mut upstream_query = gst::query::Latency::new();
|
let mut upstream_query = gst::query::Latency::new();
|
||||||
|
|
||||||
let ret = pad.query_default(Some(&*self.instance()), &mut upstream_query);
|
let ret =
|
||||||
|
gst::Pad::query_default(pad, Some(&*self.instance()), &mut upstream_query);
|
||||||
|
|
||||||
if ret {
|
if ret {
|
||||||
let (_, mut min, _) = upstream_query.result();
|
let (_, mut min, _) = upstream_query.result();
|
||||||
|
@ -436,7 +437,7 @@ impl TranscriberBin {
|
||||||
|
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,9 +511,9 @@ impl TranscriberBin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -929,7 +929,7 @@ impl TtToCea608 {
|
||||||
drop(state);
|
drop(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::FlushStop(_) => {
|
EventView::FlushStop(_) => {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
|
@ -946,9 +946,9 @@ impl TtToCea608 {
|
||||||
drop(settings);
|
drop(settings);
|
||||||
drop(state);
|
drop(state);
|
||||||
|
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,8 +132,8 @@ impl TtToJson {
|
||||||
.build();
|
.build();
|
||||||
self.srcpad.push_event(gst::event::Caps::new(&caps))
|
self.srcpad.push_event(gst::event::Caps::new(&caps))
|
||||||
}
|
}
|
||||||
EventView::Eos(_) => pad.event_default(Some(&*self.instance()), event),
|
EventView::Eos(_) => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,21 +370,21 @@ impl FlvDemux {
|
||||||
match event.view() {
|
match event.view() {
|
||||||
EventView::Eos(..) => {
|
EventView::Eos(..) => {
|
||||||
// TODO implement
|
// TODO implement
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Segment(..) => {
|
EventView::Segment(..) => {
|
||||||
// TODO implement
|
// TODO implement
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::FlushStart(..) => {
|
EventView::FlushStart(..) => {
|
||||||
// TODO implement
|
// TODO implement
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::FlushStop(..) => {
|
EventView::FlushStop(..) => {
|
||||||
// TODO implement
|
// TODO implement
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ impl FlvDemux {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => pad.query_default(Some(&*self.instance()), query),
|
_ => gst::Pad::query_default(pad, Some(&*self.instance()), query),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ impl FlvDemux {
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,16 +241,16 @@ impl WebPDec {
|
||||||
EventView::FlushStop(..) => {
|
EventView::FlushStop(..) => {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
*state = State::default();
|
*state = State::default();
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Eos(..) => {
|
EventView::Eos(..) => {
|
||||||
if let Err(err) = self.decode() {
|
if let Err(err) = self.decode() {
|
||||||
self.post_error_message(err);
|
self.post_error_message(err);
|
||||||
}
|
}
|
||||||
pad.event_default(Some(&*self.instance()), event)
|
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||||
}
|
}
|
||||||
EventView::Segment(..) => true,
|
EventView::Segment(..) => true,
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ impl WebPDec {
|
||||||
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
gst::log!(CAT, obj: pad, "Handling event {:?}", event);
|
||||||
match event.view() {
|
match event.view() {
|
||||||
EventView::Seek(..) => false,
|
EventView::Seek(..) => false,
|
||||||
_ => pad.event_default(Some(&*self.instance()), event),
|
_ => gst::Pad::event_default(pad, Some(&*self.instance()), event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue