winegstreamer: Inline init_new_decoded_pad() into pad_added_cb().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2741b6ca33
commit
e4922b930b
|
@ -987,13 +987,19 @@ static struct wg_parser_stream *create_stream(struct wg_parser *parser)
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_new_decoded_pad(GstElement *element, GstPad *pad, struct wg_parser *parser)
|
static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||||
{
|
{
|
||||||
|
struct wg_parser *parser = user;
|
||||||
struct wg_parser_stream *stream;
|
struct wg_parser_stream *stream;
|
||||||
const char *name;
|
const char *name;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
GST_LOG("parser %p, element %p, pad %p.", parser, element, pad);
|
||||||
|
|
||||||
|
if (gst_pad_is_linked(pad))
|
||||||
|
return;
|
||||||
|
|
||||||
caps = gst_caps_make_writable(gst_pad_query_caps(pad, NULL));
|
caps = gst_caps_make_writable(gst_pad_query_caps(pad, NULL));
|
||||||
name = gst_structure_get_name(gst_caps_get_structure(caps, 0));
|
name = gst_structure_get_name(gst_caps_get_structure(caps, 0));
|
||||||
|
|
||||||
|
@ -1115,18 +1121,6 @@ out:
|
||||||
gst_caps_unref(caps);
|
gst_caps_unref(caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
|
||||||
{
|
|
||||||
struct wg_parser *parser = user;
|
|
||||||
|
|
||||||
GST_LOG("parser %p, element %p, pad %p.", parser, element, pad);
|
|
||||||
|
|
||||||
if (gst_pad_is_linked(pad))
|
|
||||||
return;
|
|
||||||
|
|
||||||
init_new_decoded_pad(element, pad, parser);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void pad_removed_cb(GstElement *element, GstPad *pad, gpointer user)
|
static void pad_removed_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||||
{
|
{
|
||||||
struct wg_parser *parser = user;
|
struct wg_parser *parser = user;
|
||||||
|
|
Loading…
Reference in New Issue