gstreamer/gst-libs/gst/rtp
Stefan Kost 131fb86b4b Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass
Original commit message from CVS:
* ext/alsa/gstalsamixerelement.h:
* ext/alsa/gstalsamixeroptions.h:
* ext/alsa/gstalsamixertrack.h:
* ext/gnomevfs/gstgnomevfssink.h:
* ext/gnomevfs/gstgnomevfssrc.h:
* ext/theora/gsttheoradec.h:
* ext/theora/gsttheoraenc.h:
* ext/theora/gsttheoraparse.h:
* ext/vorbis/vorbisparse.h:
* gst-libs/gst/audio/gstaudioclock.h:
* gst-libs/gst/audio/gstaudiofilter.h:
* gst-libs/gst/rtp/gstbasertpaudiopayload.h:
* gst/audioconvert/gstaudioconvert.h:
* gst/audioresample/gstaudioresample.h:
* gst/audiotestsrc/gstaudiotestsrc.h:
* gst/ffmpegcolorspace/gstffmpegcolorspace.h:
* gst/playback/gststreamselector.h:
* gst/tcp/gstmultifdsink.h:
* gst/tcp/gsttcpclientsink.h:
* gst/tcp/gsttcpclientsrc.h:
* gst/tcp/gsttcpserversink.h:
* gst/tcp/gsttcpserversrc.h:
* gst/videorate/gstvideorate.h:
* gst/videoscale/gstvideoscale.h:
* gst/videotestsrc/gstvideotestsrc.h:
* gst/volume/gstvolume.h:
* sys/v4l/gstv4ljpegsrc.h:
* sys/v4l/gstv4lmjpegsink.h:
* sys/v4l/gstv4lmjpegsrc.h:
* sys/v4l/gstv4lsrc.h:
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.h:
* tests/old/testsuite/alsa/sinesrc.h:
Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass
2006-06-01 19:19:51 +00:00
..
gstbasertpaudiopayload.c gst-libs/gst/rtp/gstbasertpaudiopayload.c: 80 line columns 2006-05-19 17:57:56 +00:00
gstbasertpaudiopayload.h Fix more gobject macros: obj<->klass, GstXXX<->GstXXXClass 2006-06-01 19:19:51 +00:00
gstbasertpdepayload.c gst-libs/gst/rtp/gstbasertpdepayload.c: Fix some memory leaks: on finalize, free buffers left in the queue before des... 2006-04-11 17:31:29 +00:00
gstbasertpdepayload.h Fix broken GObject macros 2006-04-08 18:09:17 +00:00
gstbasertppayload.c some RTP debug 2006-05-02 06:33:54 +00:00
gstbasertppayload.h Fix broken GObject macros 2006-04-08 18:09:17 +00:00
gstrtpbuffer.c expand tabs 2005-12-06 19:42:02 +00:00
gstrtpbuffer.h gst-libs/gst/rtp/README: Some new documentation 2006-05-18 23:00:02 +00:00
Makefile.am reverting rtp patches to fix freeze break on -base as explained on the list 2006-04-13 09:26:27 +00:00
README gst-libs/gst/rtp/README: Some new documentation 2006-05-18 23:00:02 +00:00

The RTP libraries
---------------------

  RTP Buffers
  -----------
  The real time protocol as described in RFC 3550 requires the use of special
  packets containing an additional RTP header of at least 12 bytes. GStreamer
  provides some helper functions for creating and parsing these RTP headers.
  The result is a normal #GstBuffer with an additional RTP header.
 
  RTP buffers are usually created with gst_rtp_buffer_new_allocate() or
  gst_rtp_buffer_new_allocate_len(). These functions create buffers with a
  preallocated space of memory. It will also ensure that enough memory
  is allocated for the RTP header. The first function is used when the payload
  size is known. gst_rtp_buffer_new_allocate_len() should be used when the size
  of the whole RTP buffer (RTP header + payload) is known.
 
  When receiving RTP buffers from a network, gst_rtp_buffer_new_take_data()
  should be used when the user would like to parse that RTP packet. (TODO Ask
  Wim what the real purpose of this function is as it seems to simply create a
  duplicate GstBuffer with the same data as the previous one). The
  function will create a new RTP buffer with the given data as the whole RTP
  packet. Alternatively, gst_rtp_buffer_new_copy_data() can be used if the user
  wishes to make a copy of the data before using it in the new RTP buffer. An
  important function is gst_rtp_buffer_validate() that is used to verify that
  the buffer a well formed RTP buffer.
 
  It is now possible to use all the gst_rtp_buffer_get_*() or
  gst_rtp_buffer_set_*() functions to read or write the different parts of the
  RTP header such as the payload type, the sequence number or the RTP
  timestamp. The use can also retreive a pointer to the actual RTP payload data
  using the gst_rtp_buffer_get_payload() function.

  RTP Base Payloader Class (GstBaseRTPPayload)
  --------------------------------------------

  All RTP payloader elements (audio or video) should derive from this class.

  RTP Base Audio Payloader Class (GstBaseRTPAudioPayload)
  -------------------------------------------------------

  This class derives from GstBaseRTPPayload.
  It can be used for payloading audio codecs. It will only work with constant
  bitrate codecs. It supports both frame based and sample based codecs. It takes
  care of packing up the audio data into RTP packets and filling up the headers
  accordingly. The payloading is done based on the maximum MTU (mtu) and the
  maximum time per packet (max-ptime). The general idea is to divide large data
  buffers into smaller RTP packets. The RTP packet size is the minimum of either
  the MTU, max-ptime (if set) or available data. Any residual data is always
  sent in a last RTP packet (no minimum RTP packet size). The idea is that since
  this is a real time protocol, data should never be delayed. In the case of
  frame based codecs, the resulting RTP packets always contain full frames.

  To use this base class, your child element needs to call either
  gst_basertpaudiopayload_set_frame_based() or
  gst_basertpaudiopayload_set_sample_based(). This is usually done in the
  element's _init() function. Then, the child element must call either
  gst_basertpaudiopayload_set_frame_options() or
  gst_basertpaudiopayload_set_sample_options(). Since GstBaseRTPAudioPayload
  derives from GstBaseRTPPayload, the child element must set any variables or
  call/override any functions required by that base class. The child element
  does not need to override any other functions specific to
  GstBaseRTPAudioPayload.

  This base class can be tested through it's children classes. Here is an
  example using the iLBC payloader (frame based).

  For 20ms mode :

  GST_DEBUG="basertpaudiopayload:5" gst-launch-0.10 fakesrc sizetype=2
  sizemax=114 datarate=1900 ! audio/x-iLBC, mode=20 !  rtpilbcpay
  max-ptime="40000000" ! fakesink

  For 30ms mode :

  GST_DEBUG="basertpaudiopayload:5" gst-launch-0.10 fakesrc sizetype=2
  sizemax=150 datarate=1662 ! audio/x-iLBC, mode=30 !  rtpilbcpay
  max-ptime="60000000" ! fakesink

  Here is an example using the uLaw payloader (sample based).

  GST_DEBUG="basertpaudiopayload:5" gst-launch-0.10 fakesrc sizetype=2
  sizemax=150 datarate=8000 ! audio/x-mulaw ! rtppcmupay max-ptime="6000000" !
  fakesink

  RTP Base Depayloader Class (GstBaseRTPDepayload)
  ------------------------------------------------

  All RTP depayloader elements (audio or video) should derive from this class.