diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-07-24 18:35:43 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-07-24 19:09:45 +0300 |
commit | 987a332076b4ef4adc011824b7080a456c4831bc (patch) | |
tree | bb48fed754b596a550d7da665a424864e4b92ed2 /sys | |
parent | 9588108d6e548964c07bd1cf0c8a3337ea803155 (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.c | 7 |
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; |