Re-arranged the build a bit to try to make it more sane. Added some debug.

Original commit message from CVS:
Re-arranged the build a bit to try to make it more sane.  Added some debug.
This commit is contained in:
Erik Walthinsen 2001-01-01 08:37:41 +00:00
parent 4c7c90b8a5
commit 2da16ed5ed
44 changed files with 148 additions and 189 deletions

View file

@ -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

View file

@ -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."

View file

@ -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

View file

@ -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.

View file

@ -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

View file

View file

@ -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 <filename>\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 */

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

View file

@ -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

4
examples/xml/Makefile.am Normal file
View file

@ -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)

View file

@ -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));
}
/**

View file

@ -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);
}

View file

@ -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

View file

View file

@ -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 <filename>\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 */

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

View file

@ -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

View file

@ -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)