Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-07-24 18:35:43 +0300
committerTim-Philipp Müller <tim@centricular.com>2020-07-24 19:09:45 +0300
commit987a332076b4ef4adc011824b7080a456c4831bc (patch)
treebb48fed754b596a550d7da665a424864e4b92ed2 /sys
parent9588108d6e548964c07bd1cf0c8a3337ea803155 (diff)
rpicamsrc: mark buffers as header and keyframe/delta-unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/682>
Diffstat (limited to 'sys')
-rw-r--r--sys/rpicamsrc/RaspiCapture.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/rpicamsrc/RaspiCapture.c b/sys/rpicamsrc/RaspiCapture.c
index c7d3809f3..6368ab4ad 100644
--- a/sys/rpicamsrc/RaspiCapture.c
+++ b/sys/rpicamsrc/RaspiCapture.c
@@ -989,6 +989,13 @@ raspi_capture_fill_buffer(RASPIVID_STATE *state, GstBuffer **bufp,
/* FIXME: Can we avoid copies and give MMAL our own buffers to fill? */
gst_buffer_fill(buf, 0, buffer->data, buffer->length);
+ if ((buffer->flags & MMAL_BUFFER_HEADER_FLAG_CONFIG))
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
+ else if ((buffer->flags & MMAL_BUFFER_HEADER_FLAG_KEYFRAME))
+ GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
+ else
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
+
/* NAL_END is bogus and can't be trusted */
if ((buffer->flags & MMAL_BUFFER_HEADER_FLAG_FRAME_END))
ret = GST_FLOW_OK;