gst: sink: copy frames if video buffer from other pool

In case of the video, if the buffer to be rendered is from upstream and
not from the pipewirepool, map the memory into video frames and copy the
frames instead of doing a buffer copy.

Avoid splitting of buffers in the case of video, because that might break
the frame layout, especially planar formats, for the applications which
use pipewiresink as a camera source to capture video.
This commit is contained in:
Taruntej Kanakamalla 2025-03-04 22:28:14 +05:30
parent 0b5d669679
commit a4a9d3540d
2 changed files with 56 additions and 8 deletions

View file

@ -69,6 +69,7 @@ struct _GstPipeWireSink {
gboolean negotiated;
gboolean rate_match;
gint rate;
gboolean is_video;
GstPipeWireSinkMode mode;
GstPipeWireSinkSlaveMethod slave_method;