Commit 84a1f4ba authored by Wim Taymans's avatar Wim Taymans

element: use request_new_pad_full as the default

Add GstCaps to request_new_pad so that request_new_pad_full can be removed.
Fix elements.
parent fbf30644
......@@ -1013,10 +1013,8 @@ _gst_element_request_pad (GstElement * element, GstPadTemplate * templ,
}
#endif
if (oclass->request_new_pad_full)
newpad = (oclass->request_new_pad_full) (element, templ, name, caps);
else if (oclass->request_new_pad)
newpad = (oclass->request_new_pad) (element, templ, name);
if (oclass->request_new_pad)
newpad = (oclass->request_new_pad) (element, templ, name, caps);
if (newpad)
gst_object_ref (newpad);
......
......@@ -627,7 +627,8 @@ struct _GstElementClass
/* virtual methods for subclasses */
/* request/release pads */
GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ, const gchar* name);
GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ,
const gchar* name, const GstCaps *caps);
void (*release_pad) (GstElement *element, GstPad *pad);
/* state changes */
......@@ -653,14 +654,6 @@ struct _GstElementClass
const GstQueryType* (*get_query_types) (GstElement *element);
gboolean (*query) (GstElement *element, GstQuery *query);
/*< private >*/
/*< public >*/
/* Virtual method for subclasses (additions) */
/* FIXME-0.11 Make this the default behaviour */
GstPad* (*request_new_pad_full) (GstElement *element, GstPadTemplate *templ,
const gchar* name, const GstCaps *caps);
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
......@@ -754,8 +747,7 @@ void gst_element_no_more_pads (GstElement *element);
GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name);
GstPad* gst_element_request_pad (GstElement *element,
GstPadTemplate *templ,
GstPad* gst_element_request_pad (GstElement *element, GstPadTemplate *templ,
const gchar * name, const GstCaps *caps);
void gst_element_release_request_pad (GstElement *element, GstPad *pad);
......
......@@ -113,7 +113,7 @@ G_DEFINE_TYPE_WITH_CODE (GstFunnel, gst_funnel, GST_TYPE_ELEMENT, _do_init);
static GstStateChangeReturn gst_funnel_change_state (GstElement * element,
GstStateChange transition);
static GstPad *gst_funnel_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name);
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
static void gst_funnel_release_pad (GstElement * element, GstPad * pad);
static GstFlowReturn gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer);
......@@ -175,7 +175,7 @@ gst_funnel_init (GstFunnel * funnel)
static GstPad *
gst_funnel_request_new_pad (GstElement * element, GstPadTemplate * templ,
const gchar * name)
const gchar * name, const GstCaps * caps)
{
GstPad *sinkpad;
......
......@@ -688,7 +688,7 @@ static void gst_input_selector_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static GstPad *gst_input_selector_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * unused);
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps);
static void gst_input_selector_release_pad (GstElement * element, GstPad * pad);
static GstStateChangeReturn gst_input_selector_change_state (GstElement *
......@@ -1261,7 +1261,7 @@ gst_input_selector_activate_sinkpad (GstInputSelector * sel, GstPad * pad)
static GstPad *
gst_input_selector_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * unused)
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps)
{
GstInputSelector *sel;
gchar *name = NULL;
......
......@@ -255,7 +255,7 @@ static void gst_multi_queue_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static GstPad *gst_multi_queue_request_new_pad (GstElement * element,
GstPadTemplate * temp, const gchar * name);
GstPadTemplate * temp, const gchar * name, const GstCaps * caps);
static void gst_multi_queue_release_pad (GstElement * element, GstPad * pad);
static GstStateChangeReturn gst_multi_queue_change_state (GstElement *
element, GstStateChange transition);
......@@ -585,7 +585,7 @@ out:
static GstPad *
gst_multi_queue_request_new_pad (GstElement * element, GstPadTemplate * temp,
const gchar * name)
const gchar * name, const GstCaps * caps)
{
GstMultiQueue *mqueue = GST_MULTI_QUEUE (element);
GstSingleQueue *squeue;
......
......@@ -99,7 +99,7 @@ static void gst_output_selector_set_property (GObject * object,
static void gst_output_selector_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static GstPad *gst_output_selector_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * unused);
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps);
static void gst_output_selector_release_pad (GstElement * element,
GstPad * pad);
static GstFlowReturn gst_output_selector_chain (GstPad * pad, GstBuffer * buf);
......@@ -351,7 +351,7 @@ gst_output_selector_switch_pad_negotiation_mode (GstOutputSelector * sel,
static GstPad *
gst_output_selector_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name)
GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
{
gchar *padname;
GstPad *srcpad;
......
......@@ -125,7 +125,7 @@ typedef struct
} PushData;
static GstPad *gst_tee_request_new_pad (GstElement * element,
GstPadTemplate * temp, const gchar * unused);
GstPadTemplate * temp, const gchar * unused, const GstCaps * caps);
static void gst_tee_release_pad (GstElement * element, GstPad * pad);
static void gst_tee_finalize (GObject * object);
......@@ -273,7 +273,7 @@ gst_tee_notify_alloc_pad (GstTee * tee)
static GstPad *
gst_tee_request_new_pad (GstElement * element, GstPadTemplate * templ,
const gchar * unused)
const gchar * unused, const GstCaps * caps)
{
gchar *name;
GstPad *srcpad;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment