From: Zeeshan Ali Date: Tue, 25 Oct 2005 17:20:55 +0000 (+0000) Subject: The pad-template on the sinkpad should be set by the derived classes. Also added... X-Git-Tag: RELEASE-0_9_5~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6b0ca0572873aa86e6b6eb9d44270876d570369;p=platform%2Fupstream%2Fgst-plugins-base.git The pad-template on the sinkpad should be set by the derived classes. Also added some usefull macros. Original commit message from CVS: The pad-template on the sinkpad should be set by the derived classes. Also added some usefull macros. --- diff --git a/ChangeLog b/ChangeLog index 3f6d86325..6792c2c67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-10-25 Zeeshan Ali + + * gst-libs/gst/rtp/gstbasertpdepayload.c: + (gst_base_rtp_depayload_base_init), + (gst_base_rtp_depayload_finalize): + * gst-libs/gst/rtp/gstbasertpdepayload.h: + * gst-libs/gst/rtp/gstbasertppayload.h: + The pad-template on the sinkpad should be set by the derived classes. Also + added some usefull macros. + 2005-10-24 Wim Taymans * ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet): diff --git a/gst-libs/gst/rtp/gstbasertpdepayload.c b/gst-libs/gst/rtp/gstbasertpdepayload.c index 33732e971..b05f093d8 100644 --- a/gst-libs/gst/rtp/gstbasertpdepayload.c +++ b/gst-libs/gst/rtp/gstbasertpdepayload.c @@ -36,12 +36,6 @@ enum ARG_QUEUEDELAY, }; -static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("application/x-rtp") - ); - static GstElementClass *parent_class = NULL; static void gst_base_rtp_depayload_base_init (GstBaseRTPDepayloadClass * klass); @@ -100,10 +94,7 @@ static void gst_base_rtp_depayload_set_gst_timestamp static void gst_base_rtp_depayload_base_init (GstBaseRTPDepayloadClass * klass) { - GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + //GstElementClass *element_class = GST_ELEMENT_CLASS (klass); } static void @@ -176,7 +167,9 @@ gst_base_rtp_depayload_finalize (GObject * object) { // free our queue g_queue_free (GST_BASE_RTP_DEPAYLOAD (object)->queue); - G_OBJECT_CLASS (parent_class)->finalize (object); + + if (G_OBJECT_CLASS (parent_class)->finalize) + G_OBJECT_CLASS (parent_class)->finalize (object); } static gboolean diff --git a/gst-libs/gst/rtp/gstbasertpdepayload.h b/gst-libs/gst/rtp/gstbasertpdepayload.h index ad9f1a4ec..e199aa83d 100644 --- a/gst-libs/gst/rtp/gstbasertpdepayload.h +++ b/gst-libs/gst/rtp/gstbasertpdepayload.h @@ -38,6 +38,9 @@ G_BEGIN_DECLS #define GST_IS_BASE_RTP_DEPAYLOAD_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_RTP_DEPAYLOAD)) +#define GST_BASE_RTP_DEPAYLOAD_SINKPAD(depayload) (GST_BASE_RTP_DEPAYLOAD (depayload)->sinkpad) +#define GST_BASE_RTP_DEPAYLOAD_SRCPAD(depayload) (GST_BASE_RTP_DEPAYLOAD (depayload)->srcpad) + // in milliseconds #define RTP_QUEUEDELAY 100; diff --git a/gst-libs/gst/rtp/gstbasertppayload.h b/gst-libs/gst/rtp/gstbasertppayload.h index 9accc1dd1..786f00efe 100644 --- a/gst-libs/gst/rtp/gstbasertppayload.h +++ b/gst-libs/gst/rtp/gstbasertppayload.h @@ -42,7 +42,6 @@ typedef struct _GstBaseRTPPayloadClass GstBaseRTPPayloadClass; #define GST_BASE_RTP_PAYLOAD_SINKPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->sinkpad) #define GST_BASE_RTP_PAYLOAD_SRCPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->srcpad) -#define GST_BASE_RTP_PAYLOAD_SINKPAD(payload) (GST_BASE_RTP_PAYLOAD (payload)->sinkpad) #define GST_BASE_RTP_PAYLOAD_PT(payload) (GST_BASE_RTP_PAYLOAD (payload)->pt) #define GST_BASE_RTP_PAYLOAD_MTU(payload) (GST_BASE_RTP_PAYLOAD (payload)->mtu)