Commit 4718f72f authored by Vivia Nikolaidou's avatar Vivia Nikolaidou 🦆 Committed by Sebastian Dröge

gstreamer-video/video_encoder: Manually implement finish_subframe

parent 61c80ada
......@@ -193,6 +193,10 @@ manual_traits = ["VideoEncoderExtManual"]
name = "finish_frame"
ignore = true
[[object.function]]
name = "finish_subframe"
ignore = true
[[object.function]]
name = "set_latency"
ignore = true
......
......@@ -38,6 +38,10 @@ pub trait VideoEncoderExtManual: 'static {
frame: Option<VideoCodecFrame>,
) -> Result<gst::FlowSuccess, gst::FlowError>;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
fn get_latency(&self) -> (gst::ClockTime, gst::ClockTime);
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime);
......@@ -97,6 +101,17 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
ret.into_result()
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError> {
let ret: gst::FlowReturn = unsafe {
from_glib(gst_video_sys::gst_video_encoder_finish_subframe(
self.as_ref().to_glib_none().0,
frame.to_glib_none().0,
))
};
ret.into_result()
}
fn get_latency(&self) -> (gst::ClockTime, gst::ClockTime) {
let mut min_latency = gst_sys::GST_CLOCK_TIME_NONE;
let mut max_latency = gst_sys::GST_CLOCK_TIME_NONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment