mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
Merge remote-tracking branch 'origin/master' into 0.11
Conflicts: gst/gstdebugutils.c gst/gstelementdetails.h gst/gstregistrychunks.c tools/gst-run.c
This commit is contained in:
commit
bdc1710be5
3 changed files with 59 additions and 31 deletions
|
@ -222,10 +222,10 @@ main (int argc,
|
|||
<title>Compiling and Running helloworld.c</title>
|
||||
<para>
|
||||
To compile the helloworld example, use: <command>gcc -Wall
|
||||
$(pkg-config --cflags --libs gstreamer-&GST_MAJORMINOR;)
|
||||
helloworld.c -o helloworld</command>. &GStreamer; makes use of
|
||||
<command>pkg-config</command> to get compiler and linker flags
|
||||
needed to compile this application.
|
||||
helloworld.c -o helloworld
|
||||
$(pkg-config --cflags --libs gstreamer-&GST_MAJORMINOR;)</command>.
|
||||
&GStreamer; makes use of <command>pkg-config</command> to get compiler
|
||||
and linker flags needed to compile this application.
|
||||
</para>
|
||||
<para>
|
||||
If you're running a non-standard installation (ie. you've installed
|
||||
|
@ -237,8 +237,8 @@ main (int argc,
|
|||
In the unlikely case that you are using an uninstalled GStreamer
|
||||
setup (ie. gst-uninstalled), you will need to use libtool to build the
|
||||
hello world program, like this: <command>libtool --mode=link gcc -Wall
|
||||
$(pkg-config --cflags --libs gstreamer-&GST_MAJORMINOR;)
|
||||
helloworld.c -o helloworld</command>.
|
||||
helloworld.c -o helloworld
|
||||
$(pkg-config --cflags --libs gstreamer-&GST_MAJORMINOR;)</command>.
|
||||
</para>
|
||||
<para>
|
||||
You can run this example application with <command>./helloworld
|
||||
|
|
|
@ -458,6 +458,41 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
|
|||
}
|
||||
}
|
||||
|
||||
/* New function
|
||||
*/
|
||||
static void
|
||||
debug_dump_element_pads (GstIterator * pad_iter, GstPad * pad,
|
||||
GstElement * element, GstDebugGraphDetails details, FILE * out,
|
||||
const gint indent, guint * src_pads, guint * sink_pads)
|
||||
{
|
||||
GValue item = { 0, };
|
||||
gboolean pads_done;
|
||||
GstPadDirection dir;
|
||||
|
||||
pads_done = FALSE;
|
||||
while (!pads_done) {
|
||||
switch (gst_iterator_next (pad_iter, &item)) {
|
||||
case GST_ITERATOR_OK:
|
||||
pad = g_value_get_object (&item);
|
||||
debug_dump_element_pad (pad, element, details, out, indent);
|
||||
dir = gst_pad_get_direction (pad);
|
||||
if (dir == GST_PAD_SRC)
|
||||
(*src_pads)++;
|
||||
else if (dir == GST_PAD_SINK)
|
||||
(*sink_pads)++;
|
||||
g_value_reset (&item);
|
||||
break;
|
||||
case GST_ITERATOR_RESYNC:
|
||||
gst_iterator_resync (pad_iter);
|
||||
break;
|
||||
case GST_ITERATOR_ERROR:
|
||||
case GST_ITERATOR_DONE:
|
||||
pads_done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* debug_dump_element:
|
||||
* @bin: the bin that should be analyzed
|
||||
|
@ -476,7 +511,6 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
|
|||
GValue item2 = { 0, };
|
||||
GstElement *element;
|
||||
GstPad *pad;
|
||||
GstPadDirection dir;
|
||||
guint src_pads, sink_pads;
|
||||
gchar *element_name;
|
||||
gchar *state_name = NULL;
|
||||
|
@ -518,30 +552,14 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
|
|||
g_free (element_name);
|
||||
|
||||
src_pads = sink_pads = 0;
|
||||
if ((pad_iter = gst_element_iterate_pads (element))) {
|
||||
pads_done = FALSE;
|
||||
while (!pads_done) {
|
||||
switch (gst_iterator_next (pad_iter, &item2)) {
|
||||
case GST_ITERATOR_OK:
|
||||
pad = g_value_get_object (&item2);
|
||||
debug_dump_element_pad (pad, element, details, out, indent);
|
||||
dir = gst_pad_get_direction (pad);
|
||||
if (dir == GST_PAD_SRC)
|
||||
src_pads++;
|
||||
else if (dir == GST_PAD_SINK)
|
||||
sink_pads++;
|
||||
g_value_reset (&item2);
|
||||
break;
|
||||
case GST_ITERATOR_RESYNC:
|
||||
gst_iterator_resync (pad_iter);
|
||||
break;
|
||||
case GST_ITERATOR_ERROR:
|
||||
case GST_ITERATOR_DONE:
|
||||
pads_done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_value_unset (&item2);
|
||||
if ((pad_iter = gst_element_iterate_sink_pads (element))) {
|
||||
debug_dump_element_pads (pad_iter, pad, element, details, out, indent,
|
||||
&src_pads, &sink_pads);
|
||||
gst_iterator_free (pad_iter);
|
||||
}
|
||||
if ((pad_iter = gst_element_iterate_src_pads (element))) {
|
||||
debug_dump_element_pads (pad_iter, pad, element, details, out, indent,
|
||||
&src_pads, &sink_pads);
|
||||
gst_iterator_free (pad_iter);
|
||||
}
|
||||
if (GST_IS_BIN (element)) {
|
||||
|
|
|
@ -207,6 +207,16 @@ gst_registry_chunks_save_pad_template (GList ** list,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#define VALIDATE_UTF8(__details, __entry) \
|
||||
G_STMT_START { \
|
||||
if (!g_utf8_validate (__details->__entry, -1, NULL)) { \
|
||||
g_warning ("Invalid UTF-8 in " G_STRINGIFY (__entry) ": %s", \
|
||||
__details->__entry); \
|
||||
g_free (__details->__entry); \
|
||||
__details->__entry = g_strdup ("[ERROR: invalid UTF-8]"); \
|
||||
} \
|
||||
} G_STMT_END
|
||||
|
||||
/*
|
||||
* gst_registry_chunks_save_feature:
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue