mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
-base: fix for now request pad API
This commit is contained in:
parent
995fe2fedc
commit
7cad11e912
8 changed files with 25 additions and 20 deletions
|
@ -116,7 +116,7 @@ static GstFlowReturn
|
|||
gst_ogg_mux_collected (GstCollectPads * pads, GstOggMux * ogg_mux);
|
||||
static gboolean gst_ogg_mux_handle_src_event (GstPad * pad, GstEvent * event);
|
||||
static GstPad *gst_ogg_mux_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name);
|
||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
||||
static void gst_ogg_mux_release_pad (GstElement * element, GstPad * pad);
|
||||
|
||||
static void gst_ogg_mux_set_property (GObject * object,
|
||||
|
@ -349,7 +349,7 @@ gst_ogg_mux_generate_serialno (GstOggMux * ogg_mux)
|
|||
|
||||
static GstPad *
|
||||
gst_ogg_mux_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * req_name)
|
||||
GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps)
|
||||
{
|
||||
GstOggMux *ogg_mux;
|
||||
GstPad *newpad;
|
||||
|
|
|
@ -131,7 +131,7 @@ static gboolean gst_adder_src_event (GstPad * pad, GstEvent * event);
|
|||
static gboolean gst_adder_sink_event (GstPad * pad, GstEvent * event);
|
||||
|
||||
static GstPad *gst_adder_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * temp, const gchar * unused);
|
||||
GstPadTemplate * temp, const gchar * unused, const GstCaps * caps);
|
||||
static void gst_adder_release_pad (GstElement * element, GstPad * pad);
|
||||
|
||||
static GstStateChangeReturn gst_adder_change_state (GstElement * element,
|
||||
|
@ -958,7 +958,7 @@ gst_adder_get_property (GObject * object, guint prop_id, GValue * value,
|
|||
|
||||
static GstPad *
|
||||
gst_adder_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
||||
const gchar * unused)
|
||||
const gchar * unused, const GstCaps * caps)
|
||||
{
|
||||
gchar *name;
|
||||
GstAdder *adder;
|
||||
|
|
|
@ -368,7 +368,7 @@ gst_encode_bin_class_init (GstEncodeBinClass * klass)
|
|||
|
||||
gstelement_klass->change_state =
|
||||
GST_DEBUG_FUNCPTR (gst_encode_bin_change_state);
|
||||
gstelement_klass->request_new_pad_full =
|
||||
gstelement_klass->request_new_pad =
|
||||
GST_DEBUG_FUNCPTR (gst_encode_bin_request_new_pad);
|
||||
gstelement_klass->release_pad =
|
||||
GST_DEBUG_FUNCPTR (gst_encode_bin_release_pad);
|
||||
|
@ -820,7 +820,7 @@ beach:
|
|||
|
||||
static GstPad *
|
||||
local_element_request_pad (GstElement * element, GstPadTemplate * templ,
|
||||
const gchar * name)
|
||||
const gchar * name, const GstCaps * caps)
|
||||
{
|
||||
GstPad *newpad = NULL;
|
||||
GstElementClass *oclass;
|
||||
|
@ -828,7 +828,7 @@ local_element_request_pad (GstElement * element, GstPadTemplate * templ,
|
|||
oclass = GST_ELEMENT_GET_CLASS (element);
|
||||
|
||||
if (oclass->request_new_pad)
|
||||
newpad = (oclass->request_new_pad) (element, templ, name);
|
||||
newpad = (oclass->request_new_pad) (element, templ, name, caps);
|
||||
|
||||
if (newpad)
|
||||
gst_object_ref (newpad);
|
||||
|
@ -1095,7 +1095,8 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
|
|||
|
||||
/* Path 1 : Already-encoded data */
|
||||
sinkpad =
|
||||
local_element_request_pad (sgroup->combiner, NULL, "passthroughsink");
|
||||
local_element_request_pad (sgroup->combiner, NULL, "passthroughsink",
|
||||
NULL);
|
||||
if (G_UNLIKELY (sinkpad == NULL))
|
||||
goto no_combiner_sinkpad;
|
||||
|
||||
|
@ -1122,7 +1123,9 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
|
|||
g_object_unref (srcpad);
|
||||
}
|
||||
|
||||
srcpad = local_element_request_pad (sgroup->splitter, NULL, "passthroughsrc");
|
||||
srcpad =
|
||||
local_element_request_pad (sgroup->splitter, NULL, "passthroughsrc",
|
||||
NULL);
|
||||
if (G_UNLIKELY (srcpad == NULL))
|
||||
goto no_splitter_srcpad;
|
||||
|
||||
|
@ -1141,7 +1144,8 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
|
|||
gst_bin_add ((GstBin *) ebin, sgroup->encoder);
|
||||
tosync = g_list_append (tosync, sgroup->encoder);
|
||||
|
||||
sinkpad = local_element_request_pad (sgroup->combiner, NULL, "encodingsink");
|
||||
sinkpad =
|
||||
local_element_request_pad (sgroup->combiner, NULL, "encodingsink", NULL);
|
||||
if (G_UNLIKELY (sinkpad == NULL))
|
||||
goto no_combiner_sinkpad;
|
||||
srcpad = gst_element_get_static_pad (sgroup->encoder, "src");
|
||||
|
@ -1235,7 +1239,8 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
|
|||
|
||||
/* Link to stream splitter */
|
||||
sinkpad = gst_element_get_static_pad (last, "sink");
|
||||
srcpad = local_element_request_pad (sgroup->splitter, NULL, "encodingsrc");
|
||||
srcpad =
|
||||
local_element_request_pad (sgroup->splitter, NULL, "encodingsrc", NULL);
|
||||
if (G_UNLIKELY (srcpad == NULL))
|
||||
goto no_splitter_srcpad;
|
||||
if (G_UNLIKELY (fast_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK))
|
||||
|
|
|
@ -44,7 +44,7 @@ G_DEFINE_TYPE (GstStreamCombiner, gst_stream_combiner, GST_TYPE_ELEMENT);
|
|||
static void gst_stream_combiner_dispose (GObject * object);
|
||||
|
||||
static GstPad *gst_stream_combiner_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name);
|
||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
||||
static void gst_stream_combiner_release_pad (GstElement * element,
|
||||
GstPad * pad);
|
||||
|
||||
|
@ -217,7 +217,7 @@ gst_stream_combiner_init (GstStreamCombiner * stream_combiner)
|
|||
|
||||
static GstPad *
|
||||
gst_stream_combiner_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name)
|
||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
|
||||
{
|
||||
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) element;
|
||||
GstPad *sinkpad;
|
||||
|
|
|
@ -44,7 +44,7 @@ G_DEFINE_TYPE (GstStreamSplitter, gst_stream_splitter, GST_TYPE_ELEMENT);
|
|||
static void gst_stream_splitter_dispose (GObject * object);
|
||||
|
||||
static GstPad *gst_stream_splitter_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name);
|
||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
||||
static void gst_stream_splitter_release_pad (GstElement * element,
|
||||
GstPad * pad);
|
||||
|
||||
|
@ -387,7 +387,7 @@ gst_stream_splitter_init (GstStreamSplitter * stream_splitter)
|
|||
|
||||
static GstPad *
|
||||
gst_stream_splitter_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name)
|
||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
|
||||
{
|
||||
GstStreamSplitter *stream_splitter = (GstStreamSplitter *) element;
|
||||
GstPad *srcpad;
|
||||
|
|
|
@ -245,7 +245,7 @@ static void gst_play_sink_get_property (GObject * object, guint prop_id,
|
|||
GValue * value, GParamSpec * spec);
|
||||
|
||||
static GstPad *gst_play_sink_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name);
|
||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
||||
static void gst_play_sink_release_request_pad (GstElement * element,
|
||||
GstPad * pad);
|
||||
static gboolean gst_play_sink_send_event (GstElement * element,
|
||||
|
@ -2979,7 +2979,7 @@ gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type)
|
|||
|
||||
static GstPad *
|
||||
gst_play_sink_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
||||
const gchar * name)
|
||||
const gchar * name, const GstCaps * caps)
|
||||
{
|
||||
GstPlaySink *psink;
|
||||
GstPad *pad;
|
||||
|
|
|
@ -376,7 +376,7 @@ static void gst_stream_selector_get_property (GObject * object,
|
|||
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||
|
||||
static GstPad *gst_stream_selector_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * unused);
|
||||
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps);
|
||||
static void gst_stream_selector_release_pad (GstElement * element,
|
||||
GstPad * pad);
|
||||
static GstIterator *gst_stream_selector_pad_iterate_linked_pads (GstPad * pad);
|
||||
|
@ -652,7 +652,7 @@ gst_stream_selector_pad_iterate_linked_pads (GstPad * pad)
|
|||
|
||||
static GstPad *
|
||||
gst_stream_selector_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * unused)
|
||||
GstPadTemplate * templ, const gchar * unused, const GstCaps * caps)
|
||||
{
|
||||
GstStreamSelector *sel;
|
||||
gchar *name = NULL;
|
||||
|
|
|
@ -681,7 +681,7 @@ done:
|
|||
/* GstElement vfuncs */
|
||||
static GstPad *
|
||||
gst_stream_synchronizer_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * temp, const gchar * name)
|
||||
GstPadTemplate * temp, const gchar * name, const GstCaps * caps)
|
||||
{
|
||||
GstStreamSynchronizer *self = GST_STREAM_SYNCHRONIZER (element);
|
||||
GstStream *stream;
|
||||
|
|
Loading…
Reference in a new issue