• Home
Name Date Size #Lines LOC

..--

READMED12-May-20242.8 KiB6548

gstrtcpbuffer.cD12-May-202491.9 KiB3,6261,873

gstrtcpbuffer.hD12-May-202422.5 KiB672330

gstrtp-enumtypes.cD12-May-202411.8 KiB266238

gstrtp-enumtypes.hD12-May-20241.8 KiB6535

gstrtpbaseaudiopayload.cD12-May-202431.5 KiB1,025645

gstrtpbaseaudiopayload.hD12-May-20244.2 KiB12565

gstrtpbasedepayload.cD12-May-202450.5 KiB1,6961,205

gstrtpbasedepayload.hD12-May-20245.2 KiB13656

gstrtpbasepayload.cD12-May-202476.9 KiB2,3841,677

gstrtpbasepayload.hD12-May-20246.8 KiB200103

gstrtpbuffer.cD12-May-202446.4 KiB1,769874

gstrtpbuffer.hD12-May-202410 KiB287151

gstrtpdefs.hD12-May-20241.8 KiB5912

gstrtphdrext.cD12-May-202427.1 KiB917478

gstrtphdrext.hD12-May-202412.5 KiB295147

gstrtpmeta.cD12-May-20245.8 KiB230117

gstrtpmeta.hD12-May-20242.5 KiB8035

gstrtppayloads.cD12-May-202410 KiB233140

gstrtppayloads.hD12-May-20246.4 KiB20087

meson.buildD12-May-20242.5 KiB8880

rtp-prelude.hD12-May-20241.1 KiB349

rtp.hD12-May-20241.3 KiB3713

README

1The RTP libraries
2---------------------
3
4  RTP Buffers
5  -----------
6  The real time protocol as described in RFC 3550 requires the use of special
7  packets containing an additional RTP header of at least 12 bytes. GStreamer
8  provides some helper functions for creating and parsing these RTP headers.
9  The result is a normal #GstBuffer with an additional RTP header.
10
11  RTP buffers are usually created with gst_rtp_buffer_new_allocate() or
12  gst_rtp_buffer_new_allocate_len(). These functions create buffers with a
13  preallocated space of memory. It will also ensure that enough memory
14  is allocated for the RTP header. The first function is used when the payload
15  size is known. gst_rtp_buffer_new_allocate_len() should be used when the size
16  of the whole RTP buffer (RTP header + payload) is known.
17
18  When receiving RTP buffers from a network, gst_rtp_buffer_new_take_data()
19  should be used when the user would like to parse that RTP packet. (TODO Ask
20  Wim what the real purpose of this function is as it seems to simply create a
21  duplicate GstBuffer with the same data as the previous one). The
22  function will create a new RTP buffer with the given data as the whole RTP
23  packet. Alternatively, gst_rtp_buffer_new_copy_data() can be used if the user
24  wishes to make a copy of the data before using it in the new RTP buffer.
25
26  It is now possible to use all the gst_rtp_buffer_get_*() or
27  gst_rtp_buffer_set_*() functions to read or write the different parts of the
28  RTP header such as the payload type, the sequence number or the RTP
29  timestamp. The use can also retrieve a pointer to the actual RTP payload data
30  using the gst_rtp_buffer_get_payload() function.
31
32  RTP Base Payloader Class (GstBaseRTPPayload)
33  --------------------------------------------
34
35  All RTP payloader elements (audio or video) should derive from this class.
36
37  RTP Base Audio Payloader Class (GstBaseRTPAudioPayload)
38  -------------------------------------------------------
39
40  This base class can be tested through it's children classes. Here is an
41  example using the iLBC payloader (frame based).
42
43  For 20ms mode :
44
45  GST_DEBUG="basertpaudiopayload:5" gst-launch-1.0 fakesrc sizetype=2
46  sizemax=114 datarate=1900 ! audio/x-iLBC, mode=20 !  rtpilbcpay
47  max-ptime="40000000" ! fakesink
48
49  For 30ms mode :
50
51  GST_DEBUG="basertpaudiopayload:5" gst-launch-1.0 fakesrc sizetype=2
52  sizemax=150 datarate=1662 ! audio/x-iLBC, mode=30 !  rtpilbcpay
53  max-ptime="60000000" ! fakesink
54
55  Here is an example using the uLaw payloader (sample based).
56
57  GST_DEBUG="basertpaudiopayload:5" gst-launch-1.0 fakesrc sizetype=2
58  sizemax=150 datarate=8000 ! audio/x-mulaw ! rtppcmupay max-ptime="6000000" !
59  fakesink
60
61  RTP Base Depayloader Class (GstBaseRTPDepayload)
62  ------------------------------------------------
63
64  All RTP depayloader elements (audio or video) should derive from this class.
65