use ffi; use glib::object::IsA; use glib::translate::*; use gst; use RTSPStream; pub trait RTSPStreamExtManual: 'static { fn recv_rtcp(&self, buffer: &gst::Buffer) -> Result; fn recv_rtp(&self, buffer: &gst::Buffer) -> Result; } impl> RTSPStreamExtManual for O { fn recv_rtcp(&self, buffer: &gst::Buffer) -> Result { let ret: gst::FlowReturn = unsafe { from_glib(ffi::gst_rtsp_stream_recv_rtcp( self.to_glib_none().0, buffer.to_glib_full(), )) }; ret.into_result() } fn recv_rtp(&self, buffer: &gst::Buffer) -> Result { let ret: gst::FlowReturn = unsafe { from_glib(ffi::gst_rtsp_stream_recv_rtp( self.to_glib_none().0, buffer.to_glib_full(), )) }; ret.into_result() } }