Fix compilation after GstRc<T>::get_mut() API fixes in gstreamer-rs

This commit is contained in:
Sebastian Dröge 2017-10-12 18:03:06 +03:00
parent 393cd6236a
commit 4b97d56949
3 changed files with 10 additions and 10 deletions

View file

@ -232,7 +232,7 @@ impl ObjectImpl<RsBaseTransform> for AudioEcho {
impl ElementImpl<RsBaseTransform> for AudioEcho {}
impl BaseTransformImpl<RsBaseTransform> for AudioEcho {
fn transform_ip(&self, _element: &RsBaseTransform, buf: &gst::Buffer) -> gst::FlowReturn {
fn transform_ip(&self, _element: &RsBaseTransform, buf: &mut gst::BufferRef) -> gst::FlowReturn {
let mut settings = *self.settings.lock().unwrap();
settings.delay = cmp::min(settings.max_delay, settings.delay);
@ -242,7 +242,7 @@ impl BaseTransformImpl<RsBaseTransform> for AudioEcho {
Some(ref mut state) => state,
};
let mut map = match buf.get_mut().and_then(|b| b.map_writable()) {
let mut map = match buf.map_writable() {
None => return gst::FlowReturn::Error,
Some(map) => map,
};

View file

@ -273,7 +273,7 @@ impl Demuxer {
fn sink_activate(pad: &gst::Pad, _parent: &Option<gst::Object>) -> bool {
let mode = {
let query = gst::Query::new_scheduling();
let mut query = gst::Query::new_scheduling();
if !pad.peer_query(query.get_mut().unwrap()) {
return false;
}
@ -351,7 +351,7 @@ impl Demuxer {
let demuxer = element.get_impl().downcast_ref::<Demuxer>().unwrap();
if active {
let query = gst::Query::new_duration(gst::Format::Bytes);
let mut query = gst::Query::new_duration(gst::Format::Bytes);
let upstream_size = if demuxer.sinkpad.peer_query(query.get_mut().unwrap()) {
use gst::QueryView;

View file

@ -94,12 +94,12 @@ pub trait BaseTransformImpl<T: BaseTransform>
&self,
_element: &T,
_inbuf: &gst::Buffer,
_outbuf: &gst::Buffer,
_outbuf: &mut gst::BufferRef,
) -> gst::FlowReturn {
unimplemented!();
}
fn transform_ip(&self, _element: &T, _buf: &gst::Buffer) -> gst::FlowReturn {
fn transform_ip(&self, _element: &T, _buf: &mut gst::BufferRef) -> gst::FlowReturn {
unimplemented!();
}
}
@ -379,12 +379,12 @@ macro_rules! box_base_transform_impl(
imp.src_event(element, event)
}
fn transform(&self, element: &T, inbuf: &gst::Buffer, outbuf: &gst::Buffer) -> gst::FlowReturn {
fn transform(&self, element: &T, inbuf: &gst::Buffer, outbuf: &mut gst::BufferRef) -> gst::FlowReturn {
let imp: &$name<T> = self.as_ref();
imp.transform(element, inbuf, outbuf)
}
fn transform_ip(&self, element: &T, buf: &gst::Buffer) -> gst::FlowReturn {
fn transform_ip(&self, element: &T, buf: &mut gst::BufferRef) -> gst::FlowReturn {
let imp: &$name<T> = self.as_ref();
imp.transform_ip(element, buf)
}
@ -670,7 +670,7 @@ where
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, gst::FlowReturn::Error, {
imp.transform(&wrap, &from_glib_borrow(inbuf), &from_glib_borrow(outbuf))
imp.transform(&wrap, &from_glib_borrow(inbuf), gst::BufferRef::from_mut_ptr(outbuf))
}).to_glib()
}
@ -691,6 +691,6 @@ where
let buf = buf as *mut gst_ffi::GstBuffer;
panic_to_error!(&wrap, &element.panicked, gst::FlowReturn::Error, {
imp.transform_ip(&wrap, &from_glib_borrow(buf))
imp.transform_ip(&wrap, gst::BufferRef::from_mut_ptr(buf))
}).to_glib()
}