|  |  |  | GStreamer Base Plugins 0.10 Library Reference Manual |  | 
|---|---|---|---|---|
#include <gst/rtp/gstbasertppayload.h>
                    GstBaseRTPPayload;
                    GstBaseRTPPayloadClass;
#define             GST_BASE_RTP_PAYLOAD_MTU            (payload)
#define             GST_BASE_RTP_PAYLOAD_PT             (payload)
#define             GST_BASE_RTP_PAYLOAD_SINKPAD        (payload)
#define             GST_BASE_RTP_PAYLOAD_SRCPAD         (payload)
gboolean            gst_basertppayload_is_filled        (GstBaseRTPPayload *payload,
                                                         guint size,
                                                         GstClockTime duration);
GstFlowReturn       gst_basertppayload_push             (GstBaseRTPPayload *payload,
                                                         GstBuffer *buffer);
void                gst_basertppayload_set_options      (GstBaseRTPPayload *payload,
                                                         gchar *media,
                                                         gboolean dynamic,
                                                         gchar *encoding_name,
                                                         guint32 clock_rate);
gboolean            gst_basertppayload_set_outcaps      (GstBaseRTPPayload *payload,
                                                         gchar *fieldname,
                                                         ...);
  GObject
   +----GstObject
         +----GstElement
               +----GstBaseRTPPayload
                     +----GstBaseRTPAudioPayload
"max-ptime" gint64 : Read / Write "min-ptime" gint64 : Read / Write "mtu" guint : Read / Write "pt" guint : Read / Write "seqnum" guint : Read "seqnum-offset" gint : Read / Write "ssrc" guint : Read / Write "timestamp" guint : Read "timestamp-offset" guint : Read / Write
typedef struct {
  GstElementClass parent_class;
  /* receive caps on the sink pad, configure the payloader. */
  gboolean      (*set_caps)             (GstBaseRTPPayload *payload, GstCaps *caps);
  /* handle a buffer, perform 0 or more gst_basertppayload_push() on
   * the RTP buffers */
  GstFlowReturn (*handle_buffer)        (GstBaseRTPPayload *payload, 
                                         GstBuffer *buffer);
  gboolean      (*handle_event)         (GstPad * pad, GstEvent * event);
  GstCaps *     (*get_caps)             (GstBaseRTPPayload *payload, GstPad * pad);
} GstBaseRTPPayloadClass;
#define GST_BASE_RTP_PAYLOAD_MTU(payload) (GST_BASE_RTP_PAYLOAD (payload)->mtu)
Get access to the configured MTU of payload.
| 
 | a GstBaseRTPPayload | 
#define GST_BASE_RTP_PAYLOAD_PT(payload) (GST_BASE_RTP_PAYLOAD (payload)->pt)
Get access to the configured payload type of payload.
| 
 | a GstBaseRTPPayload | 
#define GST_BASE_RTP_PAYLOAD_SINKPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->sinkpad)
Get access to the sinkpad of payload.
| 
 | a GstBaseRTPPayload | 
#define GST_BASE_RTP_PAYLOAD_SRCPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->srcpad)
Get access to the srcpad of payload.
| 
 | a GstBaseRTPPayload | 
gboolean gst_basertppayload_is_filled (GstBaseRTPPayload *payload, guint size, GstClockTime duration);
Check if the packet with size and duration would exceed the configure
maximum size.
| 
 | a GstBaseRTPPayload | 
| 
 | the size of the packet | 
| 
 | the duration of the packet | 
| Returns : | TRUEif the packet ofsizeanddurationwould exceed the
configured MTU or max_ptime. | 
GstFlowReturn gst_basertppayload_push (GstBaseRTPPayload *payload, GstBuffer *buffer);
Push buffer to the peer element of the payloader. The SSRC, payload type,
seqnum and timestamp of the RTP buffer will be updated first.
This function takes ownership of buffer.
| 
 | a GstBaseRTPPayload | 
| 
 | a GstBuffer | 
| Returns : | a GstFlowReturn. | 
void gst_basertppayload_set_options (GstBaseRTPPayload *payload, gchar *media, gboolean dynamic, gchar *encoding_name, guint32 clock_rate);
Set the rtp options of the payloader. These options will be set in the caps
of the payloader. Subclasses must call this method before calling
gst_basertppayload_push() or gst_basertppayload_set_outcaps().
| 
 | a GstBaseRTPPayload | 
| 
 | the media type (typically "audio" or "video") | 
| 
 | if the payload type is dynamic | 
| 
 | the encoding name | 
| 
 | the clock rate of the media | 
gboolean gst_basertppayload_set_outcaps (GstBaseRTPPayload *payload, gchar *fieldname, ...);
Configure the output caps with the optional parameters.
Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be NULL.
| 
 | a GstBaseRTPPayload | 
| 
 | the first field name or NULL | 
| 
 | field values | 
| Returns : | TRUEif the caps could be set. | 
"max-ptime" property"max-ptime" gint64 : Read / Write
Maximum duration of the packet data in ns (-1 = unlimited up to MTU).
Allowed values: >= -1
Default value: -1
"min-ptime" property"min-ptime" gint64 : Read / Write
Minimum duration of the packet data in ns (can't go above MTU).
Allowed values: >= 0
Default value: 0
"mtu" property"mtu" guint : Read / Write
Maximum size of one packet.
Allowed values: >= 28
Default value: 1400
"pt" property"pt" guint : Read / Write
The payload type of the packets.
Allowed values: <= 128
Default value: 96
"seqnum" property"seqnum" guint : Read
The RTP sequence number of the last processed packet.
Allowed values: <= 65535
Default value: 0
"seqnum-offset" property"seqnum-offset" gint : Read / Write
Offset to add to all outgoing seqnum (-1 = random).
Allowed values: [-1,65535]
Default value: -1
"ssrc" property"ssrc" guint : Read / Write
The SSRC of the packets (default == random).
Default value: 4294967295
"timestamp" property"timestamp" guint : Read
The RTP timestamp of the last processed packet.
Default value: 0