diff options
Diffstat (limited to 'tests/examples')
-rw-r--r-- | tests/examples/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/adapter/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/controller/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/helloworld/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/launch/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/manual/Makefile.am | 31 | ||||
-rw-r--r-- | tests/examples/manual/Makefile.in | 121 | ||||
-rw-r--r-- | tests/examples/manual/decodebin.c | 6 | ||||
-rw-r--r-- | tests/examples/manual/dynamic.c | 330 | ||||
-rw-r--r-- | tests/examples/manual/effectswitch.c | 192 | ||||
-rw-r--r-- | tests/examples/manual/norebuffer.c | 153 | ||||
-rw-r--r-- | tests/examples/manual/playbin.c | 6 | ||||
-rw-r--r-- | tests/examples/manual/playsink.c | 126 | ||||
-rw-r--r-- | tests/examples/manual/testrtpool.c | 235 | ||||
-rw-r--r-- | tests/examples/memory/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/metadata/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/queue/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/stepping/Makefile.in | 6 | ||||
-rw-r--r-- | tests/examples/streams/Makefile.am | 6 | ||||
-rw-r--r-- | tests/examples/streams/Makefile.in | 16 | ||||
-rw-r--r-- | tests/examples/typefind/Makefile.in | 6 |
21 files changed, 895 insertions, 387 deletions
diff --git a/tests/examples/Makefile.in b/tests/examples/Makefile.in index a10532c..68eb34e 100644 --- a/tests/examples/Makefile.in +++ b/tests/examples/Makefile.in @@ -86,7 +86,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -344,6 +344,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -380,6 +383,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/adapter/Makefile.in b/tests/examples/adapter/Makefile.in index 5f39a69..4a43b77 100644 --- a/tests/examples/adapter/Makefile.in +++ b/tests/examples/adapter/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -335,6 +335,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -371,6 +374,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/controller/Makefile.in b/tests/examples/controller/Makefile.in index 26737fa..d0629ae 100644 --- a/tests/examples/controller/Makefile.in +++ b/tests/examples/controller/Makefile.in @@ -83,7 +83,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -344,6 +344,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -380,6 +383,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/helloworld/Makefile.in b/tests/examples/helloworld/Makefile.in index 4c5d16c..40db837 100644 --- a/tests/examples/helloworld/Makefile.in +++ b/tests/examples/helloworld/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -334,6 +334,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -370,6 +373,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/launch/Makefile.in b/tests/examples/launch/Makefile.in index 2f01e35..dbdff9a 100644 --- a/tests/examples/launch/Makefile.in +++ b/tests/examples/launch/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -335,6 +335,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -371,6 +374,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/manual/Makefile.am b/tests/examples/manual/Makefile.am index 6e79e67..30ac1b4 100644 --- a/tests/examples/manual/Makefile.am +++ b/tests/examples/manual/Makefile.am @@ -21,7 +21,6 @@ TESTS_ENVIRONMENT = \ EXTRA_DIST = extract.pl EXAMPLES = \ - dynamic \ $(GNOME) \ elementcreate \ elementmake \ @@ -40,8 +39,12 @@ EXAMPLES = \ appsrc \ appsink \ dynformat \ + effectswitch \ + testrtpool \ + norebuffer \ playbin \ - decodebin + decodebin \ + playsink BUILT_SOURCES = \ elementmake.c elementcreate.c elementget.c elementlink.c elementfactory.c \ @@ -51,13 +54,17 @@ BUILT_SOURCES = \ helloworld.c \ init.c \ query.c \ - typefind.c dynamic.c \ + typefind.c \ blockprobe.c \ probe.c \ appsrc.c \ appsink.c \ dynformat.c \ - playbin.c decodebin.c + effectswitch.c \ + testrtpool.c \ + norebuffer.c \ + playbin.c decodebin.c \ + playsink.c CLEANFILES = core core.* test-registry.* *.gcno *.gcda $(BUILT_SOURCES) @@ -86,7 +93,7 @@ init.c: $(top_srcdir)/docs/manual/basics-init.xml query.c: $(top_srcdir)/docs/manual/advanced-position.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< -typefind.c dynamic.c: $(top_srcdir)/docs/manual/advanced-autoplugging.xml +typefind.c: $(top_srcdir)/docs/manual/advanced-autoplugging.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< blockprobe.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml @@ -104,7 +111,16 @@ appsink.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml dynformat.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< -playbin.c decodebin.c: $(top_srcdir)/docs/manual/highlevel-components.xml +effectswitch.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml + $(PERL_PATH) $(srcdir)/extract.pl $@ $< + +norebuffer.c: $(top_srcdir)/docs/manual/advanced-buffering.xml + $(PERL_PATH) $(srcdir)/extract.pl $@ $< + +playbin.c decodebin.c playsink.c: $(top_srcdir)/docs/manual/highlevel-playback.xml + $(PERL_PATH) $(srcdir)/extract.pl $@ $< + +testrtpool.c: $(top_srcdir)/docs/manual/advanced-threads.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< TESTS = bin \ @@ -112,3 +128,6 @@ TESTS = bin \ ghostpad init noinst_PROGRAMS = $(EXAMPLES) + +testrtpool_LDADD = $(GST_OBJ_LIBS) $(PTHREAD_LIBS) +testrtpool_CFLAGS = $(GST_OBJ_CFLAGS) $(PTHREAD_CFLAGS) diff --git a/tests/examples/manual/Makefile.in b/tests/examples/manual/Makefile.in index 99b25f2..141598b 100644 --- a/tests/examples/manual/Makefile.in +++ b/tests/examples/manual/Makefile.in @@ -85,7 +85,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -101,14 +101,15 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = -am__EXEEXT_2 = dynamic$(EXEEXT) $(am__EXEEXT_1) elementcreate$(EXEEXT) \ +am__EXEEXT_2 = $(am__EXEEXT_1) elementcreate$(EXEEXT) \ elementmake$(EXEEXT) elementfactory$(EXEEXT) \ elementget$(EXEEXT) elementlink$(EXEEXT) bin$(EXEEXT) \ pad$(EXEEXT) ghostpad$(EXEEXT) helloworld$(EXEEXT) \ init$(EXEEXT) query$(EXEEXT) typefind$(EXEEXT) \ blockprobe$(EXEEXT) probe$(EXEEXT) appsrc$(EXEEXT) \ - appsink$(EXEEXT) dynformat$(EXEEXT) playbin$(EXEEXT) \ - decodebin$(EXEEXT) + appsink$(EXEEXT) dynformat$(EXEEXT) effectswitch$(EXEEXT) \ + testrtpool$(EXEEXT) norebuffer$(EXEEXT) playbin$(EXEEXT) \ + decodebin$(EXEEXT) playsink$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) appsink_SOURCES = appsink.c appsink_OBJECTS = appsink.$(OBJEXT) @@ -144,18 +145,18 @@ decodebin_LDADD = $(LDADD) decodebin_DEPENDENCIES = \ $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ $(am__DEPENDENCIES_1) -dynamic_SOURCES = dynamic.c -dynamic_OBJECTS = dynamic.$(OBJEXT) -dynamic_LDADD = $(LDADD) -dynamic_DEPENDENCIES = \ - $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ - $(am__DEPENDENCIES_1) dynformat_SOURCES = dynformat.c dynformat_OBJECTS = dynformat.$(OBJEXT) dynformat_LDADD = $(LDADD) dynformat_DEPENDENCIES = \ $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ $(am__DEPENDENCIES_1) +effectswitch_SOURCES = effectswitch.c +effectswitch_OBJECTS = effectswitch.$(OBJEXT) +effectswitch_LDADD = $(LDADD) +effectswitch_DEPENDENCIES = \ + $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ + $(am__DEPENDENCIES_1) elementcreate_SOURCES = elementcreate.c elementcreate_OBJECTS = elementcreate.$(OBJEXT) elementcreate_LDADD = $(LDADD) @@ -204,6 +205,12 @@ init_LDADD = $(LDADD) init_DEPENDENCIES = \ $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ $(am__DEPENDENCIES_1) +norebuffer_SOURCES = norebuffer.c +norebuffer_OBJECTS = norebuffer.$(OBJEXT) +norebuffer_LDADD = $(LDADD) +norebuffer_DEPENDENCIES = \ + $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ + $(am__DEPENDENCIES_1) pad_SOURCES = pad.c pad_OBJECTS = pad.$(OBJEXT) pad_LDADD = $(LDADD) @@ -216,6 +223,12 @@ playbin_LDADD = $(LDADD) playbin_DEPENDENCIES = \ $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ $(am__DEPENDENCIES_1) +playsink_SOURCES = playsink.c +playsink_OBJECTS = playsink.$(OBJEXT) +playsink_LDADD = $(LDADD) +playsink_DEPENDENCIES = \ + $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ + $(am__DEPENDENCIES_1) probe_SOURCES = probe.c probe_OBJECTS = probe.$(OBJEXT) probe_LDADD = $(LDADD) @@ -228,6 +241,12 @@ query_LDADD = $(LDADD) query_DEPENDENCIES = \ $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ $(am__DEPENDENCIES_1) +testrtpool_SOURCES = testrtpool.c +testrtpool_OBJECTS = testrtpool-testrtpool.$(OBJEXT) +testrtpool_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +testrtpool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testrtpool_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ typefind_SOURCES = typefind.c typefind_OBJECTS = typefind.$(OBJEXT) typefind_LDADD = $(LDADD) @@ -260,14 +279,16 @@ am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = appsink.c appsrc.c bin.c blockprobe.c decodebin.c dynamic.c \ - dynformat.c elementcreate.c elementfactory.c elementget.c \ - elementlink.c elementmake.c ghostpad.c helloworld.c init.c \ - pad.c playbin.c probe.c query.c typefind.c +SOURCES = appsink.c appsrc.c bin.c blockprobe.c decodebin.c \ + dynformat.c effectswitch.c elementcreate.c elementfactory.c \ + elementget.c elementlink.c elementmake.c ghostpad.c \ + helloworld.c init.c norebuffer.c pad.c playbin.c playsink.c \ + probe.c query.c testrtpool.c typefind.c DIST_SOURCES = appsink.c appsrc.c bin.c blockprobe.c decodebin.c \ - dynamic.c dynformat.c elementcreate.c elementfactory.c \ + dynformat.c effectswitch.c elementcreate.c elementfactory.c \ elementget.c elementlink.c elementmake.c ghostpad.c \ - helloworld.c init.c pad.c playbin.c probe.c query.c typefind.c + helloworld.c init.c norebuffer.c pad.c playbin.c playsink.c \ + probe.c query.c testrtpool.c typefind.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -468,6 +489,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -504,6 +528,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -574,7 +599,6 @@ TESTS_ENVIRONMENT = \ EXTRA_DIST = extract.pl EXAMPLES = \ - dynamic \ $(GNOME) \ elementcreate \ elementmake \ @@ -593,8 +617,12 @@ EXAMPLES = \ appsrc \ appsink \ dynformat \ + effectswitch \ + testrtpool \ + norebuffer \ playbin \ - decodebin + decodebin \ + playsink BUILT_SOURCES = \ elementmake.c elementcreate.c elementget.c elementlink.c elementfactory.c \ @@ -604,19 +632,25 @@ BUILT_SOURCES = \ helloworld.c \ init.c \ query.c \ - typefind.c dynamic.c \ + typefind.c \ blockprobe.c \ probe.c \ appsrc.c \ appsink.c \ dynformat.c \ - playbin.c decodebin.c + effectswitch.c \ + testrtpool.c \ + norebuffer.c \ + playbin.c decodebin.c \ + playsink.c CLEANFILES = core core.* test-registry.* *.gcno *.gcda $(BUILT_SOURCES) AM_CFLAGS = $(GST_OBJ_CFLAGS) LDADD = $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ $(GST_OBJ_LIBS) +testrtpool_LDADD = $(GST_OBJ_LIBS) $(PTHREAD_LIBS) +testrtpool_CFLAGS = $(GST_OBJ_CFLAGS) $(PTHREAD_CFLAGS) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -676,12 +710,12 @@ blockprobe$(EXEEXT): $(blockprobe_OBJECTS) $(blockprobe_DEPENDENCIES) $(EXTRA_bl decodebin$(EXEEXT): $(decodebin_OBJECTS) $(decodebin_DEPENDENCIES) $(EXTRA_decodebin_DEPENDENCIES) @rm -f decodebin$(EXEEXT) $(AM_V_CCLD)$(LINK) $(decodebin_OBJECTS) $(decodebin_LDADD) $(LIBS) -dynamic$(EXEEXT): $(dynamic_OBJECTS) $(dynamic_DEPENDENCIES) $(EXTRA_dynamic_DEPENDENCIES) - @rm -f dynamic$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dynamic_OBJECTS) $(dynamic_LDADD) $(LIBS) dynformat$(EXEEXT): $(dynformat_OBJECTS) $(dynformat_DEPENDENCIES) $(EXTRA_dynformat_DEPENDENCIES) @rm -f dynformat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dynformat_OBJECTS) $(dynformat_LDADD) $(LIBS) +effectswitch$(EXEEXT): $(effectswitch_OBJECTS) $(effectswitch_DEPENDENCIES) $(EXTRA_effectswitch_DEPENDENCIES) + @rm -f effectswitch$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(effectswitch_OBJECTS) $(effectswitch_LDADD) $(LIBS) elementcreate$(EXEEXT): $(elementcreate_OBJECTS) $(elementcreate_DEPENDENCIES) $(EXTRA_elementcreate_DEPENDENCIES) @rm -f elementcreate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(elementcreate_OBJECTS) $(elementcreate_LDADD) $(LIBS) @@ -706,18 +740,27 @@ helloworld$(EXEEXT): $(helloworld_OBJECTS) $(helloworld_DEPENDENCIES) $(EXTRA_he init$(EXEEXT): $(init_OBJECTS) $(init_DEPENDENCIES) $(EXTRA_init_DEPENDENCIES) @rm -f init$(EXEEXT) $(AM_V_CCLD)$(LINK) $(init_OBJECTS) $(init_LDADD) $(LIBS) +norebuffer$(EXEEXT): $(norebuffer_OBJECTS) $(norebuffer_DEPENDENCIES) $(EXTRA_norebuffer_DEPENDENCIES) + @rm -f norebuffer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(norebuffer_OBJECTS) $(norebuffer_LDADD) $(LIBS) pad$(EXEEXT): $(pad_OBJECTS) $(pad_DEPENDENCIES) $(EXTRA_pad_DEPENDENCIES) @rm -f pad$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pad_OBJECTS) $(pad_LDADD) $(LIBS) playbin$(EXEEXT): $(playbin_OBJECTS) $(playbin_DEPENDENCIES) $(EXTRA_playbin_DEPENDENCIES) @rm -f playbin$(EXEEXT) $(AM_V_CCLD)$(LINK) $(playbin_OBJECTS) $(playbin_LDADD) $(LIBS) +playsink$(EXEEXT): $(playsink_OBJECTS) $(playsink_DEPENDENCIES) $(EXTRA_playsink_DEPENDENCIES) + @rm -f playsink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(playsink_OBJECTS) $(playsink_LDADD) $(LIBS) probe$(EXEEXT): $(probe_OBJECTS) $(probe_DEPENDENCIES) $(EXTRA_probe_DEPENDENCIES) @rm -f probe$(EXEEXT) $(AM_V_CCLD)$(LINK) $(probe_OBJECTS) $(probe_LDADD) $(LIBS) query$(EXEEXT): $(query_OBJECTS) $(query_DEPENDENCIES) $(EXTRA_query_DEPENDENCIES) @rm -f query$(EXEEXT) $(AM_V_CCLD)$(LINK) $(query_OBJECTS) $(query_LDADD) $(LIBS) +testrtpool$(EXEEXT): $(testrtpool_OBJECTS) $(testrtpool_DEPENDENCIES) $(EXTRA_testrtpool_DEPENDENCIES) + @rm -f testrtpool$(EXEEXT) + $(AM_V_CCLD)$(testrtpool_LINK) $(testrtpool_OBJECTS) $(testrtpool_LDADD) $(LIBS) typefind$(EXEEXT): $(typefind_OBJECTS) $(typefind_DEPENDENCIES) $(EXTRA_typefind_DEPENDENCIES) @rm -f typefind$(EXEEXT) $(AM_V_CCLD)$(LINK) $(typefind_OBJECTS) $(typefind_LDADD) $(LIBS) @@ -733,8 +776,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blockprobe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decodebin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynamic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynformat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/effectswitch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elementcreate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elementfactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elementget.Po@am__quote@ @@ -743,10 +786,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ghostpad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helloworld.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norebuffer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playbin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playsink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/probe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrtpool-testrtpool.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/typefind.Po@am__quote@ .c.o: @@ -770,6 +816,20 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +testrtpool-testrtpool.o: testrtpool.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testrtpool_CFLAGS) $(CFLAGS) -MT testrtpool-testrtpool.o -MD -MP -MF $(DEPDIR)/testrtpool-testrtpool.Tpo -c -o testrtpool-testrtpool.o `test -f 'testrtpool.c' || echo '$(srcdir)/'`testrtpool.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/testrtpool-testrtpool.Tpo $(DEPDIR)/testrtpool-testrtpool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testrtpool.c' object='testrtpool-testrtpool.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testrtpool_CFLAGS) $(CFLAGS) -c -o testrtpool-testrtpool.o `test -f 'testrtpool.c' || echo '$(srcdir)/'`testrtpool.c + +testrtpool-testrtpool.obj: testrtpool.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testrtpool_CFLAGS) $(CFLAGS) -MT testrtpool-testrtpool.obj -MD -MP -MF $(DEPDIR)/testrtpool-testrtpool.Tpo -c -o testrtpool-testrtpool.obj `if test -f 'testrtpool.c'; then $(CYGPATH_W) 'testrtpool.c'; else $(CYGPATH_W) '$(srcdir)/testrtpool.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/testrtpool-testrtpool.Tpo $(DEPDIR)/testrtpool-testrtpool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testrtpool.c' object='testrtpool-testrtpool.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testrtpool_CFLAGS) $(CFLAGS) -c -o testrtpool-testrtpool.obj `if test -f 'testrtpool.c'; then $(CYGPATH_W) 'testrtpool.c'; else $(CYGPATH_W) '$(srcdir)/testrtpool.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -1099,7 +1159,7 @@ init.c: $(top_srcdir)/docs/manual/basics-init.xml query.c: $(top_srcdir)/docs/manual/advanced-position.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< -typefind.c dynamic.c: $(top_srcdir)/docs/manual/advanced-autoplugging.xml +typefind.c: $(top_srcdir)/docs/manual/advanced-autoplugging.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< blockprobe.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml @@ -1117,7 +1177,16 @@ appsink.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml dynformat.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< -playbin.c decodebin.c: $(top_srcdir)/docs/manual/highlevel-components.xml +effectswitch.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml + $(PERL_PATH) $(srcdir)/extract.pl $@ $< + +norebuffer.c: $(top_srcdir)/docs/manual/advanced-buffering.xml + $(PERL_PATH) $(srcdir)/extract.pl $@ $< + +playbin.c decodebin.c playsink.c: $(top_srcdir)/docs/manual/highlevel-playback.xml + $(PERL_PATH) $(srcdir)/extract.pl $@ $< + +testrtpool.c: $(top_srcdir)/docs/manual/advanced-threads.xml $(PERL_PATH) $(srcdir)/extract.pl $@ $< # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/examples/manual/decodebin.c b/tests/examples/manual/decodebin.c index 7985868..d18f2ad 100644 --- a/tests/examples/manual/decodebin.c +++ b/tests/examples/manual/decodebin.c @@ -1,8 +1,8 @@ -/*** block a from ../../../docs/manual/highlevel-components.xml ***/ +/*** block a from ../../../docs/manual/highlevel-playback.xml ***/ #include <gst/gst.h> -/*** block b from ../../../docs/manual/highlevel-components.xml ***/ +/*** block b from ../../../docs/manual/highlevel-playback.xml ***/ static gboolean my_bus_callback (GstBus *bus, GstMessage *message, @@ -36,7 +36,7 @@ my_bus_callback (GstBus *bus, return TRUE; } -/*** block c from ../../../docs/manual/highlevel-components.xml ***/ +/*** block c from ../../../docs/manual/highlevel-playback.xml ***/ GstElement *pipeline, *audio; static void diff --git a/tests/examples/manual/dynamic.c b/tests/examples/manual/dynamic.c deleted file mode 100644 index 355caa7..0000000 --- a/tests/examples/manual/dynamic.c +++ /dev/null @@ -1,330 +0,0 @@ - -/*** block a from ../../../docs/manual/advanced-autoplugging.xml ***/ -#include <gst/gst.h> - -GstElement *pipeline; - -/*** block b from ../../../docs/manual/advanced-autoplugging.xml ***/ -static GList *factories; - -/* - * This function is called by the registry loader. Its return value - * (TRUE or FALSE) decides whether the given feature will be included - * in the list that we're generating further down. - */ - -static gboolean -cb_feature_filter (GstPluginFeature *feature, - gpointer data) -{ - const gchar *klass; - guint rank; - - /* we only care about element factories */ - if (!GST_IS_ELEMENT_FACTORY (feature)) - return FALSE; - - /* only parsers, demuxers and decoders */ - klass = gst_element_factory_get_metadata (GST_ELEMENT_FACTORY (feature), GST_ELEMENT_METADATA_KLASS); - if (g_strrstr (klass, "Demux") == NULL && - g_strrstr (klass, "Decoder") == NULL && - g_strrstr (klass, "Parse") == NULL) - return FALSE; - - /* only select elements with autoplugging rank */ - rank = gst_plugin_feature_get_rank (feature); - if (rank < GST_RANK_MARGINAL) - return FALSE; - - return TRUE; -} - -/* - * This function is called to sort features by rank. - */ - -static gint -cb_compare_ranks (GstPluginFeature *f1, - GstPluginFeature *f2) -{ - return gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1); -} - -static void -init_factories (void) -{ - /* first filter out the interesting element factories */ - factories = gst_registry_feature_filter ( - gst_registry_get (), - (GstPluginFeatureFilter) cb_feature_filter, FALSE, NULL); - - /* sort them according to their ranks */ - factories = g_list_sort (factories, (GCompareFunc) cb_compare_ranks); -} - -/*** block c from ../../../docs/manual/advanced-autoplugging.xml ***/ -static void try_to_plug (GstPad *pad, GstCaps *caps); - -static GstElement *audiosink; - -static void -cb_newpad (GstElement *element, - GstPad *pad, - gpointer data) -{ - GstCaps *caps; - - caps = gst_pad_query_caps (pad, NULL); - try_to_plug (pad, caps); - gst_caps_unref (caps); -} - -static void -close_link (GstPad *srcpad, - GstElement *sinkelement, - const gchar *padname, - const GList *templlist) -{ - GstPad *pad; - gboolean has_dynamic_pads = FALSE; - - g_print ("Plugging pad %s:%s to newly created %s:%s\n", - gst_object_get_name (GST_OBJECT (gst_pad_get_parent (srcpad))), - gst_pad_get_name (srcpad), - gst_object_get_name (GST_OBJECT (sinkelement)), padname); - - /* add the element to the pipeline and set correct state */ - if (sinkelement != audiosink) { - gst_bin_add (GST_BIN (pipeline), sinkelement); - gst_element_set_state (sinkelement, GST_STATE_READY); - } - pad = gst_element_get_static_pad (sinkelement, padname); - gst_pad_link (srcpad, pad); - if (sinkelement != audiosink) { - gst_element_set_state (sinkelement, GST_STATE_PAUSED); - } - gst_object_unref (GST_OBJECT (pad)); - - /* if we have static source pads, link those. If we have dynamic - * source pads, listen for pad-added signals on the element */ - for ( ; templlist != NULL; templlist = templlist->next) { - GstStaticPadTemplate *templ = templlist->data; - - /* only sourcepads, no request pads */ - if (templ->direction != GST_PAD_SRC || - templ->presence == GST_PAD_REQUEST) { - continue; - } - - switch (templ->presence) { - case GST_PAD_ALWAYS: { - GstPad *pad = gst_element_get_static_pad (sinkelement, templ->name_template); - GstCaps *caps = gst_pad_query_caps (pad, NULL); - - /* link */ - try_to_plug (pad, caps); - gst_object_unref (GST_OBJECT (pad)); - gst_caps_unref (caps); - break; - } - case GST_PAD_SOMETIMES: - has_dynamic_pads = TRUE; - break; - default: - break; - } - } - - /* listen for newly created pads if this element supports that */ - if (has_dynamic_pads) { - g_signal_connect (sinkelement, "pad-added", G_CALLBACK (cb_newpad), NULL); - } -} - -static void -try_to_plug (GstPad *pad, - GstCaps *caps) -{ - GstObject *parent = GST_OBJECT (GST_OBJECT_PARENT (pad)); - const gchar *media; - const GList *item; - GstCaps *res, *audiocaps; - - /* don't plug if we're already plugged - FIXME: memleak for pad */ - if (GST_PAD_IS_LINKED (gst_element_get_static_pad (audiosink, "sink"))) { - g_print ("Omitting link for pad %s:%s because we're already linked\n", - GST_OBJECT_NAME (parent), GST_OBJECT_NAME (pad)); - return; - } - - /* as said above, we only try to plug audio... Omit video */ - media = gst_structure_get_name (gst_caps_get_structure (caps, 0)); - if (g_strrstr (media, "video")) { - g_print ("Omitting link for pad %s:%s because media type %s is non-audio\n", - GST_OBJECT_NAME (parent), GST_OBJECT_NAME (pad), media); - return; - } - - /* can it link to the audiopad? */ - audiocaps = gst_pad_query_caps (gst_element_get_static_pad (audiosink, "sink"), - NULL); - res = gst_caps_intersect (caps, audiocaps); - if (res && !gst_caps_is_empty (res)) { - g_print ("Found pad to link to audiosink - plugging is now done\n"); - close_link (pad, audiosink, "sink", NULL); - gst_caps_unref (audiocaps); - gst_caps_unref (res); - return; - } - gst_caps_unref (audiocaps); - gst_caps_unref (res); - - /* try to plug from our list */ - for (item = factories; item != NULL; item = item->next) { - GstElementFactory *factory = GST_ELEMENT_FACTORY (item->data); - const GList *pads; - - for (pads = gst_element_factory_get_static_pad_templates (factory); - pads != NULL; pads = pads->next) { - GstStaticPadTemplate *templ = pads->data; - - /* find the sink template - need an always pad*/ - if (templ->direction != GST_PAD_SINK || - templ->presence != GST_PAD_ALWAYS) { - continue; - } - - /* can it link? */ - res = gst_caps_intersect (caps, - gst_static_caps_get (&templ->static_caps)); - if (res && !gst_caps_is_empty (res)) { - GstElement *element; - gchar *name_template = g_strdup (templ->name_template); - - /* close link and return */ - gst_caps_unref (res); - element = gst_element_factory_create (factory, NULL); - close_link (pad, element, name_template, - gst_element_factory_get_static_pad_templates (factory)); - g_free (name_template); - return; - } - gst_caps_unref (res); - - /* we only check one sink template per factory, so move on to the - * next factory now */ - break; - } - } - - /* if we get here, no item was found */ - g_print ("No compatible pad found to decode %s on %s:%s\n", - media, GST_OBJECT_NAME (parent), GST_OBJECT_NAME (pad)); -} - -static void -cb_typefound (GstElement *typefind, - guint probability, - GstCaps *caps, - gpointer data) -{ - gchar *s; - GstPad *pad; - - s = gst_caps_to_string (caps); - g_print ("Detected media type %s\n", s); - g_free (s); - - /* actually plug now */ - pad = gst_element_get_static_pad (typefind, "src"); - try_to_plug (pad, caps); - gst_object_unref (GST_OBJECT (pad)); -} - -/*** block d from ../../../docs/manual/advanced-autoplugging.xml ***/ -static gboolean -my_bus_callback (GstBus *bus, - GstMessage *message, - gpointer data) -{ - GMainLoop *loop = data; - - switch (GST_MESSAGE_TYPE (message)) { - case GST_MESSAGE_ERROR: { - GError *err; - gchar *debug; - - gst_message_parse_error (message, &err, &debug); - g_print ("Error: %s\n", err->message); - g_error_free (err); - g_free (debug); - - g_main_loop_quit (loop); - break; - } - case GST_MESSAGE_EOS: - /* end-of-stream */ - g_main_loop_quit (loop); - break; - default: - break; - } - - /* remove from queue */ - return TRUE; -} - -gint -main (gint argc, - gchar *argv[]) -{ - GMainLoop *loop; - GstElement *typefind, *realsink; - GstBus *bus; - GError *err = NULL; - gchar *p; - - /* init GStreamer and ourselves */ - gst_init (&argc, &argv); - loop = g_main_loop_new (NULL, FALSE); - init_factories (); - - /* args */ - if (argc != 2) { - g_print ("Usage: %s <filename>\n", argv[0]); - return -1; - } - - /* pipeline */ - p = g_strdup_printf ("filesrc location=\"%s\" ! typefind name=tf", argv[1]); - pipeline = gst_parse_launch (p, &err); - g_free (p); - - if (err) { - g_error ("Could not construct pipeline: %s", err->message); - g_error_free (err); - return -1; - } - - bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); - gst_bus_add_watch (bus, my_bus_callback, NULL); - gst_object_unref (bus); - - typefind = gst_bin_get_by_name (GST_BIN (pipeline), "tf"); - g_signal_connect (typefind, "have-type", G_CALLBACK (cb_typefound), NULL); - gst_object_unref (GST_OBJECT (typefind)); - audiosink = gst_element_factory_make ("audioconvert", "aconv"); - realsink = gst_element_factory_make ("alsasink", "audiosink"); - gst_bin_add_many (GST_BIN (pipeline), audiosink, realsink, NULL); - gst_element_link (audiosink, realsink); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - - /* run */ - g_main_loop_run (loop); - - /* exit */ - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref (GST_OBJECT (pipeline)); - - return 0; -} diff --git a/tests/examples/manual/effectswitch.c b/tests/examples/manual/effectswitch.c new file mode 100644 index 0000000..5cba9c0 --- /dev/null +++ b/tests/examples/manual/effectswitch.c @@ -0,0 +1,192 @@ + +/*** block from ../../../docs/manual/advanced-dataaccess.xml ***/ +#include <gst/gst.h> + +static gchar *opt_effects = NULL; + +#define DEFAULT_EFFECTS "identity,exclusion,navigationtest," \ + "agingtv,videoflip,vertigotv,gaussianblur,shagadelictv,edgetv" + +static GstPad *blockpad; +static GstElement *conv_before; +static GstElement *conv_after; +static GstElement *cur_effect; +static GstElement *pipeline; + +static GQueue effects = G_QUEUE_INIT; + +static GstPadProbeReturn +event_probe_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) +{ + GMainLoop *loop = user_data; + GstElement *next; + + if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_DATA (info)) != GST_EVENT_EOS) + return GST_PAD_PROBE_OK; + + gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info)); + + /* push current event back into the queue */ + g_queue_push_tail (&effects, gst_object_ref (cur_effect)); + /* take next effect from the queue */ + next = g_queue_pop_head (&effects); + if (next == NULL) { + GST_DEBUG_OBJECT (pad, "no more effects"); + g_main_loop_quit (loop); + return GST_PAD_PROBE_DROP; + } + + g_print ("Switching from '%s' to '%s'..\n", GST_OBJECT_NAME (cur_effect), + GST_OBJECT_NAME (next)); + + gst_element_set_state (cur_effect, GST_STATE_NULL); + + /* remove unlinks automatically */ + GST_DEBUG_OBJECT (pipeline, "removing %" GST_PTR_FORMAT, cur_effect); + gst_bin_remove (GST_BIN (pipeline), cur_effect); + + GST_DEBUG_OBJECT (pipeline, "adding %" GST_PTR_FORMAT, next); + gst_bin_add (GST_BIN (pipeline), next); + + GST_DEBUG_OBJECT (pipeline, "linking.."); + gst_element_link_many (conv_before, next, conv_after, NULL); + + gst_element_set_state (next, GST_STATE_PLAYING); + + cur_effect = next; + GST_DEBUG_OBJECT (pipeline, "done"); + + return GST_PAD_PROBE_DROP; +} + +static GstPadProbeReturn +pad_probe_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) +{ + GstPad *srcpad, *sinkpad; + + GST_DEBUG_OBJECT (pad, "pad is blocked now"); + + /* remove the probe first */ + gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info)); + + /* install new probe for EOS */ + srcpad = gst_element_get_static_pad (cur_effect, "src"); + gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BLOCK | + GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, event_probe_cb, user_data, NULL); + gst_object_unref (srcpad); + + /* push EOS into the element, the probe will be fired when the + * EOS leaves the effect and it has thus drained all of its data */ + sinkpad = gst_element_get_static_pad (cur_effect, "sink"); + gst_pad_send_event (sinkpad, gst_event_new_eos ()); + gst_object_unref (sinkpad); + + return GST_PAD_PROBE_OK; +} + +static gboolean +timeout_cb (gpointer user_data) +{ + gst_pad_add_probe (blockpad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, + pad_probe_cb, user_data, NULL); + + return TRUE; +} + +static gboolean +bus_cb (GstBus * bus, GstMessage * msg, gpointer user_data) +{ + GMainLoop *loop = user_data; + + switch (GST_MESSAGE_TYPE (msg)) { + case GST_MESSAGE_ERROR:{ + GError *err = NULL; + gchar *dbg; + + gst_message_parse_error (msg, &err, &dbg); + gst_object_default_error (msg->src, err, dbg); + g_error_free (err); + g_free (dbg); + g_main_loop_quit (loop); + break; + } + default: + break; + } + return TRUE; +} + +int +main (int argc, char **argv) +{ + GOptionEntry options[] = { + {"effects", 'e', 0, G_OPTION_ARG_STRING, &opt_effects, + "Effects to use (comma-separated list of element names)", NULL}, + {NULL} + }; + GOptionContext *ctx; + GError *err = NULL; + GMainLoop *loop; + GstElement *src, *sink; + gchar **effect_names, **e; + + ctx = g_option_context_new (""); + g_option_context_add_main_entries (ctx, options, NULL); + g_option_context_add_group (ctx, gst_init_get_option_group ()); + if (!g_option_context_parse (ctx, &argc, &argv, &err)) { + g_print ("Error initializing: %s\n", err->message); + return 1; + } + g_option_context_free (ctx); + + if (opt_effects != NULL) + effect_names = g_strsplit (opt_effects, ",", -1); + else + effect_names = g_strsplit (DEFAULT_EFFECTS, ",", -1); + + for (e = effect_names; e != NULL && *e != NULL; ++e) { + GstElement *el; + + el = gst_element_factory_make (*e, NULL); + if (el) { + g_print ("Adding effect '%s'\n", *e); + g_queue_push_tail (&effects, el); + } + } + + pipeline = gst_pipeline_new ("pipeline"); + + src = gst_element_factory_make ("videotestsrc", NULL); + g_object_set (src, "is-live", TRUE, NULL); + + blockpad = gst_element_get_static_pad (src, "src"); + + conv_before = gst_element_factory_make ("videoconvert", NULL); + + cur_effect = g_queue_pop_head (&effects); + + conv_after = gst_element_factory_make ("videoconvert", NULL); + + sink = gst_element_factory_make ("ximagesink", NULL); + + gst_bin_add_many (GST_BIN (pipeline), src, conv_before, cur_effect, + conv_after, sink, NULL); + + gst_element_link_many (src, conv_before, cur_effect, conv_after, + sink, NULL); + + gst_element_set_state (pipeline, GST_STATE_PLAYING); + + loop = g_main_loop_new (NULL, FALSE); + + gst_bus_add_watch (GST_ELEMENT_BUS (pipeline), bus_cb, loop); + + g_timeout_add_seconds (1, timeout_cb, loop); + + g_main_loop_run (loop); + + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (pipeline); + + return 0; +} diff --git a/tests/examples/manual/norebuffer.c b/tests/examples/manual/norebuffer.c new file mode 100644 index 0000000..67db10f --- /dev/null +++ b/tests/examples/manual/norebuffer.c @@ -0,0 +1,153 @@ + +/*** block a from ../../../docs/manual/advanced-buffering.xml ***/ +#include <gst/gst.h> + +GstState target_state; +static gboolean is_live; +static gboolean is_buffering; + +static gboolean +buffer_timeout (gpointer data) +{ + GstElement *pipeline = data; + GstQuery *query; + gboolean busy; + gint percent; + gint64 estimated_total; + gint64 position, duration; + guint64 play_left; + + query = gst_query_new_buffering (GST_FORMAT_TIME); + + if (!gst_element_query (pipeline, query)) + return TRUE; + + gst_query_parse_buffering_percent (query, &busy, &percent); + gst_query_parse_buffering_range (query, NULL, NULL, NULL, &estimated_total); + + if (estimated_total == -1) + estimated_total = 0; + + /* calculate the remaining playback time */ + if (!gst_element_query_position (pipeline, GST_FORMAT_TIME, &position)) + position = -1; + if (!gst_element_query_duration (pipeline, GST_FORMAT_TIME, &duration)) + duration = -1; + + if (duration != -1 && position != -1) + play_left = GST_TIME_AS_MSECONDS (duration - position); + else + play_left = 0; + + g_message ("play_left %" G_GUINT64_FORMAT", estimated_total %" G_GUINT64_FORMAT + ", percent %d", play_left, estimated_total, percent); + + /* we are buffering or the estimated download time is bigger than the + * remaining playback time. We keep buffering. */ + is_buffering = (busy || estimated_total * 1.1 > play_left); + + if (!is_buffering) + gst_element_set_state (pipeline, target_state); + + return is_buffering; +} + +static void +on_message_buffering (GstBus *bus, GstMessage *message, gpointer user_data) +{ + GstElement *pipeline = user_data; + gint percent; + + /* no state management needed for live pipelines */ + if (is_live) + return; + + gst_message_parse_buffering (message, &percent); + + if (percent < 100) { + /* buffering busy */ + if (is_buffering == FALSE) { + is_buffering = TRUE; + if (target_state == GST_STATE_PLAYING) { + /* we were not buffering but PLAYING, PAUSE the pipeline. */ + gst_element_set_state (pipeline, GST_STATE_PAUSED); + } + } + } +} + +static void +on_message_async_done (GstBus *bus, GstMessage *message, gpointer user_data) +{ + GstElement *pipeline = user_data; + + if (is_buffering == FALSE) + gst_element_set_state (pipeline, target_state); + else + g_timeout_add (500, buffer_timeout, pipeline); +} + +gint +main (gint argc, + gchar *argv[]) +{ + GstElement *pipeline; + GMainLoop *loop; + GstBus *bus; + GstStateChangeReturn ret; + + /* init GStreamer */ + gst_init (&argc, &argv); + loop = g_main_loop_new (NULL, FALSE); + + /* make sure we have a URI */ + if (argc != 2) { + g_print ("Usage: %s <URI>\n", argv[0]); + return -1; + } + + /* set up */ + pipeline = gst_element_factory_make ("playbin", "pipeline"); + g_object_set (G_OBJECT (pipeline), "uri", argv[1], NULL); + g_object_set (G_OBJECT (pipeline), "flags", 0x697 , NULL); + + bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); + gst_bus_add_signal_watch (bus); + + g_signal_connect (bus, "message::buffering", + (GCallback) on_message_buffering, pipeline); + g_signal_connect (bus, "message::async-done", + (GCallback) on_message_async_done, pipeline); + gst_object_unref (bus); + + is_buffering = FALSE; + target_state = GST_STATE_PLAYING; + ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); + + switch (ret) { + case GST_STATE_CHANGE_SUCCESS: + is_live = FALSE; + break; + + case GST_STATE_CHANGE_FAILURE: + g_warning ("failed to PAUSE"); + return -1; + + case GST_STATE_CHANGE_NO_PREROLL: + is_live = TRUE; + break; + + default: + break; + } + + /* now run */ + g_main_loop_run (loop); + + /* also clean up */ + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (GST_OBJECT (pipeline)); + g_main_loop_unref (loop); + + return 0; +} diff --git a/tests/examples/manual/playbin.c b/tests/examples/manual/playbin.c index 868b586..3534af3 100644 --- a/tests/examples/manual/playbin.c +++ b/tests/examples/manual/playbin.c @@ -1,8 +1,8 @@ -/*** block a from ../../../docs/manual/highlevel-components.xml ***/ +/*** block a from ../../../docs/manual/highlevel-playback.xml ***/ #include <gst/gst.h> -/*** block b from ../../../docs/manual/highlevel-components.xml ***/ +/*** block b from ../../../docs/manual/highlevel-playback.xml ***/ static gboolean my_bus_callback (GstBus *bus, GstMessage *message, @@ -36,7 +36,7 @@ my_bus_callback (GstBus *bus, return TRUE; } -/*** block c from ../../../docs/manual/highlevel-components.xml ***/ +/*** block c from ../../../docs/manual/highlevel-playback.xml ***/ gint main (gint argc, gchar *argv[]) diff --git a/tests/examples/manual/playsink.c b/tests/examples/manual/playsink.c new file mode 100644 index 0000000..b469ec2 --- /dev/null +++ b/tests/examples/manual/playsink.c @@ -0,0 +1,126 @@ + +/*** block a from ../../../docs/manual/highlevel-playback.xml ***/ +#include <gst/gst.h> + +/*** block b from ../../../docs/manual/highlevel-playback.xml ***/ +static gboolean +my_bus_callback (GstBus *bus, + GstMessage *message, + gpointer data) +{ + GMainLoop *loop = data; + + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_ERROR: { + GError *err; + gchar *debug; + + gst_message_parse_error (message, &err, &debug); + g_print ("Error: %s\n", err->message); + g_error_free (err); + g_free (debug); + + g_main_loop_quit (loop); + break; + } + case GST_MESSAGE_EOS: + /* end-of-stream */ + g_main_loop_quit (loop); + break; + default: + /* unhandled message */ + break; + } + + /* remove message from the queue */ + return TRUE; +} + +/*** block c from ../../../docs/manual/highlevel-playback.xml ***/ +GstElement *pipeline, *sink; + +static void +cb_pad_added (GstElement *dec, + GstPad *pad, + gpointer data) +{ + GstCaps *caps; + GstStructure *str; + const gchar *name; + GstPadTemplate *templ; + GstElementClass *klass; + + /* check media type */ + caps = gst_pad_query_caps (pad, NULL); + str = gst_caps_get_structure (caps, 0); + name = gst_structure_get_name (str); + + klass = GST_ELEMENT_GET_CLASS (sink); + + if (g_str_has_prefix (name, "audio")) { + templ = gst_element_class_get_pad_template (klass, "audio_sink"); + } else if (g_str_has_prefix (name, "video")) { + templ = gst_element_class_get_pad_template (klass, "video_sink"); + } else if (g_str_has_prefix (name, "text")) { + templ = gst_element_class_get_pad_template (klass, "text_sink"); + } else { + templ = NULL; + } + + if (templ) { + GstPad *sinkpad; + + sinkpad = gst_element_request_pad (sink, templ, NULL, NULL); + + if (!gst_pad_is_linked (sinkpad)) + gst_pad_link (pad, sinkpad); + + gst_object_unref (sinkpad); + } +} + +gint +main (gint argc, + gchar *argv[]) +{ + GMainLoop *loop; + GstElement *dec; + GstBus *bus; + + /* init GStreamer */ + gst_init (&argc, &argv); + loop = g_main_loop_new (NULL, FALSE); + + /* make sure we have input */ + if (argc != 2) { + g_print ("Usage: %s <uri>\n", argv[0]); + return -1; + } + + /* setup */ + pipeline = gst_pipeline_new ("pipeline"); + + bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); + gst_bus_add_watch (bus, my_bus_callback, loop); + gst_object_unref (bus); + + dec = gst_element_factory_make ("uridecodebin", "source"); + g_object_set (G_OBJECT (dec), "uri", argv[1], NULL); + g_signal_connect (dec, "pad-added", G_CALLBACK (cb_pad_added), NULL); + + /* create audio output */ + sink = gst_element_factory_make ("playsink", "sink"); + gst_util_set_object_arg (G_OBJECT (sink), "flags", + "soft-colorbalance+soft-volume+vis+text+audio+video"); + gst_bin_add_many (GST_BIN (pipeline), dec, sink, NULL); + + /* run */ + gst_element_set_state (pipeline, GST_STATE_PLAYING); + g_main_loop_run (loop); + + /* cleanup */ + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (GST_OBJECT (pipeline)); + + return 0; +} diff --git a/tests/examples/manual/testrtpool.c b/tests/examples/manual/testrtpool.c new file mode 100644 index 0000000..793969a --- /dev/null +++ b/tests/examples/manual/testrtpool.c @@ -0,0 +1,235 @@ + +/*** block a from ../../../docs/manual/advanced-threads.xml ***/ +#include <gst/gst.h> + +#define TEST_TYPE_RT_POOL (test_rt_pool_get_type ()) +#define TEST_RT_POOL(pool) (G_TYPE_CHECK_INSTANCE_CAST ((pool), TEST_TYPE_RT_POOL, TestRTPool)) +#define TEST_IS_RT_POOL(pool) (G_TYPE_CHECK_INSTANCE_TYPE ((pool), TEST_TYPE_RT_POOL)) +#define TEST_RT_POOL_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), TEST_TYPE_RT_POOL, TestRTPoolClass)) +#define TEST_IS_RT_POOL_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), TEST_TYPE_RT_POOL)) +#define TEST_RT_POOL_GET_CLASS(pool) (G_TYPE_INSTANCE_GET_CLASS ((pool), TEST_TYPE_RT_POOL, TestRTPoolClass)) +#define TEST_RT_POOL_CAST(pool) ((TestRTPool*)(pool)) + +typedef struct _TestRTPool TestRTPool; +typedef struct _TestRTPoolClass TestRTPoolClass; + +struct _TestRTPool { + GstTaskPool object; +}; + +struct _TestRTPoolClass { + GstTaskPoolClass parent_class; +}; + +GType test_rt_pool_get_type (void); + +GstTaskPool * test_rt_pool_new (void); + + +/*** block b from ../../../docs/manual/advanced-threads.xml ***/ +#include <pthread.h> + +typedef struct +{ + pthread_t thread; +} TestRTId; + +G_DEFINE_TYPE (TestRTPool, test_rt_pool, GST_TYPE_TASK_POOL); + +static void +default_prepare (GstTaskPool * pool, GError ** error) +{ + /* we don't do anything here. We could construct a pool of threads here that + * we could reuse later but we don't */ +} + +static void +default_cleanup (GstTaskPool * pool) +{ +} + +static gpointer +default_push (GstTaskPool * pool, GstTaskPoolFunction func, gpointer data, + GError ** error) +{ + TestRTId *tid; + gint res; + pthread_attr_t attr; + struct sched_param param; + + tid = g_slice_new0 (TestRTId); + + pthread_attr_init (&attr); + if ((res = pthread_attr_setschedpolicy (&attr, SCHED_RR)) != 0) + g_warning ("setschedpolicy: failure: %p", g_strerror (res)); + + param.sched_priority = 50; + if ((res = pthread_attr_setschedparam (&attr, ¶m)) != 0) + g_warning ("setschedparam: failure: %p", g_strerror (res)); + + if ((res = pthread_attr_setinheritsched (&attr, PTHREAD_EXPLICIT_SCHED)) != 0) + g_warning ("setinheritsched: failure: %p", g_strerror (res)); + + res = pthread_create (&tid->thread, &attr, (void *(*)(void *)) func, data); + + if (res != 0) { + g_set_error (error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN, + "Error creating thread: %s", g_strerror (res)); + g_slice_free (TestRTId, tid); + tid = NULL; + } + + return tid; +} + +static void +default_join (GstTaskPool * pool, gpointer id) +{ + TestRTId *tid = (TestRTId *) id; + + pthread_join (tid->thread, NULL); + + g_slice_free (TestRTId, tid); +} + +static void +test_rt_pool_class_init (TestRTPoolClass * klass) +{ + GstTaskPoolClass *gsttaskpool_class; + + gsttaskpool_class = (GstTaskPoolClass *) klass; + + gsttaskpool_class->prepare = default_prepare; + gsttaskpool_class->cleanup = default_cleanup; + gsttaskpool_class->push = default_push; + gsttaskpool_class->join = default_join; +} + +static void +test_rt_pool_init (TestRTPool * pool) +{ +} + +GstTaskPool * +test_rt_pool_new (void) +{ + GstTaskPool *pool; + + pool = g_object_new (TEST_TYPE_RT_POOL, NULL); + + return pool; +} + +/*** block c from ../../../docs/manual/advanced-threads.xml ***/ +static GMainLoop* loop; + +static void +on_stream_status (GstBus *bus, + GstMessage *message, + gpointer user_data) +{ + GstStreamStatusType type; + GstElement *owner; + const GValue *val; + GstTask *task = NULL; + + gst_message_parse_stream_status (message, &type, &owner); + + val = gst_message_get_stream_status_object (message); + + /* see if we know how to deal with this object */ + if (G_VALUE_TYPE (val) == GST_TYPE_TASK) { + task = g_value_get_object (val); + } + + switch (type) { + case GST_STREAM_STATUS_TYPE_CREATE: + if (task) { + GstTaskPool *pool; + + pool = test_rt_pool_new(); + + gst_task_set_pool (task, pool); + } + break; + default: + break; + } +} + +static void +on_error (GstBus *bus, + GstMessage *message, + gpointer user_data) +{ + g_message ("received ERROR"); + g_main_loop_quit (loop); +} + +static void +on_eos (GstBus *bus, + GstMessage *message, + gpointer user_data) +{ + g_main_loop_quit (loop); +} + +int +main (int argc, char *argv[]) +{ + GstElement *bin, *fakesrc, *fakesink; + GstBus *bus; + GstStateChangeReturn ret; + + gst_init (&argc, &argv); + + /* create a new bin to hold the elements */ + bin = gst_pipeline_new ("pipeline"); + g_assert (bin); + + /* create a source */ + fakesrc = gst_element_factory_make ("fakesrc", "fakesrc"); + g_assert (fakesrc); + g_object_set (fakesrc, "num-buffers", 50, NULL); + + /* and a sink */ + fakesink = gst_element_factory_make ("fakesink", "fakesink"); + g_assert (fakesink); + + /* add objects to the main pipeline */ + gst_bin_add_many (GST_BIN (bin), fakesrc, fakesink, NULL); + + /* link the elements */ + gst_element_link (fakesrc, fakesink); + + loop = g_main_loop_new (NULL, FALSE); + + /* get the bus, we need to install a sync handler */ + bus = gst_pipeline_get_bus (GST_PIPELINE (bin)); + gst_bus_enable_sync_message_emission (bus); + gst_bus_add_signal_watch (bus); + + g_signal_connect (bus, "sync-message::stream-status", + (GCallback) on_stream_status, NULL); + g_signal_connect (bus, "message::error", + (GCallback) on_error, NULL); + g_signal_connect (bus, "message::eos", + (GCallback) on_eos, NULL); + + /* start playing */ + ret = gst_element_set_state (bin, GST_STATE_PLAYING); + if (ret != GST_STATE_CHANGE_SUCCESS) { + g_message ("failed to change state"); + return -1; + } + + /* Run event loop listening for bus messages until EOS or ERROR */ + g_main_loop_run (loop); + + /* stop the bin */ + gst_element_set_state (bin, GST_STATE_NULL); + gst_object_unref (bus); + g_main_loop_unref (loop); + + return 0; +} diff --git a/tests/examples/memory/Makefile.in b/tests/examples/memory/Makefile.in index b36358b..7fdcb61 100644 --- a/tests/examples/memory/Makefile.in +++ b/tests/examples/memory/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -336,6 +336,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -372,6 +375,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/metadata/Makefile.in b/tests/examples/metadata/Makefile.in index a3cb815..549cb8b 100644 --- a/tests/examples/metadata/Makefile.in +++ b/tests/examples/metadata/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -334,6 +334,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -370,6 +373,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/queue/Makefile.in b/tests/examples/queue/Makefile.in index d4bb1d6..0d2a400 100644 --- a/tests/examples/queue/Makefile.in +++ b/tests/examples/queue/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -334,6 +334,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -370,6 +373,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/stepping/Makefile.in b/tests/examples/stepping/Makefile.in index 5e5057a..92f76b3 100644 --- a/tests/examples/stepping/Makefile.in +++ b/tests/examples/stepping/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -334,6 +334,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -370,6 +373,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tests/examples/streams/Makefile.am b/tests/examples/streams/Makefile.am index 910df0a..e1f87ac 100644 --- a/tests/examples/streams/Makefile.am +++ b/tests/examples/streams/Makefile.am @@ -1,5 +1,5 @@ noinst_PROGRAMS = stream-status -if HAVE_PTHREAD_H +if HAVE_PTHREAD noinst_PROGRAMS += rtpool-test endif @@ -8,7 +8,7 @@ stream_status_LDADD = $(GST_OBJ_LIBS) stream_status_CFLAGS = $(GST_OBJ_CFLAGS) rtpool_test_SOURCES = rtpool-test.c testrtpool.h testrtpool.c -rtpool_test_LDADD = $(GST_OBJ_LIBS) -lpthread -rtpool_test_CFLAGS = $(GST_OBJ_CFLAGS) +rtpool_test_LDADD = $(GST_OBJ_LIBS) $(PTHREAD_LIBS) +rtpool_test_CFLAGS = $(GST_OBJ_CFLAGS) $(PTHREAD_CFLAGS) EXTRA_DIST = rtpool-test.c testrtpool.h testrtpool.c diff --git a/tests/examples/streams/Makefile.in b/tests/examples/streams/Makefile.in index 0d76343..2d183e5 100644 --- a/tests/examples/streams/Makefile.in +++ b/tests/examples/streams/Makefile.in @@ -53,7 +53,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ noinst_PROGRAMS = stream-status$(EXEEXT) $(am__EXEEXT_1) -@HAVE_PTHREAD_H_TRUE@am__append_1 = rtpool-test +@HAVE_PTHREAD_TRUE@am__append_1 = rtpool-test subdir = tests/examples/streams DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -83,7 +83,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -98,13 +98,13 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -@HAVE_PTHREAD_H_TRUE@am__EXEEXT_1 = rtpool-test$(EXEEXT) +@HAVE_PTHREAD_TRUE@am__EXEEXT_1 = rtpool-test$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_rtpool_test_OBJECTS = rtpool_test-rtpool-test.$(OBJEXT) \ rtpool_test-testrtpool.$(OBJEXT) rtpool_test_OBJECTS = $(am_rtpool_test_OBJECTS) am__DEPENDENCIES_1 = -rtpool_test_DEPENDENCIES = $(am__DEPENDENCIES_1) +rtpool_test_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @@ -343,6 +343,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -379,6 +382,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -432,8 +436,8 @@ stream_status_SOURCES = stream-status.c stream_status_LDADD = $(GST_OBJ_LIBS) stream_status_CFLAGS = $(GST_OBJ_CFLAGS) rtpool_test_SOURCES = rtpool-test.c testrtpool.h testrtpool.c -rtpool_test_LDADD = $(GST_OBJ_LIBS) -lpthread -rtpool_test_CFLAGS = $(GST_OBJ_CFLAGS) +rtpool_test_LDADD = $(GST_OBJ_LIBS) $(PTHREAD_LIBS) +rtpool_test_CFLAGS = $(GST_OBJ_CFLAGS) $(PTHREAD_CFLAGS) EXTRA_DIST = rtpool-test.c testrtpool.h testrtpool.c all: all-am diff --git a/tests/examples/typefind/Makefile.in b/tests/examples/typefind/Makefile.in index 0858fd9..58fb158 100644 --- a/tests/examples/typefind/Makefile.in +++ b/tests/examples/typefind/Makefile.in @@ -82,7 +82,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/introspection.m4 \ - $(top_srcdir)/common/m4/pkg.m4 \ + $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \ $(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -334,6 +334,9 @@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ POSUB = @POSUB@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -370,6 +373,7 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ |