diff --git a/Makefile.am b/Makefile.am index 547538af36..9f327a3df6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,17 +1,13 @@ +SUBDIRS = include gst libs plugins tools test tests examples docs +# if libglade is present, build the player and editor if HAVE_LIBGLADE_GNOME -# The following line mustn't be indented - automake is _very_ fussy.. -libglade_subdir=gstplay editor -else -# The following line mustn't be indented - automake is _very_ fussy.. -libglade_subdir= +SUBDIRS += gstplay editor endif -# These are the subdirs which might get used. -SUBDIRS = include gst libs plugins . test $(libglade_subdir) tools docs # tests - # These are all the possible subdirs -DIST_SUBDIRS = include gst libs plugins . gstplay test editor tools docs tests +DIST_SUBDIRS = include gst libs plugins tools test tests examples docs gstplay editor + bin_SCRIPTS = gstreamer-config diff --git a/autogen.sh b/autogen.sh index 391b8f1a8d..d15a33554d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -61,7 +61,7 @@ for dir in `find * -name autogen.sh -print | grep -v '^autogen.sh$' | \ popd > /dev/null done -./configure --enable-maintainer-mode "$@" +./configure --enable-maintainer-mode --enable-plugin-srcdir --enable-debug-verbose "$@" echo echo "Now type 'make' to compile $package." diff --git a/configure.in b/configure.in index 973672dd7d..c42315bbc5 100644 --- a/configure.in +++ b/configure.in @@ -315,7 +315,7 @@ AC_ARG_ENABLE(plugin-srcdir, no) PLUGINS_USE_SRCDIR=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-srcdir) ;; esac], -[PLUGINS_USE_SRCDIR=yes]) dnl Default value +[PLUGINS_USE_SRCDIR=no]) dnl Default value AC_ARG_ENABLE(debug, [ --enable-debug compile with -g debugging info], @@ -538,6 +538,15 @@ test/cothreads/Makefile tests/Makefile tests/sched/Makefile examples/Makefile +examples/autoplug +examples/helloworld +examples/helloworld2 +examples/queue +examples/queue2 +examples/queue3 +examples/queue4 +examples/thread +examples/xml editor/Makefile tools/Makefile docs/Makefile diff --git a/docs/code-reviews/gstbin.c-1.41 b/docs/code-reviews/gstbin.c-1.41 index 4757c32859..e3d69e0e77 100644 --- a/docs/code-reviews/gstbin.c-1.41 +++ b/docs/code-reviews/gstbin.c-1.41 @@ -115,3 +115,68 @@ Lines 204-206: (gst_bin_remove) Also suspect from the state management perspective, except this one isn't commented out. + + +----- +Line 226: (gst_bin_change_state) +// g_return_val_if_fail(bin->numchildren != 0, GST_STATE_FAILURE); + +Should this be uncommented? It makes sense that a bin can't change state unless it's got children, +though we probably should check to see what state change is actually occuring before blindly failing. + + +----- +Lines 241-243 (gst_bin_change_state) + case GST_STATE_ASYNC: + g_print("gstbin: child '%s' is changing state asynchronously\n", gst_element_get_name (child)); + break; + +Obviously some work needs to be done on async state management. Probably need to have the Bin attach to +one of the element's signals. This assumes that the element will get to run at some point in the +future, or is capable of doing things in a separate context. + + +----- +Lines 250-257: (gst_bin_change_state) + if (GST_STATE_PENDING (element) == GST_STATE_READY) { + GstObject *parent; + + parent = gst_object_get_parent (GST_OBJECT (element)); + + if (!parent || !GST_IS_BIN (parent)) + gst_bin_create_plan (bin); + } + +First of all, this code is run even if there is a failed or async reply from one of the child elements. +Second problem is that it will call create_plan only in the NULL->READY and PLAYING->READY cases. If +PAUSED is going to be a time for allowing changes to the pipeline, we need to update the plan somehow on +PAUSED->PLAYING state. And calling create_plan in the PLAYING->READY case isn't actually that useful... + + +----- +Line 263-271: (gst_bin_change_state_norecurse) +. . . + +Is this really necessary? Are any users going to want to call this function? If not, then we can move +the body of this function into gst_bin_change_state. + + +----- +Line 273-305: (gst_bin_set_state_type) +. . . + +Is this function ever going to be used by anything? I tend to think not... + + +----- +Line 356-393: (gst_bin_get_by_name) +. . . + +Should this be renamed to gst_bin_get_child_by_name() ? + + +----- +Line 464-471: (gst_bin_use_cothreads) +. . . + +This should be removed in favor of an argument or two? I think so. diff --git a/examples/autoplug/Makefile b/examples/autoplug/Makefile deleted file mode 100644 index a304e11f1f..0000000000 --- a/examples/autoplug/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -autoplug: autoplug.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` autoplug.c -o autoplug - -clean: - rm -f *.o autoplug - - diff --git a/examples/autoplug/Makefile.am b/examples/autoplug/Makefile.am new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/autoplug/autoplug.c b/examples/autoplug/autoplug.c index e92ec806ef..3203608163 100644 --- a/examples/autoplug/autoplug.c +++ b/examples/autoplug/autoplug.c @@ -22,14 +22,15 @@ int main(int argc,char *argv[]) GstElement *pipeline; GtkWidget *appwindow; + g_thread_init(NULL); + gst_init(&argc,&argv); + gnome_init("autoplug","0.0.1", argc,argv); + if (argc != 2) { g_print("usage: %s \n", argv[0]); exit(-1); } - g_thread_init(NULL); - gst_init(&argc,&argv); - gnome_init("autoplug","0.0.1", argc,argv); /* create a new bin to hold the elements */ diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile deleted file mode 100644 index e1da61821f..0000000000 --- a/examples/helloworld/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -helloworld: helloworld.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` helloworld.c -o helloworld - -clean: - rm -f *.o helloworld - - diff --git a/examples/helloworld/Makefile.am b/examples/helloworld/Makefile.am new file mode 100644 index 0000000000..5f9514c2f7 --- /dev/null +++ b/examples/helloworld/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = helloworld + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/examples/helloworld2/Makefile b/examples/helloworld2/Makefile deleted file mode 100644 index 8d3a6534f0..0000000000 --- a/examples/helloworld2/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -helloworld2: helloworld2.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` helloworld2.c -o helloworld2 - -clean: - rm -f *.o helloworld2 - - diff --git a/examples/helloworld2/Makefile.am b/examples/helloworld2/Makefile.am new file mode 100644 index 0000000000..9d4f35be42 --- /dev/null +++ b/examples/helloworld2/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = helloworld2 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/examples/queue/Makefile b/examples/queue/Makefile deleted file mode 100644 index 158d625e8e..0000000000 --- a/examples/queue/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue: queue.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue.c -o queue - -clean: - rm -f *.o queue - - diff --git a/examples/queue/Makefile.am b/examples/queue/Makefile.am new file mode 100644 index 0000000000..526c05cc83 --- /dev/null +++ b/examples/queue/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/examples/queue2/Makefile b/examples/queue2/Makefile deleted file mode 100644 index 1046e15943..0000000000 --- a/examples/queue2/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue2: queue2.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue2.c -o queue2 - -clean: - rm -f *.o queue2 - - diff --git a/examples/queue2/Makefile.am b/examples/queue2/Makefile.am new file mode 100644 index 0000000000..ae346f59b6 --- /dev/null +++ b/examples/queue2/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue2 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/examples/queue3/Makefile b/examples/queue3/Makefile deleted file mode 100644 index 3d55de92c7..0000000000 --- a/examples/queue3/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue3: queue3.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue3.c -o queue3 - -clean: - rm -f *.o queue3 - - diff --git a/examples/queue3/Makefile.am b/examples/queue3/Makefile.am new file mode 100644 index 0000000000..c32224b8da --- /dev/null +++ b/examples/queue3/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue3 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/examples/queue4/Makefile b/examples/queue4/Makefile deleted file mode 100644 index bf8e2ef0b3..0000000000 --- a/examples/queue4/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue4: queue4.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue4.c -o queue4 - -clean: - rm -f *.o queue4 - - diff --git a/examples/queue4/Makefile.am b/examples/queue4/Makefile.am new file mode 100644 index 0000000000..e91ceb7415 --- /dev/null +++ b/examples/queue4/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue4 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/examples/thread/Makefile b/examples/thread/Makefile deleted file mode 100644 index 3006f9e317..0000000000 --- a/examples/thread/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -thread: thread.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` thread.c -o thread - -clean: - rm -f *.o thread - - diff --git a/examples/thread/Makefile.am b/examples/thread/Makefile.am new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/xml/Makefile b/examples/xml/Makefile deleted file mode 100644 index 82d57b7702..0000000000 --- a/examples/xml/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -CC = libtool gcc - -all: createxml runxml - -createxml: createxml.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` createxml.c -o createxml - -runxml: runxml.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` runxml.c -o runxml - -clean: - rm -f *.o createxml runxml - - diff --git a/examples/xml/Makefile.am b/examples/xml/Makefile.am new file mode 100644 index 0000000000..51ab7ff726 --- /dev/null +++ b/examples/xml/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = xml + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/gst/gstpad.c b/gst/gstpad.c index 5f730e28d5..8efb2f4a2a 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -456,6 +456,8 @@ gst_pad_disconnect (GstPad *srcpad, srcpad->peer = NULL; sinkpad->peer = NULL; + GST_INFO (GST_CAT_ELEMENT_PADS, "disconnected %s:%s and %s:%s", + GST_DEBUG_PAD_NAME(srcpad), GST_DEBUG_PAD_NAME(sinkpad)); } /** diff --git a/gst/gstplugin.c b/gst/gstplugin.c index b64748c64e..06b058dff8 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -140,6 +140,7 @@ gst_plugin_load_all(void) path = _gst_plugin_paths; while (path != NULL) { + GST_DEBUG (GST_CAT_PLUGIN_LOADING,"loading plugins from %s\n",path->data); gst_plugin_load_recurse(path->data,NULL); path = g_list_next(path); } diff --git a/tests/old/examples/autoplug/Makefile b/tests/old/examples/autoplug/Makefile deleted file mode 100644 index a304e11f1f..0000000000 --- a/tests/old/examples/autoplug/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -autoplug: autoplug.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` autoplug.c -o autoplug - -clean: - rm -f *.o autoplug - - diff --git a/tests/old/examples/autoplug/Makefile.am b/tests/old/examples/autoplug/Makefile.am new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/old/examples/autoplug/autoplug.c b/tests/old/examples/autoplug/autoplug.c index e92ec806ef..3203608163 100644 --- a/tests/old/examples/autoplug/autoplug.c +++ b/tests/old/examples/autoplug/autoplug.c @@ -22,14 +22,15 @@ int main(int argc,char *argv[]) GstElement *pipeline; GtkWidget *appwindow; + g_thread_init(NULL); + gst_init(&argc,&argv); + gnome_init("autoplug","0.0.1", argc,argv); + if (argc != 2) { g_print("usage: %s \n", argv[0]); exit(-1); } - g_thread_init(NULL); - gst_init(&argc,&argv); - gnome_init("autoplug","0.0.1", argc,argv); /* create a new bin to hold the elements */ diff --git a/tests/old/examples/helloworld/Makefile b/tests/old/examples/helloworld/Makefile deleted file mode 100644 index e1da61821f..0000000000 --- a/tests/old/examples/helloworld/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -helloworld: helloworld.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` helloworld.c -o helloworld - -clean: - rm -f *.o helloworld - - diff --git a/tests/old/examples/helloworld/Makefile.am b/tests/old/examples/helloworld/Makefile.am new file mode 100644 index 0000000000..5f9514c2f7 --- /dev/null +++ b/tests/old/examples/helloworld/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = helloworld + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/tests/old/examples/helloworld2/Makefile b/tests/old/examples/helloworld2/Makefile deleted file mode 100644 index 8d3a6534f0..0000000000 --- a/tests/old/examples/helloworld2/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -helloworld2: helloworld2.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` helloworld2.c -o helloworld2 - -clean: - rm -f *.o helloworld2 - - diff --git a/tests/old/examples/helloworld2/Makefile.am b/tests/old/examples/helloworld2/Makefile.am new file mode 100644 index 0000000000..9d4f35be42 --- /dev/null +++ b/tests/old/examples/helloworld2/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = helloworld2 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/tests/old/examples/queue/Makefile b/tests/old/examples/queue/Makefile deleted file mode 100644 index 158d625e8e..0000000000 --- a/tests/old/examples/queue/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue: queue.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue.c -o queue - -clean: - rm -f *.o queue - - diff --git a/tests/old/examples/queue/Makefile.am b/tests/old/examples/queue/Makefile.am new file mode 100644 index 0000000000..526c05cc83 --- /dev/null +++ b/tests/old/examples/queue/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/tests/old/examples/queue2/Makefile b/tests/old/examples/queue2/Makefile deleted file mode 100644 index 1046e15943..0000000000 --- a/tests/old/examples/queue2/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue2: queue2.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue2.c -o queue2 - -clean: - rm -f *.o queue2 - - diff --git a/tests/old/examples/queue2/Makefile.am b/tests/old/examples/queue2/Makefile.am new file mode 100644 index 0000000000..ae346f59b6 --- /dev/null +++ b/tests/old/examples/queue2/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue2 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/tests/old/examples/queue3/Makefile b/tests/old/examples/queue3/Makefile deleted file mode 100644 index 3d55de92c7..0000000000 --- a/tests/old/examples/queue3/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue3: queue3.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue3.c -o queue3 - -clean: - rm -f *.o queue3 - - diff --git a/tests/old/examples/queue3/Makefile.am b/tests/old/examples/queue3/Makefile.am new file mode 100644 index 0000000000..c32224b8da --- /dev/null +++ b/tests/old/examples/queue3/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue3 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/tests/old/examples/queue4/Makefile b/tests/old/examples/queue4/Makefile deleted file mode 100644 index bf8e2ef0b3..0000000000 --- a/tests/old/examples/queue4/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -queue4: queue4.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` queue4.c -o queue4 - -clean: - rm -f *.o queue4 - - diff --git a/tests/old/examples/queue4/Makefile.am b/tests/old/examples/queue4/Makefile.am new file mode 100644 index 0000000000..e91ceb7415 --- /dev/null +++ b/tests/old/examples/queue4/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = queue4 + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/tests/old/examples/thread/Makefile b/tests/old/examples/thread/Makefile deleted file mode 100644 index 3006f9e317..0000000000 --- a/tests/old/examples/thread/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CC = libtool gcc - -thread: thread.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` thread.c -o thread - -clean: - rm -f *.o thread - - diff --git a/tests/old/examples/thread/Makefile.am b/tests/old/examples/thread/Makefile.am new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/old/examples/xml/Makefile b/tests/old/examples/xml/Makefile deleted file mode 100644 index 82d57b7702..0000000000 --- a/tests/old/examples/xml/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -CC = libtool gcc - -all: createxml runxml - -createxml: createxml.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` createxml.c -o createxml - -runxml: runxml.c - $(CC) -Wall -I../../ ../../gst/libgst.la `gnome-config --cflags --libs gnomeui` runxml.c -o runxml - -clean: - rm -f *.o createxml runxml - - diff --git a/tests/old/examples/xml/Makefile.am b/tests/old/examples/xml/Makefile.am new file mode 100644 index 0000000000..51ab7ff726 --- /dev/null +++ b/tests/old/examples/xml/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = xml + +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir)