mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
tracer: Make buffer in pull-range-post function optional
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/410
This commit is contained in:
parent
bff1354b74
commit
ade0aad6b0
1 changed files with 4 additions and 3 deletions
|
@ -46,7 +46,8 @@ pub trait TracerImpl: TracerImplExt + GstObjectImpl + Send + Sync {
|
||||||
fn object_unreffed(&self, ts: u64, object: &Object, new_refcount: i32) {}
|
fn object_unreffed(&self, ts: u64, object: &Object, new_refcount: i32) {}
|
||||||
fn pad_link_post(&self, ts: u64, src: &Pad, sink: &Pad, result: PadLinkReturn) {}
|
fn pad_link_post(&self, ts: u64, src: &Pad, sink: &Pad, result: PadLinkReturn) {}
|
||||||
fn pad_link_pre(&self, ts: u64, src: &Pad, sink: &Pad) {}
|
fn pad_link_pre(&self, ts: u64, src: &Pad, sink: &Pad) {}
|
||||||
fn pad_pull_range_post(&self, ts: u64, pad: &Pad, buffer: &Buffer, result: FlowReturn) {}
|
fn pad_pull_range_post(&self, ts: u64, pad: &Pad, buffer: Option<&Buffer>, result: FlowReturn) {
|
||||||
|
}
|
||||||
fn pad_pull_range_pre(&self, ts: u64, pad: &Pad, offset: u64, size: u32) {}
|
fn pad_pull_range_pre(&self, ts: u64, pad: &Pad, offset: u64, size: u32) {}
|
||||||
fn pad_push_event_post(&self, ts: u64, pad: &Pad, success: bool) {}
|
fn pad_push_event_post(&self, ts: u64, pad: &Pad, success: bool) {}
|
||||||
fn pad_push_event_pre(&self, ts: u64, pad: &Pad, event: &Event) {}
|
fn pad_push_event_pre(&self, ts: u64, pad: &Pad, event: &Event) {}
|
||||||
|
@ -229,8 +230,8 @@ define_tracer_hooks! {
|
||||||
};
|
};
|
||||||
PadPullRangePost("pad-pull-range-post") = |this, ts, p: *mut ffi::GstPad, b: *mut ffi::GstBuffer, r: ffi::GstFlowReturn| {
|
PadPullRangePost("pad-pull-range-post") = |this, ts, p: *mut ffi::GstPad, b: *mut ffi::GstBuffer, r: ffi::GstFlowReturn| {
|
||||||
let p = Pad::from_glib_borrow(p);
|
let p = Pad::from_glib_borrow(p);
|
||||||
let b = Buffer::from_glib_borrow(b);
|
let b = Option::<Buffer>::from_glib_borrow(b);
|
||||||
this.pad_pull_range_post(ts, &p, &b, FlowReturn::from_glib(r))
|
this.pad_pull_range_post(ts, &p, b.as_ref().as_ref(), FlowReturn::from_glib(r))
|
||||||
};
|
};
|
||||||
PadPullRangePre("pad-pull-range-pre") = |this, ts, p: *mut ffi::GstPad, o: u64, s: libc::c_uint| {
|
PadPullRangePre("pad-pull-range-pre") = |this, ts, p: *mut ffi::GstPad, o: u64, s: libc::c_uint| {
|
||||||
let p = Pad::from_glib_borrow(p);
|
let p = Pad::from_glib_borrow(p);
|
||||||
|
|
Loading…
Reference in a new issue