summaryrefslogtreecommitdiffstats
path: root/gst/rtp/gstrtph263pdepay.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2005-09-15 13:57:56 +0000
committerWim Taymans <wim.taymans@gmail.com>2005-09-15 13:57:56 +0000
commitfc158bc3c2739eabfb092f7a45f6656ac8c96e25 (patch)
tree199f9ea3d2fddfcbc8315e95d6fe17c2e9936cd5 /gst/rtp/gstrtph263pdepay.c
parentc7468729e9e05fa3cbcf6ee1fbbd578c516e2200 (diff)
Updates to payloader/depayloaders, make payloaders use the base classes.
Original commit message from CVS: Updates to payloader/depayloaders, make payloaders use the base classes. Updated README with suggested RTP caps and how to convert to/from SDP. Added config descriptor in mp4v payloader.
Diffstat (limited to 'gst/rtp/gstrtph263pdepay.c')
-rw-r--r--gst/rtp/gstrtph263pdepay.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/gst/rtp/gstrtph263pdepay.c b/gst/rtp/gstrtph263pdepay.c
index 62c2d61c..16fd8be5 100644
--- a/gst/rtp/gstrtph263pdepay.c
+++ b/gst/rtp/gstrtph263pdepay.c
@@ -53,13 +53,17 @@ static GstStaticPadTemplate gst_rtph263pdec_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("application/x-rtp")
+ GST_STATIC_CAPS ("application/x-rtp, "
+ "media = (string) \"video\", "
+ "payload = (int) [ 96, 255 ], "
+ "clock_rate = (int) 90000, " "encoding_name = (string) \"H263-1998\"")
);
static void gst_rtph263pdec_class_init (GstRtpH263PDecClass * klass);
static void gst_rtph263pdec_base_init (GstRtpH263PDecClass * klass);
static void gst_rtph263pdec_init (GstRtpH263PDec * rtph263pdec);
+static void gst_rtph263pdec_finalize (GObject * object);
static GstFlowReturn gst_rtph263pdec_chain (GstPad * pad, GstBuffer * buffer);
@@ -122,6 +126,8 @@ gst_rtph263pdec_class_init (GstRtpH263PDecClass * klass)
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
+ gobject_class->finalize = gst_rtph263pdec_finalize;
+
gobject_class->set_property = gst_rtph263pdec_set_property;
gobject_class->get_property = gst_rtph263pdec_get_property;
@@ -145,6 +151,19 @@ gst_rtph263pdec_init (GstRtpH263PDec * rtph263pdec)
rtph263pdec->adapter = gst_adapter_new ();
}
+static void
+gst_rtph263pdec_finalize (GObject * object)
+{
+ GstRtpH263PDec *rtph263pdec;
+
+ rtph263pdec = GST_RTP_H263P_DEC (object);
+
+ g_object_unref (rtph263pdec->adapter);
+ rtph263pdec->adapter = NULL;
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
static GstFlowReturn
gst_rtph263pdec_chain (GstPad * pad, GstBuffer * buf)
{
@@ -292,6 +311,9 @@ gst_rtph263pdec_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
+ gst_adapter_clear (rtph263pdec->adapter);
+ break;
default:
break;
}