GST_STATIC_CAPS ("application/ogg")
);
-static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d",
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("video/x-theora; "
klass = GST_ELEMENT_GET_CLASS (element);
- if (templ != gst_element_class_get_pad_template (klass, "sink_%d"))
+ if (templ != gst_element_class_get_pad_template (klass, "sink_%u"))
goto wrong_template;
{
}
/* create new pad with the name */
GST_DEBUG_OBJECT (ogg_mux, "Creating new pad for serial %d", serial);
- name = g_strdup_printf ("sink_%d", serial);
+ name = g_strdup_printf ("sink_%u", serial);
newpad = gst_pad_new_from_template (templ, name);
g_free (name);
);
static GstStaticPadTemplate gst_adder_sink_template =
-GST_STATIC_PAD_TEMPLATE ("sink%d",
+GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS (CAPS)
padcount = g_atomic_int_exchange_and_add (&adder->padcount, 1);
#endif
- name = g_strdup_printf ("sink%d", padcount);
+ name = g_strdup_printf ("sink_%u", padcount);
newpad = gst_pad_new_from_template (templ, name);
GST_DEBUG_OBJECT (adder, "request new pad %s", name);
g_free (name);
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate video_sink_template =
-GST_STATIC_PAD_TEMPLATE ("video_%d",
+GST_STATIC_PAD_TEMPLATE ("video_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate audio_sink_template =
-GST_STATIC_PAD_TEMPLATE ("audio_%d",
+GST_STATIC_PAD_TEMPLATE ("audio_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
/* static GstStaticPadTemplate text_sink_template = */
-/* GST_STATIC_PAD_TEMPLATE ("text_%d", */
+/* GST_STATIC_PAD_TEMPLATE ("text_%u", */
/* GST_PAD_SINK, */
/* GST_PAD_REQUEST, */
/* GST_STATIC_CAPS_ANY); */
static GstStaticPadTemplate private_sink_template =
-GST_STATIC_PAD_TEMPLATE ("private_%d",
+GST_STATIC_PAD_TEMPLATE ("private_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
if (res == NULL) {
GType ptype = G_TYPE_NONE;
- if (!strcmp (templ->name_template, "video_%d"))
+ if (!strcmp (templ->name_template, "video_%u"))
ptype = GST_TYPE_ENCODING_VIDEO_PROFILE;
- else if (!strcmp (templ->name_template, "audio_%d"))
+ else if (!strcmp (templ->name_template, "audio_%u"))
ptype = GST_TYPE_ENCODING_AUDIO_PROFILE;
- /* else if (!strcmp (templ->name_template, "text_%d")) */
+ /* else if (!strcmp (templ->name_template, "text_%u")) */
/* ptype = GST_TYPE_ENCODING_TEXT_PROFILE; */
/* FIXME : Check uniqueness of pad */
sinkpad = gst_element_get_static_pad (sgroup->inqueue, "sink");
if (sinkpadname == NULL) {
gchar *pname =
- g_strdup_printf ("%s_%d", gst_encoding_profile_get_type_nick (sprof),
+ g_strdup_printf ("%s_%u", gst_encoding_profile_get_type_nick (sprof),
ebin->last_pad_id++);
GST_DEBUG ("Adding ghost pad %s", pname);
sgroup->ghostpad = gst_ghost_pad_new (pname, sinkpad);
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink_%d",
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
#include "gststreamsplitter.h"
static GstStaticPadTemplate src_template =
-GST_STATIC_PAD_TEMPLATE ("src_%d", GST_PAD_SRC, GST_PAD_REQUEST,
+GST_STATIC_PAD_TEMPLATE ("src_%u", GST_PAD_SRC, GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate decoder_bin_src_template =
-GST_STATIC_PAD_TEMPLATE ("src%d",
+GST_STATIC_PAD_TEMPLATE ("src_%u",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY);
GList *probes; /* list of PadProbeData */
GList *factories; /* factories we can use for selecting elements */
- gint numpads;
+ guint numpads;
gint numwaiting;
gboolean have_type;
}
/* make a unique name for this new pad */
- padname = g_strdup_printf ("src%d", decode_bin->numpads);
+ padname = g_strdup_printf ("src_%u", decode_bin->numpads);
decode_bin->numpads++;
/* make it a ghostpad */
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate decoder_bin_src_template =
-GST_STATIC_PAD_TEMPLATE ("src%d",
+GST_STATIC_PAD_TEMPLATE ("src_%u",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY);
GMutex *expose_lock; /* Protects exposal and removal of groups */
GstDecodeChain *decode_chain; /* Top level decode chain */
- gint nbpads; /* unique identifier for source pads */
+ guint nbpads; /* unique identifier for source pads */
GMutex *factories_lock;
guint32 factories_cookie; /* Cookie from last time when factories was updated */
gchar *padname;
/* 1. rewrite name */
- padname = g_strdup_printf ("src%d", dbin->nbpads);
+ padname = g_strdup_printf ("src_%u", dbin->nbpads);
dbin->nbpads++;
GST_DEBUG_OBJECT (dbin, "About to expose dpad %s as %s",
GST_OBJECT_NAME (dpad), padname);
gchar *font_desc; /* font description */
gchar *subtitle_encoding; /* subtitle encoding */
guint connection_speed; /* connection speed in bits/sec (0 = unknown) */
- gint count;
+ guint count;
gboolean volume_changed; /* volume/mute changed while no audiochain */
gboolean mute_changed; /* ... has been created yet */
gint64 av_offset;
playsink->video_sinkpad_stream_synchronizer =
gst_element_get_request_pad (GST_ELEMENT_CAST
- (playsink->stream_synchronizer), "sink_%d");
+ (playsink->stream_synchronizer), "sink_%u");
it = gst_pad_iterate_internal_links
(playsink->video_sinkpad_stream_synchronizer);
g_assert (it);
playsink->audio_sinkpad_stream_synchronizer =
gst_element_get_request_pad (GST_ELEMENT_CAST
- (playsink->stream_synchronizer), "sink_%d");
+ (playsink->stream_synchronizer), "sink_%u");
it = gst_pad_iterate_internal_links
(playsink->audio_sinkpad_stream_synchronizer);
g_assert (it);
playsink->text_sinkpad_stream_synchronizer =
gst_element_get_request_pad (GST_ELEMENT_CAST
- (playsink->stream_synchronizer), "sink_%d");
+ (playsink->stream_synchronizer), "sink_%u");
it = gst_pad_iterate_internal_links
(playsink->text_sinkpad_stream_synchronizer);
g_assert (it);
gchar *padname;
/* we need a unique padname for the flushing pad. */
- padname = g_strdup_printf ("flushing_%d", playsink->count);
+ padname = g_strdup_printf ("flushing_%u", playsink->count);
res = gst_ghost_pad_new_no_target (padname, GST_PAD_SINK);
g_free (padname);
playsink->count++;
#define GST_CAT_DEFAULT stream_selector_debug
static GstStaticPadTemplate gst_stream_selector_sink_factory =
-GST_STATIC_PAD_TEMPLATE ("sink%d",
+GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
g_return_val_if_fail (templ->direction == GST_PAD_SINK, NULL);
GST_LOG_OBJECT (sel, "Creating new pad %d", sel->padcount);
GST_OBJECT_LOCK (sel);
- name = g_strdup_printf ("sink%d", sel->padcount++);
+ name = g_strdup_printf ("sink_%u", sel->padcount++);
sinkpad = g_object_new (GST_TYPE_SELECTOR_PAD,
"name", name, "direction", templ->direction, "template", templ, NULL);
g_free (name);
g_mutex_unlock (GST_STREAM_SYNCHRONIZER_CAST(obj)->lock); \
} G_STMT_END
-static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%d",
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY);
-static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink_%d",
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink_%u",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
stream->transform = self;
stream->stream_number = self->current_stream_number;
- tmp = g_strdup_printf ("sink_%d", self->current_stream_number);
+ tmp = g_strdup_printf ("sink_%u", self->current_stream_number);
stream->sinkpad = gst_pad_new_from_static_template (&sinktemplate, tmp);
g_free (tmp);
gst_pad_set_element_private (stream->sinkpad, stream);
gst_pad_set_chain_function (stream->sinkpad,
GST_DEBUG_FUNCPTR (gst_stream_synchronizer_sink_chain));
- tmp = g_strdup_printf ("src_%d", self->current_stream_number);
+ tmp = g_strdup_printf ("src_%u", self->current_stream_number);
stream->srcpad = gst_pad_new_from_static_template (&srctemplate, tmp);
g_free (tmp);
gst_pad_set_element_private (stream->srcpad, stream);
fail_unless (res == TRUE, NULL);
/* create an unconnected sinkpad in adder */
- pad = gst_element_get_request_pad (adder, "sink%d");
+ pad = gst_element_get_request_pad (adder, "sink_%u");
fail_if (pad == NULL, NULL);
srcpad = gst_element_get_static_pad (adder, "src");
/* create an unconnected sinkpad in adder, should also automatically activate
* the pad */
- sinkpad = gst_element_get_request_pad (adder, "sink%d");
+ sinkpad = gst_element_get_request_pad (adder, "sink_%u");
fail_if (sinkpad == NULL, NULL);
/* send segment to adder */
GstPad *pad;
oggmux = gst_element_factory_make ("oggmux", NULL);
- pad = gst_element_get_request_pad (oggmux, "sink_%d");
+ pad = gst_element_get_request_pad (oggmux, "sink_%u");
fail_unless (pad != NULL);
gst_object_unref (pad);
- pad = gst_element_get_request_pad (oggmux, "sink_%d");
+ pad = gst_element_get_request_pad (oggmux, "sink_%u");
fail_unless (pad != NULL);
gst_object_unref (pad);
gst_object_unref (oggmux);
info->srcpad = gst_element_get_static_pad (info->element, "src");
/* get new pad from adder, adder will now wait for data on this pad */
- info->sinkpad = gst_element_get_request_pad (adder, "sink%d");
+ info->sinkpad = gst_element_get_request_pad (adder, "sink_%u");
/* link pad to adder */
gst_pad_link (info->srcpad, info->sinkpad);
info->fx_sinkpad = gst_element_get_static_pad (info->fx, "sink");
/* get new pad from adder, adder will now wait for data on this pad */
- info->adder_sinkpad = gst_element_get_request_pad (adder, "sink%d");
+ info->adder_sinkpad = gst_element_get_request_pad (adder, "sink_%u");
/* link src to fx and fx to adder */
gst_pad_link (info->fx_srcpad, info->adder_sinkpad);
gst_element_add_pad (info->bin, info->bin_srcpad);
/* get new pad from adder, adder will now wait for data on this pad */
- info->adder_sinkpad = gst_element_get_request_pad (adder, "sink%d");
+ info->adder_sinkpad = gst_element_get_request_pad (adder, "sink_%u");
/* link inside the bin */
gst_pad_link (info->src_srcpad, info->fx_sinkpad);