{
guint header;
guint8 *bufdata;
- guint bufsize;
- guint16 result;
g_return_val_if_fail (packet != NULL, FALSE);
g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), FALSE);
bufdata = GST_BUFFER_DATA (packet->buffer);
- bufsize = GST_BUFFER_SIZE (packet->buffer);
/* skip header bits */
header = packet->offset + 1;
/* read seq_no */
- result = GST_READ_UINT16_BE (&bufdata[header]);
-
- return result;
+ return GST_READ_UINT16_BE (&bufdata[header]);
}
gboolean
{
guint header;
guint8 *bufdata;
- guint bufsize;
gboolean length_included_flag;
gboolean need_reliable_flag;
guint8 stream_id;
g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), FALSE);
bufdata = GST_BUFFER_DATA (packet->buffer);
- bufsize = GST_BUFFER_SIZE (packet->buffer);
header = packet->offset;
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;
guint32
gst_rdt_packet_data_get_timestamp (GstRDTPacket * packet)
{
- guint32 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;
header += 1;
/* get timestamp */
- result = GST_READ_UINT32_BE (&bufdata[header]);
-
- return result;
+ return GST_READ_UINT32_BE (&bufdata[header]);
}
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;
header += 2;
}
/* get flags */
- result = bufdata[header];
-
- return result;
+ return bufdata[header];
}