mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Add method to get RDT flags
Add a method to get the RDT flags. We need these flags to mark keyframes to reset the descrambing queue. See #556714.
This commit is contained in:
parent
3bcd050fab
commit
9ce447007e
2 changed files with 34 additions and 0 deletions
|
@ -423,3 +423,35 @@ gst_rdt_packet_data_get_timestamp (GstRDTPacket * packet)
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
guint8
|
||||
gst_rdt_packet_data_get_flags (GstRDTPacket * packet)
|
||||
{
|
||||
guint8 result;
|
||||
guint header;
|
||||
gboolean length_included_flag;
|
||||
guint8 *bufdata;
|
||||
guint bufsize;
|
||||
|
||||
g_return_val_if_fail (packet != NULL, 0);
|
||||
g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), 0);
|
||||
|
||||
bufdata = GST_BUFFER_DATA (packet->buffer);
|
||||
bufsize = GST_BUFFER_SIZE (packet->buffer);
|
||||
|
||||
header = packet->offset;
|
||||
|
||||
length_included_flag = (bufdata[header] & 0x80) == 0x80;
|
||||
|
||||
/* skip seq_no and header bits */
|
||||
header += 3;
|
||||
|
||||
if (length_included_flag) {
|
||||
/* skip length */
|
||||
header += 2;
|
||||
}
|
||||
/* get flags */
|
||||
result = bufdata[header];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -109,6 +109,8 @@ gboolean gst_rdt_packet_data_peek_data (GstRDTPacket *packet, guint8
|
|||
guint16 gst_rdt_packet_data_get_stream_id (GstRDTPacket *packet);
|
||||
guint32 gst_rdt_packet_data_get_timestamp (GstRDTPacket *packet);
|
||||
|
||||
guint8 gst_rdt_packet_data_get_flags (GstRDTPacket * packet);
|
||||
|
||||
/* utils */
|
||||
gint gst_rdt_buffer_compare_seqnum (guint16 seqnum1, guint16 seqnum2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue