mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 13:31:00 +00:00
Use functions with correct mutability for BaseParseFrame/VideoCodecFrame
This commit is contained in:
parent
9390295281
commit
a91d0d929c
3 changed files with 6 additions and 6 deletions
|
@ -102,7 +102,7 @@ impl VideoDecoderImpl for CdgDec {
|
|||
fn handle_frame(
|
||||
&self,
|
||||
element: &gst_video::VideoDecoder,
|
||||
frame: gst_video::VideoCodecFrame,
|
||||
mut frame: gst_video::VideoCodecFrame,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
{
|
||||
let mut out_info = self.output_info.lock().unwrap();
|
||||
|
@ -148,9 +148,9 @@ impl VideoDecoderImpl for CdgDec {
|
|||
let mut cdg_inter = self.cdg_inter.lock().unwrap();
|
||||
cdg_inter.handle_cmd(cmd);
|
||||
|
||||
element.allocate_output_frame(&frame, None)?;
|
||||
element.allocate_output_frame(&mut frame, None)?;
|
||||
{
|
||||
let output = frame.get_output_buffer().unwrap();
|
||||
let output = frame.get_output_buffer_mut().unwrap();
|
||||
let info = self.output_info.lock().unwrap();
|
||||
|
||||
let mut out_frame =
|
||||
|
|
|
@ -131,7 +131,7 @@ impl BaseParseImpl for CdgParse {
|
|||
fn handle_frame(
|
||||
&self,
|
||||
element: &gst_base::BaseParse,
|
||||
frame: gst_base::BaseParseFrame,
|
||||
mut frame: gst_base::BaseParseFrame,
|
||||
) -> Result<(gst::FlowSuccess, u32), gst::FlowError> {
|
||||
let pad = element.get_src_pad();
|
||||
if pad.get_current_caps().is_none() {
|
||||
|
@ -198,7 +198,7 @@ impl BaseParseImpl for CdgParse {
|
|||
};
|
||||
|
||||
let pts = bytes_to_time(Bytes(Some(frame.get_offset())));
|
||||
let buffer = frame.get_buffer().unwrap();
|
||||
let buffer = frame.get_buffer_mut().unwrap();
|
||||
buffer.set_pts(pts);
|
||||
|
||||
if !keyframe {
|
||||
|
|
|
@ -744,7 +744,7 @@ impl Rav1Enc {
|
|||
packet_type
|
||||
);
|
||||
|
||||
let frame = element.get_oldest_frame().expect("frame not found");
|
||||
let mut frame = element.get_oldest_frame().expect("frame not found");
|
||||
if packet_type == data::FrameType::KEY {
|
||||
frame.set_flags(gst_video::VideoCodecFrameFlags::SYNC_POINT);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue