mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
Add RTCP docs.
Original commit message from CVS: * docs/libs/gst-plugins-base-libs-docs.sgml: * docs/libs/gst-plugins-base-libs-sections.txt: * gst-libs/gst/rtp/gstbasertpaudiopayload.c: (gst_base_rtp_audio_payload_get_adapter): Add RTCP docs. Fix some more docs. * gst-libs/gst/rtp/Makefile.am: * gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_buffer_new_take_data), (gst_rtcp_buffer_new_copy_data), (gst_rtcp_buffer_validate_data), (gst_rtcp_buffer_validate), (gst_rtcp_buffer_get_packet_count), (read_packet_header), (gst_rtcp_buffer_get_first_packet), (gst_rtcp_packet_move_to_next), (gst_rtcp_buffer_add_packet), (gst_rtcp_packet_remove), (gst_rtcp_packet_get_padding), (gst_rtcp_packet_get_type), (gst_rtcp_packet_get_count), (gst_rtcp_packet_get_length), (gst_rtcp_packet_sr_get_sender_info), (gst_rtcp_packet_sr_set_sender_info), (gst_rtcp_packet_rr_get_ssrc), (gst_rtcp_packet_rr_set_ssrc), (gst_rtcp_packet_get_rb_count), (gst_rtcp_packet_get_rb), (gst_rtcp_packet_add_rb), (gst_rtcp_packet_set_rb), (gst_rtcp_packet_sdes_get_chunk_count), (gst_rtcp_packet_sdes_first_chunk), (gst_rtcp_packet_sdes_next_chunk), (gst_rtcp_packet_sdes_get_ssrc), (gst_rtcp_packet_sdes_first_item), (gst_rtcp_packet_sdes_next_item), (gst_rtcp_packet_sdes_get_item), (gst_rtcp_packet_bye_get_ssrc_count), (gst_rtcp_packet_bye_get_nth_ssrc), (gst_rtcp_packet_bye_add_ssrc), (gst_rtcp_packet_bye_add_ssrcs), (get_reason_offset), (gst_rtcp_packet_bye_get_reason_len), (gst_rtcp_packet_bye_get_reason), (gst_rtcp_packet_bye_set_reason): * gst-libs/gst/rtp/gstrtcpbuffer.h: Add new helper object for parsing and creating RTCP messages.
This commit is contained in:
parent
dfdd873f6a
commit
0a39f494b5
7 changed files with 1536 additions and 5 deletions
36
ChangeLog
36
ChangeLog
|
@ -1,3 +1,39 @@
|
|||
2007-03-29 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* docs/libs/gst-plugins-base-libs-docs.sgml:
|
||||
* docs/libs/gst-plugins-base-libs-sections.txt:
|
||||
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
|
||||
(gst_base_rtp_audio_payload_get_adapter):
|
||||
Add RTCP docs.
|
||||
Fix some more docs.
|
||||
|
||||
* gst-libs/gst/rtp/Makefile.am:
|
||||
* gst-libs/gst/rtp/gstrtcpbuffer.c:
|
||||
(gst_rtcp_buffer_new_take_data), (gst_rtcp_buffer_new_copy_data),
|
||||
(gst_rtcp_buffer_validate_data), (gst_rtcp_buffer_validate),
|
||||
(gst_rtcp_buffer_get_packet_count), (read_packet_header),
|
||||
(gst_rtcp_buffer_get_first_packet), (gst_rtcp_packet_move_to_next),
|
||||
(gst_rtcp_buffer_add_packet), (gst_rtcp_packet_remove),
|
||||
(gst_rtcp_packet_get_padding), (gst_rtcp_packet_get_type),
|
||||
(gst_rtcp_packet_get_count), (gst_rtcp_packet_get_length),
|
||||
(gst_rtcp_packet_sr_get_sender_info),
|
||||
(gst_rtcp_packet_sr_set_sender_info),
|
||||
(gst_rtcp_packet_rr_get_ssrc), (gst_rtcp_packet_rr_set_ssrc),
|
||||
(gst_rtcp_packet_get_rb_count), (gst_rtcp_packet_get_rb),
|
||||
(gst_rtcp_packet_add_rb), (gst_rtcp_packet_set_rb),
|
||||
(gst_rtcp_packet_sdes_get_chunk_count),
|
||||
(gst_rtcp_packet_sdes_first_chunk),
|
||||
(gst_rtcp_packet_sdes_next_chunk), (gst_rtcp_packet_sdes_get_ssrc),
|
||||
(gst_rtcp_packet_sdes_first_item),
|
||||
(gst_rtcp_packet_sdes_next_item), (gst_rtcp_packet_sdes_get_item),
|
||||
(gst_rtcp_packet_bye_get_ssrc_count),
|
||||
(gst_rtcp_packet_bye_get_nth_ssrc), (gst_rtcp_packet_bye_add_ssrc),
|
||||
(gst_rtcp_packet_bye_add_ssrcs), (get_reason_offset),
|
||||
(gst_rtcp_packet_bye_get_reason_len),
|
||||
(gst_rtcp_packet_bye_get_reason), (gst_rtcp_packet_bye_set_reason):
|
||||
* gst-libs/gst/rtp/gstrtcpbuffer.h:
|
||||
Add new helper object for parsing and creating RTCP messages.
|
||||
|
||||
2007-03-29 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<!ENTITY GstBaseRtpDepayload SYSTEM "xml/gstbasertpdepayload.xml">
|
||||
<!ENTITY GstBaseRtpPayload SYSTEM "xml/gstbasertppayload.xml">
|
||||
<!ENTITY GstRtpBuffer SYSTEM "xml/gstrtpbuffer.xml">
|
||||
<!ENTITY GstRtcpBuffer SYSTEM "xml/gstrtcpbuffer.xml">
|
||||
<!-- tag -->
|
||||
<!ENTITY GstTag SYSTEM "xml/gsttag.xml">
|
||||
<!ENTITY GstTagVorbis SYSTEM "xml/gsttagvorbis.xml">
|
||||
|
@ -164,6 +165,7 @@
|
|||
&GstBaseRtpDepayload;
|
||||
&GstBaseRtpPayload;
|
||||
&GstRtpBuffer;
|
||||
&GstRtcpBuffer;
|
||||
</chapter>
|
||||
|
||||
<chapter id="gstreamer-tag">
|
||||
|
|
|
@ -93,6 +93,7 @@ GST_AUDIO_SRC_GET_CLASS
|
|||
<INCLUDE>gst/audio/gstbaseaudiosink.h</INCLUDE>
|
||||
GstBaseAudioSink
|
||||
GstBaseAudioSinkClass
|
||||
GstBaseAudioSinkSlaveMethod
|
||||
|
||||
GST_BASE_AUDIO_SINK_CLOCK
|
||||
GST_BASE_AUDIO_SINK_PAD
|
||||
|
@ -105,6 +106,7 @@ gst_base_audio_sink_get_type
|
|||
GST_BASE_AUDIO_SINK_CLASS
|
||||
GST_IS_BASE_AUDIO_SINK_CLASS
|
||||
GST_BASE_AUDIO_SINK_GET_CLASS
|
||||
GstBaseAudioSinkPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -745,6 +747,8 @@ gst_base_rtp_audio_payload_set_frame_based
|
|||
gst_base_rtp_audio_payload_set_frame_options
|
||||
gst_base_rtp_audio_payload_set_sample_based
|
||||
gst_base_rtp_audio_payload_set_sample_options
|
||||
gst_base_rtp_audio_payload_get_adapter
|
||||
gst_base_rtp_audio_payload_push
|
||||
<SUBSECTION Standard>
|
||||
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD
|
||||
GST_BASE_RTP_AUDIO_PAYLOAD
|
||||
|
@ -752,6 +756,7 @@ GST_BASE_RTP_AUDIO_PAYLOAD_CLASS
|
|||
GST_IS_BASE_RTP_AUDIO_PAYLOAD
|
||||
GST_IS_BASE_RTP_AUDIO_PAYLOAD_CLASS
|
||||
gst_base_rtp_audio_payload_get_type
|
||||
GstBaseRTPAudioPayloadPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -763,7 +768,11 @@ GstBaseRTPDepayloadClass
|
|||
GST_BASE_RTP_DEPAYLOAD_SINKPAD
|
||||
GST_BASE_RTP_DEPAYLOAD_SRCPAD
|
||||
|
||||
gst_base_rtp_depayload_push
|
||||
gst_base_rtp_depayload_push_ts
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GstBaseRTPDepayloadPrivate
|
||||
GST_TYPE_BASE_RTP_DEPAYLOAD
|
||||
GST_BASE_RTP_DEPAYLOAD
|
||||
GST_BASE_RTP_DEPAYLOAD_CLASS
|
||||
|
@ -798,6 +807,58 @@ GST_IS_BASE_RTP_PAYLOAD_CLASS
|
|||
gst_basertppayload_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gstrtcpbuffer</FILE>
|
||||
<INCLUDE>gst/rtp/gstrtcpbuffer.h</INCLUDE>
|
||||
|
||||
GST_RTCP_VERSION
|
||||
|
||||
GST_RTCP_MAX_SDES
|
||||
GST_RTCP_VALID_MASK
|
||||
GST_RTCP_VALID_VALUE
|
||||
|
||||
GstRTCPType
|
||||
GstRTCPPacket
|
||||
GstRTCPSDESType
|
||||
|
||||
gst_rtcp_buffer_add_packet
|
||||
gst_rtcp_buffer_get_first_packet
|
||||
gst_rtcp_buffer_get_packet_count
|
||||
gst_rtcp_buffer_new_copy_data
|
||||
gst_rtcp_buffer_new_take_data
|
||||
gst_rtcp_buffer_validate
|
||||
gst_rtcp_buffer_validate_data
|
||||
gst_rtcp_packet_add_rb
|
||||
gst_rtcp_packet_bye_add_ssrc
|
||||
gst_rtcp_packet_bye_add_ssrcs
|
||||
gst_rtcp_packet_bye_get_nth_ssrc
|
||||
gst_rtcp_packet_bye_get_reason
|
||||
gst_rtcp_packet_bye_get_reason_len
|
||||
gst_rtcp_packet_bye_get_ssrc_count
|
||||
gst_rtcp_packet_bye_set_reason
|
||||
gst_rtcp_packet_get_count
|
||||
gst_rtcp_packet_get_length
|
||||
gst_rtcp_packet_get_padding
|
||||
gst_rtcp_packet_get_rb
|
||||
gst_rtcp_packet_get_rb_count
|
||||
gst_rtcp_packet_get_type
|
||||
gst_rtcp_packet_move_to_next
|
||||
gst_rtcp_packet_remove
|
||||
gst_rtcp_packet_rr_get_ssrc
|
||||
gst_rtcp_packet_rr_set_ssrc
|
||||
gst_rtcp_packet_sdes_first_chunk
|
||||
gst_rtcp_packet_sdes_first_item
|
||||
gst_rtcp_packet_sdes_get_chunk_count
|
||||
gst_rtcp_packet_sdes_get_item
|
||||
gst_rtcp_packet_sdes_get_ssrc
|
||||
gst_rtcp_packet_sdes_next_chunk
|
||||
gst_rtcp_packet_sdes_next_item
|
||||
gst_rtcp_packet_set_rb
|
||||
gst_rtcp_packet_sr_get_sender_info
|
||||
gst_rtcp_packet_sr_set_sender_info
|
||||
<SUBSECTION Standard>
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gstrtpbuffer</FILE>
|
||||
<INCLUDE>gst/rtp/gstrtpbuffer.h</INCLUDE>
|
||||
|
@ -809,6 +870,7 @@ gst_rtp_buffer_allocate_data
|
|||
gst_rtp_buffer_calc_header_len
|
||||
gst_rtp_buffer_calc_packet_len
|
||||
gst_rtp_buffer_calc_payload_len
|
||||
gst_rtp_buffer_default_clock_rate
|
||||
gst_rtp_buffer_get_csrc
|
||||
gst_rtp_buffer_get_csrc_count
|
||||
gst_rtp_buffer_get_extension
|
||||
|
@ -857,6 +919,26 @@ GST_RTP_PAYLOAD_PCMA_STRING
|
|||
GST_RTP_PAYLOAD_PCMU_STRING
|
||||
GST_RTP_PAYLOAD_TS41_STRING
|
||||
GST_RTP_PAYLOAD_TS48_STRING
|
||||
GST_RTP_PAYLOAD_1016_STRING
|
||||
GST_RTP_PAYLOAD_CELLB_STRING
|
||||
GST_RTP_PAYLOAD_CN_STRING
|
||||
GST_RTP_PAYLOAD_DVI4_11025_STRING
|
||||
GST_RTP_PAYLOAD_DVI4_16000_STRING
|
||||
GST_RTP_PAYLOAD_DVI4_22050_STRING
|
||||
GST_RTP_PAYLOAD_DVI4_8000_STRING
|
||||
GST_RTP_PAYLOAD_G721_STRING
|
||||
GST_RTP_PAYLOAD_G722_STRING
|
||||
GST_RTP_PAYLOAD_G723_53
|
||||
GST_RTP_PAYLOAD_G723_63
|
||||
GST_RTP_PAYLOAD_G723_STRING
|
||||
GST_RTP_PAYLOAD_H261_STRING
|
||||
GST_RTP_PAYLOAD_JPEG_STRING
|
||||
GST_RTP_PAYLOAD_LPC_STRING
|
||||
GST_RTP_PAYLOAD_MP2T_STRING
|
||||
GST_RTP_PAYLOAD_NV_STRING
|
||||
GST_RTP_PAYLOAD_QCELP_STRING
|
||||
GST_RTP_PAYLOAD_TS41
|
||||
GST_RTP_PAYLOAD_TS48
|
||||
</SECTION>
|
||||
|
||||
# tag
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
libgstrtpincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/rtp
|
||||
|
||||
libgstrtpinclude_HEADERS = gstrtpbuffer.h \
|
||||
gstrtcpbuffer.h \
|
||||
gstbasertpaudiopayload.h \
|
||||
gstbasertppayload.h \
|
||||
gstbasertpdepayload.h
|
||||
|
@ -8,6 +9,7 @@ libgstrtpinclude_HEADERS = gstrtpbuffer.h \
|
|||
lib_LTLIBRARIES = libgstrtp-@GST_MAJORMINOR@.la
|
||||
|
||||
libgstrtp_@GST_MAJORMINOR@_la_SOURCES = gstrtpbuffer.c \
|
||||
gstrtcpbuffer.c \
|
||||
gstbasertpaudiopayload.c \
|
||||
gstbasertppayload.c \
|
||||
gstbasertpdepayload.c
|
||||
|
|
|
@ -598,6 +598,19 @@ gst_base_rtp_audio_payload_handle_sample_based_buffer (GstBaseRTPPayload *
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_base_rtp_audio_payload_push:
|
||||
* @basepayload: a #GstBaseRTPPayload
|
||||
* @data: data to set as payload
|
||||
* @payload_len: length of payload
|
||||
* @timestamp: a #GstClockTime
|
||||
*
|
||||
* Create an RTP buffer and store @payload_len bytes of @data as the
|
||||
* payload. Set the timestamp on the new buffer to @timestamp before pushing
|
||||
* the buffer downstream.
|
||||
*
|
||||
* Returns: a #GstFlowReturn
|
||||
*/
|
||||
GstFlowReturn
|
||||
gst_base_rtp_audio_payload_push (GstBaseRTPPayload * basepayload,
|
||||
const guint8 * data, guint payload_len, GstClockTime timestamp)
|
||||
|
@ -712,14 +725,22 @@ gst_base_rtp_payload_audio_handle_event (GstPad * pad, GstEvent * event,
|
|||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_base_rtp_audio_payload_get_adapter:
|
||||
* @basertpaudiopayload: a #GstBaseRTPAudioPayload
|
||||
*
|
||||
* Gets the internal adapter used by the depayloader.
|
||||
*
|
||||
* Returns: a #GstAdapter.
|
||||
*/
|
||||
GstAdapter *
|
||||
gst_base_rtp_audio_payload_get_adapter (GstBaseRTPAudioPayload
|
||||
* basertpaudiopayload)
|
||||
{
|
||||
if (basertpaudiopayload->priv->adapter == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
GstAdapter *adapter;
|
||||
|
||||
g_object_ref (G_OBJECT (basertpaudiopayload->priv->adapter));
|
||||
return basertpaudiopayload->priv->adapter;
|
||||
if ((adapter = basertpaudiopayload->priv->adapter))
|
||||
g_object_ref (adapter);
|
||||
|
||||
return adapter;
|
||||
}
|
||||
|
|
1182
gst-libs/gst/rtp/gstrtcpbuffer.c
Normal file
1182
gst-libs/gst/rtp/gstrtcpbuffer.c
Normal file
File diff suppressed because it is too large
Load diff
206
gst-libs/gst/rtp/gstrtcpbuffer.h
Normal file
206
gst-libs/gst/rtp/gstrtcpbuffer.h
Normal file
|
@ -0,0 +1,206 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <2007> Wim Taymans <wim@fluendo.com>
|
||||
*
|
||||
* gstrtcpbuffer.h: various helper functions to manipulate buffers
|
||||
* with RTCP payload.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GST_RTCPBUFFER_H__
|
||||
#define __GST_RTCPBUFFER_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GST_RTCP_VERSION:
|
||||
*
|
||||
* The supported RTCP version 2.
|
||||
*/
|
||||
#define GST_RTCP_VERSION 2
|
||||
|
||||
/**
|
||||
* GstRTCPType:
|
||||
* @GST_RTCP_TYPE_INVALID: Invalid type
|
||||
* @GST_RTCP_TYPE_SR: Sender report
|
||||
* @GST_RTCP_TYPE_RR: Receiver report
|
||||
* @GST_RTCP_TYPE_SDES: Source description
|
||||
* @GST_RTCP_TYPE_BYE: Goodbye
|
||||
* @GST_RTCP_TYPE_APP: Application defined
|
||||
*
|
||||
* Different RTCP packet types.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GST_RTCP_TYPE_INVALID = 0,
|
||||
GST_RTCP_TYPE_SR = 200,
|
||||
GST_RTCP_TYPE_RR = 201,
|
||||
GST_RTCP_TYPE_SDES = 202,
|
||||
GST_RTCP_TYPE_BYE = 203,
|
||||
GST_RTCP_TYPE_APP = 204
|
||||
} GstRTCPType;
|
||||
|
||||
/**
|
||||
* GstRTCPSDESType:
|
||||
* @GST_RTCP_SDES_INVALID: Invalid SDES entry
|
||||
* @GST_RTCP_SDES_END: End of SDES list
|
||||
* @GST_RTCP_SDES_CNAME: Canonical name
|
||||
* @GST_RTCP_SDES_NAME: User name
|
||||
* @GST_RTCP_SDES_EMAIL: User's electronic mail address
|
||||
* @GST_RTCP_SDES_PHONE: User's phone number
|
||||
* @GST_RTCP_SDES_LOC: Geographic user location
|
||||
* @GST_RTCP_SDES_TOOL: Name of application or tool
|
||||
* @GST_RTCP_SDES_NOTE: Notice about the source
|
||||
* @GST_RTCP_SDES_PRIV: Private extensions
|
||||
*
|
||||
* Different types of SDES content.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GST_RTCP_SDES_INVALID = -1,
|
||||
GST_RTCP_SDES_END = 0,
|
||||
GST_RTCP_SDES_CNAME = 1,
|
||||
GST_RTCP_SDES_NAME = 2,
|
||||
GST_RTCP_SDES_EMAIL = 3,
|
||||
GST_RTCP_SDES_PHONE = 4,
|
||||
GST_RTCP_SDES_LOC = 5,
|
||||
GST_RTCP_SDES_TOOL = 6,
|
||||
GST_RTCP_SDES_NOTE = 7,
|
||||
GST_RTCP_SDES_PRIV = 8
|
||||
} GstRTCPSDESType;
|
||||
|
||||
/**
|
||||
* GST_RTCP_MAX_SDES:
|
||||
*
|
||||
* The maximum text length for an SDES item.
|
||||
*/
|
||||
#define GST_RTCP_MAX_SDES 255
|
||||
|
||||
/**
|
||||
* GST_RTCP_VALID_MASK:
|
||||
*
|
||||
* Mask for version, padding bit and packet type pair
|
||||
*/
|
||||
#define GST_RTCP_VALID_MASK (0xc000 | 0x2000 | 0xfe)
|
||||
/**
|
||||
* GST_RTCP_VALID_VALUE:
|
||||
*
|
||||
* Valid value for the first two bytes of an RTCP packet after applying
|
||||
* #GST_RTCP_VALID_MASK to them.
|
||||
*/
|
||||
#define GST_RTCP_VALID_VALUE ((GST_RTCP_VERSION << 14) | GST_RTCP_TYPE_SR)
|
||||
|
||||
typedef struct _GstRTCPPacket GstRTCPPacket;
|
||||
|
||||
/**
|
||||
* GstRTCPPacket:
|
||||
* @buffer: pointer to RTCP buffer
|
||||
* @offset: offset of packet in buffer data
|
||||
*
|
||||
* Data structure that points to a packet at @offset in @buffer.
|
||||
* The size of the structure is made public to allow stack allocations.
|
||||
*/
|
||||
struct _GstRTCPPacket
|
||||
{
|
||||
GstBuffer *buffer;
|
||||
guint offset;
|
||||
|
||||
/*< private >*/
|
||||
gboolean padding; /* padding field of current packet */
|
||||
guint8 count; /* count field of current packet */
|
||||
GstRTCPType type; /* type of current packet */
|
||||
guint16 length; /* length of current packet in 32-bits words */
|
||||
|
||||
guint chunk_offset; /* current chunk offset for navigating SDES */
|
||||
guint item_offset; /* current item offset for navigating SDE */
|
||||
};
|
||||
|
||||
/* creating buffers */
|
||||
GstBuffer* gst_rtcp_buffer_new_take_data (gpointer data, guint len);
|
||||
GstBuffer* gst_rtcp_buffer_new_copy_data (gpointer data, guint len);
|
||||
|
||||
gboolean gst_rtcp_buffer_validate_data (guint8 *data, guint len);
|
||||
gboolean gst_rtcp_buffer_validate (GstBuffer *buffer);
|
||||
|
||||
/* adding/retrieving packets */
|
||||
guint gst_rtcp_buffer_get_packet_count (GstBuffer *buffer);
|
||||
gboolean gst_rtcp_buffer_get_first_packet (GstBuffer *buffer, GstRTCPPacket *packet);
|
||||
gboolean gst_rtcp_packet_move_to_next (GstRTCPPacket *packet);
|
||||
|
||||
void gst_rtcp_buffer_add_packet (GstBuffer *buffer, GstRTCPType type,
|
||||
GstRTCPPacket *packet);
|
||||
void gst_rtcp_packet_remove (GstRTCPPacket *packet);
|
||||
|
||||
/* working with packets */
|
||||
gboolean gst_rtcp_packet_get_padding (GstRTCPPacket *packet);
|
||||
guint8 gst_rtcp_packet_get_count (GstRTCPPacket *packet);
|
||||
GstRTCPType gst_rtcp_packet_get_type (GstRTCPPacket *packet);
|
||||
guint16 gst_rtcp_packet_get_length (GstRTCPPacket *packet);
|
||||
|
||||
|
||||
/* sender reports */
|
||||
void gst_rtcp_packet_sr_get_sender_info (GstRTCPPacket *packet, guint32 *ssrc,
|
||||
guint64 *ntptime, guint32 *rtptime,
|
||||
guint32 *packet_count, guint32 *octet_count);
|
||||
void gst_rtcp_packet_sr_set_sender_info (GstRTCPPacket *packet, guint32 ssrc,
|
||||
guint64 ntptime, guint32 rtptime,
|
||||
guint32 packet_count, guint32 octet_count);
|
||||
/* receiver reports */
|
||||
guint32 gst_rtcp_packet_rr_get_ssrc (GstRTCPPacket *packet);
|
||||
void gst_rtcp_packet_rr_set_ssrc (GstRTCPPacket *packet, guint32 ssrc);
|
||||
|
||||
|
||||
/* report blocks for SR and RR */
|
||||
guint gst_rtcp_packet_get_rb_count (GstRTCPPacket *packet);
|
||||
void gst_rtcp_packet_get_rb (GstRTCPPacket *packet, guint nth, guint32 *ssrc,
|
||||
guint8 *fractionlost, gint32 *packetslost,
|
||||
guint32 *exthighestseq, guint32 *jitter,
|
||||
guint32 *lsr, guint32 *dlsr);
|
||||
void gst_rtcp_packet_add_rb (GstRTCPPacket *packet, guint32 ssrc,
|
||||
guint8 fractionlost, gint32 packetslost,
|
||||
guint32 exthighestseq, guint32 jitter,
|
||||
guint32 lsr, guint32 dlsr);
|
||||
void gst_rtcp_packet_set_rb (GstRTCPPacket *packet, guint nth, guint32 ssrc,
|
||||
guint8 fractionlost, gint32 packetslost,
|
||||
guint32 exthighestseq, guint32 jitter,
|
||||
guint32 lsr, guint32 dlsr);
|
||||
|
||||
/* source description packet */
|
||||
guint gst_rtcp_packet_sdes_get_chunk_count (GstRTCPPacket *packet);
|
||||
gboolean gst_rtcp_packet_sdes_first_chunk (GstRTCPPacket *packet);
|
||||
gboolean gst_rtcp_packet_sdes_next_chunk (GstRTCPPacket *packet);
|
||||
guint32 gst_rtcp_packet_sdes_get_ssrc (GstRTCPPacket *packet);
|
||||
gboolean gst_rtcp_packet_sdes_first_item (GstRTCPPacket *packet);
|
||||
gboolean gst_rtcp_packet_sdes_next_item (GstRTCPPacket *packet);
|
||||
gboolean gst_rtcp_packet_sdes_get_item (GstRTCPPacket *packet,
|
||||
GstRTCPSDESType *type, guint8 *len,
|
||||
gchar **data);
|
||||
|
||||
/* bye packet */
|
||||
guint gst_rtcp_packet_bye_get_ssrc_count (GstRTCPPacket *packet);
|
||||
guint32 gst_rtcp_packet_bye_get_nth_ssrc (GstRTCPPacket *packet, guint nth);
|
||||
void gst_rtcp_packet_bye_add_ssrc (GstRTCPPacket *packet, guint32 ssrc);
|
||||
void gst_rtcp_packet_bye_add_ssrcs (GstRTCPPacket *packet, guint32 *ssrc, guint len);
|
||||
guint8 gst_rtcp_packet_bye_get_reason_len (GstRTCPPacket *packet);
|
||||
gchar* gst_rtcp_packet_bye_get_reason (GstRTCPPacket *packet);
|
||||
gboolean gst_rtcp_packet_bye_set_reason (GstRTCPPacket *packet, const gchar *reason);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_RTCPBUFFER_H__ */
|
||||
|
Loading…
Reference in a new issue