mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gdp: add DTS to headers
This commit is contained in:
parent
a029a35036
commit
6b0014b5ac
2 changed files with 5 additions and 0 deletions
|
@ -161,6 +161,9 @@ gst_dp_header_from_buffer_any (const GstBuffer * buffer, GstDPHeaderFlag flags,
|
||||||
|
|
||||||
GST_WRITE_UINT16_BE (h + 42, GST_BUFFER_FLAGS (buffer) & flags_mask);
|
GST_WRITE_UINT16_BE (h + 42, GST_BUFFER_FLAGS (buffer) & flags_mask);
|
||||||
|
|
||||||
|
/* from gstreamer 1.x, buffers also have the DTS */
|
||||||
|
GST_WRITE_UINT64_BE (h + 44, GST_BUFFER_DTS (buffer));
|
||||||
|
|
||||||
GST_DP_SET_CRC (h, flags, map.data, map.size);
|
GST_DP_SET_CRC (h, flags, map.data, map.size);
|
||||||
|
|
||||||
gst_buffer_unmap ((GstBuffer *) buffer, &map);
|
gst_buffer_unmap ((GstBuffer *) buffer, &map);
|
||||||
|
@ -440,6 +443,7 @@ gst_dp_buffer_from_header (guint header_length, const guint8 * header)
|
||||||
(guint) GST_DP_HEADER_PAYLOAD_LENGTH (header), NULL);
|
(guint) GST_DP_HEADER_PAYLOAD_LENGTH (header), NULL);
|
||||||
|
|
||||||
GST_BUFFER_TIMESTAMP (buffer) = GST_DP_HEADER_TIMESTAMP (header);
|
GST_BUFFER_TIMESTAMP (buffer) = GST_DP_HEADER_TIMESTAMP (header);
|
||||||
|
GST_BUFFER_DTS (buffer) = GST_DP_HEADER_DTS (header);
|
||||||
GST_BUFFER_DURATION (buffer) = GST_DP_HEADER_DURATION (header);
|
GST_BUFFER_DURATION (buffer) = GST_DP_HEADER_DURATION (header);
|
||||||
GST_BUFFER_OFFSET (buffer) = GST_DP_HEADER_OFFSET (header);
|
GST_BUFFER_OFFSET (buffer) = GST_DP_HEADER_OFFSET (header);
|
||||||
GST_BUFFER_OFFSET_END (buffer) = GST_DP_HEADER_OFFSET_END (header);
|
GST_BUFFER_OFFSET_END (buffer) = GST_DP_HEADER_OFFSET_END (header);
|
||||||
|
|
|
@ -43,6 +43,7 @@ G_BEGIN_DECLS
|
||||||
#define GST_DP_HEADER_OFFSET(x) GST_READ_UINT64_BE (x + 26)
|
#define GST_DP_HEADER_OFFSET(x) GST_READ_UINT64_BE (x + 26)
|
||||||
#define GST_DP_HEADER_OFFSET_END(x) GST_READ_UINT64_BE (x + 34)
|
#define GST_DP_HEADER_OFFSET_END(x) GST_READ_UINT64_BE (x + 34)
|
||||||
#define GST_DP_HEADER_BUFFER_FLAGS(x) GST_READ_UINT16_BE (x + 42)
|
#define GST_DP_HEADER_BUFFER_FLAGS(x) GST_READ_UINT16_BE (x + 42)
|
||||||
|
#define GST_DP_HEADER_DTS(x) GST_READ_UINT64_BE (x + 44)
|
||||||
#define GST_DP_HEADER_CRC_HEADER(x) GST_READ_UINT16_BE (x + 58)
|
#define GST_DP_HEADER_CRC_HEADER(x) GST_READ_UINT16_BE (x + 58)
|
||||||
#define GST_DP_HEADER_CRC_PAYLOAD(x) GST_READ_UINT16_BE (x + 60)
|
#define GST_DP_HEADER_CRC_PAYLOAD(x) GST_READ_UINT16_BE (x + 60)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue