forked from mirrors/gstreamer-rs
Remove &mut BufferRef
getter from write-mapped AudioBuffer
/ VideoFrame
This allows invalidating the buffer map. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1374>
This commit is contained in:
parent
c66fc90566
commit
92064a0c41
2 changed files with 0 additions and 20 deletions
|
@ -233,11 +233,6 @@ impl AudioBuffer<Writable> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn buffer_mut(&mut self) -> &mut gst::BufferRef {
|
|
||||||
unsafe { gst::BufferRef::from_mut_ptr(self.audio_buffer.buffer) }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn plane_data_mut(&mut self, plane: u32) -> Result<&mut [u8], glib::BoolError> {
|
pub fn plane_data_mut(&mut self, plane: u32) -> Result<&mut [u8], glib::BoolError> {
|
||||||
if plane >= self.n_planes() {
|
if plane >= self.n_planes() {
|
||||||
return Err(glib::bool_error!(
|
return Err(glib::bool_error!(
|
||||||
|
@ -530,11 +525,6 @@ impl<'a> AudioBufferRef<&'a mut gst::BufferRef> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn buffer_mut(&mut self) -> &mut gst::BufferRef {
|
|
||||||
unsafe { gst::BufferRef::from_mut_ptr(self.audio_buffer.buffer) }
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn plane_data_mut(&mut self, plane: u32) -> Result<&mut [u8], glib::BoolError> {
|
pub fn plane_data_mut(&mut self, plane: u32) -> Result<&mut [u8], glib::BoolError> {
|
||||||
if plane >= self.n_planes() {
|
if plane >= self.n_planes() {
|
||||||
|
|
|
@ -474,11 +474,6 @@ impl VideoFrame<Writable> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn buffer_mut(&mut self) -> &mut gst::BufferRef {
|
|
||||||
unsafe { gst::BufferRef::from_mut_ptr(self.frame.buffer) }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn comp_data_mut(&mut self, component: u32) -> Result<&mut [u8], glib::BoolError> {
|
pub fn comp_data_mut(&mut self, component: u32) -> Result<&mut [u8], glib::BoolError> {
|
||||||
let poffset = self.info().comp_poffset(component as u8) as usize;
|
let poffset = self.info().comp_poffset(component as u8) as usize;
|
||||||
Ok(&mut self.plane_data_mut(self.format_info().plane()[component as usize])?[poffset..])
|
Ok(&mut self.plane_data_mut(self.format_info().plane()[component as usize])?[poffset..])
|
||||||
|
@ -847,11 +842,6 @@ impl<'a> VideoFrameRef<&'a mut gst::BufferRef> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn buffer_mut(&mut self) -> &mut gst::BufferRef {
|
|
||||||
unsafe { gst::BufferRef::from_mut_ptr(self.frame.buffer) }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn comp_data_mut(&mut self, component: u32) -> Result<&mut [u8], glib::BoolError> {
|
pub fn comp_data_mut(&mut self, component: u32) -> Result<&mut [u8], glib::BoolError> {
|
||||||
let poffset = self.info().comp_poffset(component as u8) as usize;
|
let poffset = self.info().comp_poffset(component as u8) as usize;
|
||||||
Ok(&mut self.plane_data_mut(self.format_info().plane()[component as usize])?[poffset..])
|
Ok(&mut self.plane_data_mut(self.format_info().plane()[component as usize])?[poffset..])
|
||||||
|
|
Loading…
Reference in a new issue