From 763739e3ae7e4c76298c68ebb0ce6fa07ebd441f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 17 Dec 2023 14:07:12 +0200 Subject: [PATCH] Update for `Buffer` / `Memory` API changes Part-of: --- mux/fmp4/src/fmp4mux/imp.rs | 9 +++------ text/regex/src/gstregex/imp.rs | 3 +-- video/closedcaption/src/mcc_enc/imp.rs | 2 +- video/closedcaption/src/scc_enc/imp.rs | 2 +- video/videofx/src/border/imp.rs | 2 +- video/videofx/src/videocompare/imp.rs | 2 +- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/mux/fmp4/src/fmp4mux/imp.rs b/mux/fmp4/src/fmp4mux/imp.rs index 6da92b91..98b8843d 100644 --- a/mux/fmp4/src/fmp4mux/imp.rs +++ b/mux/fmp4/src/fmp4mux/imp.rs @@ -2371,12 +2371,9 @@ impl FMP4Mux { // Copy metas from the first actual buffer to the fragment header. This allows // getting things like the reference timestamp meta or the timecode meta to identify // the fragment. - let _ = interleaved_buffers[0].buffer.copy_into( - buffer, - gst::BufferCopyFlags::META, - 0, - None, - ); + let _ = interleaved_buffers[0] + .buffer + .copy_into(buffer, gst::BufferCopyFlags::META, ..); } let moof_offset = state.current_offset diff --git a/text/regex/src/gstregex/imp.rs b/text/regex/src/gstregex/imp.rs index 98e26a57..f1ec01cf 100644 --- a/text/regex/src/gstregex/imp.rs +++ b/text/regex/src/gstregex/imp.rs @@ -92,8 +92,7 @@ impl RegEx { gst::BufferCopyFlags::FLAGS | gst::BufferCopyFlags::TIMESTAMPS | gst::BufferCopyFlags::META, - 0, - None, + .., ); } diff --git a/video/closedcaption/src/mcc_enc/imp.rs b/video/closedcaption/src/mcc_enc/imp.rs index 202d4fb1..30fdf648 100644 --- a/video/closedcaption/src/mcc_enc/imp.rs +++ b/video/closedcaption/src/mcc_enc/imp.rs @@ -332,7 +332,7 @@ impl MccEnc { let mut buf = gst::Buffer::from_mut_slice(outbuf); buffer - .copy_into(buf.get_mut().unwrap(), gst::BUFFER_COPY_METADATA, 0, None) + .copy_into(buf.get_mut().unwrap(), gst::BUFFER_COPY_METADATA, ..) .expect("Failed to copy buffer metadata"); drop(state); diff --git a/video/closedcaption/src/scc_enc/imp.rs b/video/closedcaption/src/scc_enc/imp.rs index bb394049..cd45d0f4 100644 --- a/video/closedcaption/src/scc_enc/imp.rs +++ b/video/closedcaption/src/scc_enc/imp.rs @@ -224,7 +224,7 @@ impl State { // Copy the metadata of the first buffer first_buf - .copy_into(buf_mut, gst::BUFFER_COPY_METADATA, 0, None) + .copy_into(buf_mut, gst::BUFFER_COPY_METADATA, ..) .expect("Failed to copy buffer metadata"); buf_mut.set_pts(first_buf.pts()); buffer diff --git a/video/videofx/src/border/imp.rs b/video/videofx/src/border/imp.rs index 581efede..e2175bd9 100644 --- a/video/videofx/src/border/imp.rs +++ b/video/videofx/src/border/imp.rs @@ -207,7 +207,7 @@ impl RoundedCorners { let copy_flags = gst::BufferCopyFlags::FLAGS | gst::BufferCopyFlags::TIMESTAMPS | gst::BufferCopyFlags::MEMORY; - let mut buf = buf.copy_region(copy_flags, 0, None).unwrap(); + let mut buf = buf.copy_region(copy_flags, ..).unwrap(); let mut_buf = buf.make_mut(); gst_video::VideoMeta::add_full( mut_buf, diff --git a/video/videofx/src/videocompare/imp.rs b/video/videofx/src/videocompare/imp.rs index d8cf983b..3002d447 100644 --- a/video/videofx/src/videocompare/imp.rs +++ b/video/videofx/src/videocompare/imp.rs @@ -309,7 +309,7 @@ impl VideoAggregatorImpl for VideoCompare { // output the reference buffer outbuf.remove_all_memory(); buffer - .copy_into(outbuf, gst::BufferCopyFlags::all(), 0, None) + .copy_into(outbuf, gst::BufferCopyFlags::all(), ..) .map_err(|_| gst::FlowError::Error)?; // Use current frame as the reference to the comparison