EXPORT_C
#endif

guint32
gst_rtp_buffer_get_ssrc (GstBuffer * buffer)
{
  return g_ntohl (GST_RTP_HEADER_SSRC (GST_BUFFER_DATA (buffer)));
}
Exemple #2
0
/**
 * gst_rtp_buffer_list_get_ssrc:
 * @list: the buffer list
 *
 * Get the SSRC of the first RTP packet in @list.
 * All RTP packets within @list have the same SSRC.
 *
 * Returns: the SSRC of @list in host order.
 *
 * Since: 0.10.24
 */
guint32
gst_rtp_buffer_list_get_ssrc (GstBufferList * list)
{
  GstBuffer *buffer;

  buffer = gst_buffer_list_get (list, 0, 0);
  g_return_val_if_fail (buffer != NULL, 0);

  return g_ntohl (GST_RTP_HEADER_SSRC (GST_BUFFER_DATA (buffer)));
}
Exemple #3
0
EXPORT_C
#endif

void
gst_rtp_buffer_set_ssrc (GstBuffer * buffer, guint32 ssrc)
{
  g_return_if_fail (GST_IS_BUFFER (buffer));
  g_return_if_fail (GST_BUFFER_DATA (buffer) != NULL);

  GST_RTP_HEADER_SSRC (buffer) = g_htonl (ssrc);
}
Exemple #4
0
EXPORT_C
#endif

guint32
gst_rtp_buffer_get_ssrc (GstBuffer * buffer)
{
  g_return_val_if_fail (GST_IS_BUFFER (buffer), 0);
  g_return_val_if_fail (GST_BUFFER_DATA (buffer) != NULL, 0);

  return g_ntohl (GST_RTP_HEADER_SSRC (buffer));
}
Exemple #5
0
static GstBufferListItem
set_ssrc_header (GstBuffer ** buffer, guint group, guint idx, guint32 * ssrc)
{
  GST_RTP_HEADER_SSRC (GST_BUFFER_DATA (*buffer)) = g_htonl (*ssrc);
  return GST_BUFFER_LIST_SKIP_GROUP;
}
Exemple #6
0
/**
 * gst_rtp_buffer_set_ssrc:
 * @buffer: the buffer
 * @ssrc: the new SSRC
 *
 * Set the SSRC on the RTP packet in @buffer to @ssrc.
 */
void
gst_rtp_buffer_set_ssrc (GstBuffer * buffer, guint32 ssrc)
{
  GST_RTP_HEADER_SSRC (GST_BUFFER_DATA (buffer)) = g_htonl (ssrc);
}