mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-09 01:29:28 +00:00
Synced with the HEAD branch again... amazing how many changes we have in only a week time...
Original commit message from CVS: Synced with the HEAD branch again... amazing how many changes we have in only a week time...
This commit is contained in:
parent
33f74711fb
commit
c199469744
13
AUTHORS
13
AUTHORS
|
@ -1,4 +1,15 @@
|
||||||
Erik Walthinsen <omega@cse.ogi.edu>
|
Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
|
Matt Howell <mhowell@users.sourceforge.net>
|
||||||
|
Brent Bradburn <bbradburn@users.sourceforge.net>
|
||||||
Wim Taymans <wim.taymans@tvd.be>
|
Wim Taymans <wim.taymans@tvd.be>
|
||||||
Richard Boulton <richard@tartarus.org>
|
Richard Boulton <richard@tartarus.org>
|
||||||
Chris Emerson (PPC port)
|
David I. Lehn <dlehn@users.sourceforge.net>
|
||||||
|
- debian packaging
|
||||||
|
- various fixes
|
||||||
|
Chris Emerson <chris@tartarus.org>
|
||||||
|
- PPC port
|
||||||
|
- small libxml patches
|
||||||
|
Jens Thiele <karme@unforgettable.com>
|
||||||
|
- color conversion patches
|
||||||
|
Thomas Nyberg <thomas@codefactory.se>
|
||||||
|
- gstreamer.m4 macros
|
||||||
|
|
|
@ -9,7 +9,10 @@ Required libraries:
|
||||||
===================
|
===================
|
||||||
glib v1.2.0 or better
|
glib v1.2.0 or better
|
||||||
gtk+ v1.2.0 or better
|
gtk+ v1.2.0 or better
|
||||||
libxml
|
libxml (also called gnome-xml, available from http://xmlsoft.org/)
|
||||||
|
|
||||||
|
These libraries are all central parts of gnome, and are available from the
|
||||||
|
ftp.gnome.org or its mirrors, amongst other places.
|
||||||
|
|
||||||
Optional libraries:
|
Optional libraries:
|
||||||
===================
|
===================
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#undef HAVE_CPU_PPC
|
#undef HAVE_CPU_PPC
|
||||||
#undef HAVE_CPU_ALPHA
|
#undef HAVE_CPU_ALPHA
|
||||||
#undef HAVE_CPU_ARM
|
#undef HAVE_CPU_ARM
|
||||||
|
#undef HAVE_CPU_SPARC
|
||||||
|
|
||||||
#undef HAVE_GDK_PIXBUF
|
#undef HAVE_GDK_PIXBUF
|
||||||
#undef HAVE_LIBGHTTP
|
#undef HAVE_LIBGHTTP
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
#undef HAVE_VORBIS
|
#undef HAVE_VORBIS
|
||||||
#undef HAVE_LIBJPEG
|
#undef HAVE_LIBJPEG
|
||||||
#undef HAVE_NASM
|
#undef HAVE_NASM
|
||||||
|
#undef HAVE_MPEG2DEC
|
||||||
|
|
||||||
#undef HAVE_ATOMIC_H
|
#undef HAVE_ATOMIC_H
|
||||||
|
|
||||||
|
|
10
configure.in
10
configure.in
|
@ -124,6 +124,8 @@ case "x${target_cpu}" in
|
||||||
AC_DEFINE(HAVE_CPU_ALPHA) ;;
|
AC_DEFINE(HAVE_CPU_ALPHA) ;;
|
||||||
xarm*) HAVE_CPU_ARM=yes ;
|
xarm*) HAVE_CPU_ARM=yes ;
|
||||||
AC_DEFINE(HAVE_CPU_ARM) ;;
|
AC_DEFINE(HAVE_CPU_ARM) ;;
|
||||||
|
xsparc*) HAVE_CPU_SPARC=yes ;
|
||||||
|
AC_DEFINE(HAVE_CPU_SPARC) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl Determine endianness
|
dnl Determine endianness
|
||||||
|
@ -358,6 +360,11 @@ AC_MSG_CHECKING(Shout library)
|
||||||
AC_CHECK_LIB(shout, shout_init_connection, HAVE_LIBSHOUT=yes, HAVE_LIBSHOUT=no, )
|
AC_CHECK_LIB(shout, shout_init_connection, HAVE_LIBSHOUT=yes, HAVE_LIBSHOUT=no, )
|
||||||
AC_CHECK_HEADER(shout/shout.h, :, HAVE_LIBSHOUT=no)
|
AC_CHECK_HEADER(shout/shout.h, :, HAVE_LIBSHOUT=no)
|
||||||
|
|
||||||
|
dnl Check for mpeg2dec
|
||||||
|
AC_MSG_CHECKING(mpeg2dec library)
|
||||||
|
AC_CHECK_LIB(mpeg2, mpeg2_init, HAVE_MPEG2DEC=yes, HAVE_MPEG2DEC=no, )
|
||||||
|
AC_CHECK_HEADER(mpeg2dec/mpeg2.h, :, HAVE_MPEG2DEC=no)
|
||||||
|
|
||||||
|
|
||||||
dnl check if css-auth.c exists (FIXME)
|
dnl check if css-auth.c exists (FIXME)
|
||||||
AC_MSG_CHECKING(DVD CSS code)
|
AC_MSG_CHECKING(DVD CSS code)
|
||||||
|
@ -564,6 +571,7 @@ AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
|
AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
|
AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
|
AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes")
|
||||||
|
AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes")
|
AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes")
|
||||||
|
@ -588,6 +596,7 @@ AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBSHOUT, test "x$HAVE_LIBSHOUT" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBSHOUT, test "x$HAVE_LIBSHOUT" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBASOUND, test "x$HAVE_LIBASOUND" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBASOUND, test "x$HAVE_LIBASOUND" = "xyes")
|
||||||
|
AM_CONDITIONAL(HAVE_MPEG2DEC, test "x$HAVE_MPEG2DEC" = "xyes")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -738,6 +747,7 @@ plugins/capture/v4l/Makefile
|
||||||
plugins/cdparanoia/Makefile
|
plugins/cdparanoia/Makefile
|
||||||
plugins/esd/Makefile
|
plugins/esd/Makefile
|
||||||
plugins/esd/esdsink/Makefile
|
plugins/esd/esdsink/Makefile
|
||||||
|
plugins/xmms/Makefile
|
||||||
gstplay/Makefile
|
gstplay/Makefile
|
||||||
dnl components/bonobo-gstmediaplay/Makefile
|
dnl components/bonobo-gstmediaplay/Makefile
|
||||||
test/Makefile
|
test/Makefile
|
||||||
|
|
|
@ -149,8 +149,6 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
gst_element_set_state (bin, GST_STATE_PLAYING);
|
gst_element_set_state (bin, GST_STATE_PLAYING);
|
||||||
|
|
||||||
playing = TRUE;
|
|
||||||
|
|
||||||
while (gst_bin_iterate(GST_BIN(bin)));
|
while (gst_bin_iterate(GST_BIN(bin)));
|
||||||
|
|
||||||
gst_element_set_state (bin, GST_STATE_NULL);
|
gst_element_set_state (bin, GST_STATE_NULL);
|
||||||
|
|
|
@ -28,7 +28,6 @@ int main(int argc,char *argv[])
|
||||||
pipeline = gst_pipeline_new("pipeline");
|
pipeline = gst_pipeline_new("pipeline");
|
||||||
g_assert(pipeline != NULL);
|
g_assert(pipeline != NULL);
|
||||||
|
|
||||||
gst_bin_add(GST_BIN(thread), pipeline);
|
|
||||||
|
|
||||||
/* create a disk reader */
|
/* create a disk reader */
|
||||||
disksrc = gst_elementfactory_make("disksrc", "disk_source");
|
disksrc = gst_elementfactory_make("disksrc", "disk_source");
|
||||||
|
@ -52,8 +51,11 @@ int main(int argc,char *argv[])
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* make it ready */
|
// hmmmm hack? FIXME
|
||||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_READY);
|
GST_FLAG_UNSET (pipeline, GST_BIN_FLAG_MANAGER);
|
||||||
|
|
||||||
|
gst_bin_add(GST_BIN(thread), pipeline);
|
||||||
|
|
||||||
/* start playing */
|
/* start playing */
|
||||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
|
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
for loc in "$@"; do
|
for loc in "$@"; do
|
||||||
gstreamer-launch disksrc "location=$loc" ! mp3parse ! mpg123 ! audiosink
|
../../tools/gstreamer-launch disksrc \""location=$loc"\" ! mp3parse ! mpg123 ! audiosink
|
||||||
done
|
done
|
||||||
|
|
|
@ -124,6 +124,7 @@ noinst_HEADERS = \
|
||||||
gstppc.h \
|
gstppc.h \
|
||||||
gstalpha.h \
|
gstalpha.h \
|
||||||
gstarm.h \
|
gstarm.h \
|
||||||
|
gstsparc.h \
|
||||||
gstpropsprivate.h
|
gstpropsprivate.h
|
||||||
|
|
||||||
CFLAGS = $(LIBGST_CFLAGS)
|
CFLAGS = $(LIBGST_CFLAGS)
|
||||||
|
|
|
@ -268,6 +268,9 @@ cothread_switch (cothread_state *thread)
|
||||||
ctx->current = thread->threadnum;
|
ctx->current = thread->threadnum;
|
||||||
|
|
||||||
/* save the current stack pointer, frame pointer, and pc */
|
/* save the current stack pointer, frame pointer, and pc */
|
||||||
|
#ifdef GST_ARCH_PRESETJMP
|
||||||
|
GST_ARCH_PRESETJMP();
|
||||||
|
#endif
|
||||||
enter = setjmp(current->jmp);
|
enter = setjmp(current->jmp);
|
||||||
if (enter != 0) {
|
if (enter != 0) {
|
||||||
GST_DEBUG (0,"enter thread #%d %d %p<->%p (%d)\n",current->threadnum, enter,
|
GST_DEBUG (0,"enter thread #%d %d %p<->%p (%d)\n",current->threadnum, enter,
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
#include "gstalpha.h"
|
#include "gstalpha.h"
|
||||||
#elif defined(HAVE_CPU_ARM)
|
#elif defined(HAVE_CPU_ARM)
|
||||||
#include "gstarm.h"
|
#include "gstarm.h"
|
||||||
|
#elif defined(HAVE_CPU_SPARC)
|
||||||
|
#include "gstsparc.h"
|
||||||
#else
|
#else
|
||||||
#error Need to know about this architecture, or have a generic implementation
|
#error Need to know about this architecture, or have a generic implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -818,14 +818,14 @@ gst_bin_iterate_func (GstBin *bin)
|
||||||
while (entries) {
|
while (entries) {
|
||||||
entry = GST_ELEMENT (entries->data);
|
entry = GST_ELEMENT (entries->data);
|
||||||
|
|
||||||
if (entry->threadstate)
|
if (entry->threadstate)
|
||||||
break;
|
break;
|
||||||
entries = g_list_next (entries);
|
entries = g_list_next (entries);
|
||||||
}
|
}
|
||||||
// if we couldn't find one, bail out
|
// if we couldn't find one, bail out
|
||||||
if (entries == NULL)
|
if (entries == NULL)
|
||||||
GST_ERROR(GST_ELEMENT(bin),"no cothreaded elements found!");
|
GST_ERROR(GST_ELEMENT(bin),"no cothreaded elements found!");
|
||||||
|
|
||||||
GST_FLAG_SET (entry, GST_ELEMENT_COTHREAD_STOPPING);
|
GST_FLAG_SET (entry, GST_ELEMENT_COTHREAD_STOPPING);
|
||||||
GST_DEBUG (0,"set COTHREAD_STOPPING flag on \"%s\"(@%p)\n",
|
GST_DEBUG (0,"set COTHREAD_STOPPING flag on \"%s\"(@%p)\n",
|
||||||
GST_ELEMENT_NAME (entry),entry);
|
GST_ELEMENT_NAME (entry),entry);
|
||||||
|
|
41
gst/gstcpu.c
41
gst/gstcpu.c
|
@ -48,31 +48,46 @@ static gchar *stringcat (gchar *a,gchar *b) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_gst_cpu_initialize (void)
|
_gst_cpu_initialize (void)
|
||||||
{
|
{
|
||||||
gchar *featurelist = NULL;
|
gchar *featurelist = NULL;
|
||||||
|
gboolean AMD;
|
||||||
|
|
||||||
long eax=0, ebx=0, ecx=0, edx=0;
|
long eax=0, ebx=0, ecx=0, edx=0;
|
||||||
|
|
||||||
|
gst_cpuid(0, &eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
|
AMD = (ebx == 0x68747541) && (ecx == 0x444d4163) && (edx == 0x69746e65);
|
||||||
|
|
||||||
gst_cpuid(1, &eax, &ebx, &ecx, &edx);
|
gst_cpuid(1, &eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
if (edx & (1<<23)) {
|
if (edx & (1<<23)) {
|
||||||
_gst_cpu_flags |= GST_CPU_FLAG_MMX;
|
_gst_cpu_flags |= GST_CPU_FLAG_MMX;
|
||||||
featurelist = stringcat(featurelist,"MMX ");
|
featurelist = stringcat(featurelist,"MMX ");
|
||||||
}
|
|
||||||
if (edx & (1<<25)) {
|
if (edx & (1<<25)) {
|
||||||
_gst_cpu_flags |= GST_CPU_FLAG_SSE;
|
_gst_cpu_flags |= GST_CPU_FLAG_SSE;
|
||||||
_gst_cpu_flags |= GST_CPU_FLAG_MMXEXT;
|
_gst_cpu_flags |= GST_CPU_FLAG_MMXEXT;
|
||||||
featurelist = stringcat(featurelist,"SSE ");
|
featurelist = stringcat(featurelist,"SSE ");
|
||||||
}
|
}
|
||||||
if (edx & (1<<24)) {
|
|
||||||
_gst_cpu_flags |= GST_CPU_FLAG_MMXEXT;
|
gst_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
|
||||||
featurelist = stringcat(featurelist,"MMXEXT ");
|
|
||||||
}
|
if (eax >= 0x80000001) {
|
||||||
if (edx & (1<<31)) {
|
|
||||||
_gst_cpu_flags |= GST_CPU_FLAG_3DNOW;
|
gst_cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
|
||||||
featurelist = stringcat(featurelist,"3DNOW ");
|
|
||||||
|
if (edx & (1<<31)) {
|
||||||
|
_gst_cpu_flags |= GST_CPU_FLAG_3DNOW;
|
||||||
|
featurelist = stringcat(featurelist,"3DNOW ");
|
||||||
|
}
|
||||||
|
if (AMD && (edx & (1<<22))) {
|
||||||
|
_gst_cpu_flags |= GST_CPU_FLAG_MMXEXT;
|
||||||
|
featurelist = stringcat(featurelist,"MMXEXT ");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_gst_cpu_flags) {
|
if (!_gst_cpu_flags) {
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "gstelement.h"
|
#include "gstelement.h"
|
||||||
#include "gstextratypes.h"
|
#include "gstextratypes.h"
|
||||||
#include "gstbin.h"
|
#include "gstbin.h"
|
||||||
|
#include "gstutils.h"
|
||||||
|
|
||||||
|
|
||||||
/* Element signals and args */
|
/* Element signals and args */
|
||||||
|
@ -974,78 +975,7 @@ gst_element_load_thyself (xmlNodePtr self, GstObject *parent)
|
||||||
}
|
}
|
||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
if (name && value) {
|
gst_util_set_object_arg (GTK_OBJECT (element), name, value);
|
||||||
GtkType type = GTK_OBJECT_TYPE (element);
|
|
||||||
GtkArgInfo *info;
|
|
||||||
gchar *result;
|
|
||||||
|
|
||||||
result = gtk_object_arg_get_info (type, name, &info);
|
|
||||||
|
|
||||||
if (result) {
|
|
||||||
g_print("gstelement: %s\n", result);
|
|
||||||
}
|
|
||||||
else if (info->arg_flags & GTK_ARG_WRITABLE) {
|
|
||||||
switch (info->type) {
|
|
||||||
case GTK_TYPE_STRING:
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, value, NULL);
|
|
||||||
break;
|
|
||||||
case GTK_TYPE_INT: {
|
|
||||||
gint i;
|
|
||||||
sscanf (value, "%d", &i);
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case GTK_TYPE_LONG: {
|
|
||||||
glong i;
|
|
||||||
sscanf (value, "%ld", &i);
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case GTK_TYPE_ULONG: {
|
|
||||||
gulong i;
|
|
||||||
sscanf (value, "%lu", &i);
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case GTK_TYPE_BOOL: {
|
|
||||||
gboolean i = FALSE;
|
|
||||||
if (!strcmp ("true", value)) i = TRUE;
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case GTK_TYPE_CHAR: {
|
|
||||||
gchar i;
|
|
||||||
sscanf (value, "%c", &i);
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case GTK_TYPE_UCHAR: {
|
|
||||||
guchar i;
|
|
||||||
sscanf (value, "%c", &i);
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case GTK_TYPE_FLOAT: {
|
|
||||||
gfloat i;
|
|
||||||
sscanf (value, "%f", &i);
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case GTK_TYPE_DOUBLE: {
|
|
||||||
gdouble i;
|
|
||||||
sscanf (value, "%g", (float *)&i);
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, i, NULL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
if (info->type == GST_TYPE_FILENAME) {
|
|
||||||
gtk_object_set (GTK_OBJECT (element), name, value, NULL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
children = children->next;
|
children = children->next;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1212,7 +1212,7 @@ gst_padtemplate_save_thyself (GstPadTemplate *templ, xmlNodePtr parent)
|
||||||
GstPadTemplate*
|
GstPadTemplate*
|
||||||
gst_padtemplate_load_thyself (xmlNodePtr parent)
|
gst_padtemplate_load_thyself (xmlNodePtr parent)
|
||||||
{
|
{
|
||||||
xmlNodePtr field = parent->childs;
|
xmlNodePtr field = parent->xmlChildrenNode;
|
||||||
GstPadTemplate *factory;
|
GstPadTemplate *factory;
|
||||||
gchar *name_template = NULL;
|
gchar *name_template = NULL;
|
||||||
GstPadDirection direction = GST_PAD_UNKNOWN;
|
GstPadDirection direction = GST_PAD_UNKNOWN;
|
||||||
|
|
101
gst/gstparse.c
101
gst/gstparse.c
|
@ -30,6 +30,7 @@
|
||||||
#include "gstparse.h"
|
#include "gstparse.h"
|
||||||
#include "gstpipeline.h"
|
#include "gstpipeline.h"
|
||||||
#include "gstthread.h"
|
#include "gstthread.h"
|
||||||
|
#include "gstutils.h"
|
||||||
|
|
||||||
typedef struct _gst_parse_priv gst_parse_priv;
|
typedef struct _gst_parse_priv gst_parse_priv;
|
||||||
struct _gst_parse_priv {
|
struct _gst_parse_priv {
|
||||||
|
@ -180,7 +181,8 @@ if (GST_IS_GHOST_PAD(srcpad)) GST_DEBUG(0,"it's a ghost pad\n");
|
||||||
argval = pos+1;
|
argval = pos+1;
|
||||||
DEBUG("attempting to set argument '%s' to '%s' on element '%s'\n",
|
DEBUG("attempting to set argument '%s' to '%s' on element '%s'\n",
|
||||||
argname,argval,GST_ELEMENT_NAME(previous));
|
argname,argval,GST_ELEMENT_NAME(previous));
|
||||||
gtk_object_set(GTK_OBJECT(previous),argname,argval,NULL);
|
//gtk_object_set(GTK_OBJECT(previous),argname,argval,NULL);
|
||||||
|
gst_util_set_object_arg (GTK_OBJECT(previous), argname, argval);
|
||||||
g_free(argname);
|
g_free(argname);
|
||||||
|
|
||||||
// element or argument, or beginning of bin or thread
|
// element or argument, or beginning of bin or thread
|
||||||
|
@ -321,8 +323,9 @@ gst_parse_launch(const gchar *cmdline,GstBin *parent)
|
||||||
gst_parse_priv priv;
|
gst_parse_priv priv;
|
||||||
gchar **argvn;
|
gchar **argvn;
|
||||||
gint newargc;
|
gint newargc;
|
||||||
gint len;
|
gint i;
|
||||||
int i,j,k;
|
const gchar *cp, *start, *end;
|
||||||
|
GSList *string_list = NULL, *slist;
|
||||||
|
|
||||||
priv.bincount = 0;
|
priv.bincount = 0;
|
||||||
priv.threadcount = 0;
|
priv.threadcount = 0;
|
||||||
|
@ -331,46 +334,64 @@ gst_parse_launch(const gchar *cmdline,GstBin *parent)
|
||||||
priv.verbose = FALSE;
|
priv.verbose = FALSE;
|
||||||
priv.debug = FALSE;
|
priv.debug = FALSE;
|
||||||
|
|
||||||
// first walk through quickly and see how many more slots we need
|
end = cmdline + strlen(cmdline);
|
||||||
len = strlen(cmdline);
|
newargc = 0;
|
||||||
newargc = 1;
|
|
||||||
for (i=0;i<len;i++) {
|
// Extract the arguments to a gslist in reverse order
|
||||||
// if it's a space, it denotes a new arg
|
for (cp = cmdline; cp < end; ) {
|
||||||
if (cmdline[i] == ' ') newargc++;
|
i = strcspn(cp, "([{}]) \"");
|
||||||
// if it's a brace and isn't followed by a space, give it an arg
|
|
||||||
if (strchr("([{}])",cmdline[i])) {
|
if (i > 0) {
|
||||||
// not followed by space, gets one
|
// normal argument - copy and add to the list
|
||||||
if (cmdline[i+1] != ' ') newargc++;
|
string_list = g_slist_prepend(string_list, g_strndup(cp, i));
|
||||||
|
newargc++;
|
||||||
|
cp += i;
|
||||||
|
}
|
||||||
|
|
||||||
|
// skip spaces
|
||||||
|
while (cp < end && *cp == ' ')
|
||||||
|
cp++;
|
||||||
|
|
||||||
|
// handle quoted arguments
|
||||||
|
if (*cp == '"') {
|
||||||
|
start = ++cp;
|
||||||
|
|
||||||
|
// find matching quote
|
||||||
|
while (cp < end && *cp != '"')
|
||||||
|
cp++;
|
||||||
|
|
||||||
|
// make sure we got it
|
||||||
|
if (cp == end) {
|
||||||
|
g_warning("gst_parse_launch: Unbalanced quote in command line");
|
||||||
|
// FIXME: The list leaks here
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// copy the string sans quotes
|
||||||
|
string_list = g_slist_prepend(string_list, g_strndup(start, cp - start));
|
||||||
|
newargc++;
|
||||||
|
cp += 2; // skip the quote aswell
|
||||||
|
}
|
||||||
|
|
||||||
|
// brackets exist in a separate argument slot
|
||||||
|
if (*cp && strchr("([{}])", *cp)) {
|
||||||
|
string_list = g_slist_prepend(string_list, g_strndup(cp, 1));
|
||||||
|
newargc++;
|
||||||
|
cp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// now allocate the new argv array
|
// now allocate the new argv array
|
||||||
argvn = g_new0(char *,newargc+1);
|
argvn = g_new0(char *,newargc);
|
||||||
GST_DEBUG(0,"supposed to have %d args\n",newargc);
|
GST_DEBUG(0,"got %d args\n",newargc);
|
||||||
|
|
||||||
// now attempt to construct the new arg list
|
// reverse the list and put the strings in the new array
|
||||||
j = 0;k = 0;
|
i = newargc;
|
||||||
for (i=0;i<len+1;i++) {
|
|
||||||
// if it's a delimiter
|
|
||||||
if (strchr("([{}]) ",cmdline[i]) || (cmdline[i] == '\0')) {
|
|
||||||
// extract the previous arg
|
|
||||||
if (i-k > 0) {
|
|
||||||
if (cmdline[k] == ' ') k++;
|
|
||||||
argvn[j] = g_new0(char,(i-k)+1);
|
|
||||||
memcpy(argvn[j],&cmdline[k],i-k);
|
|
||||||
|
|
||||||
// catch misparses
|
for (slist = string_list; slist; slist = slist->next)
|
||||||
if (strlen(argvn[j]) > 0) j++;
|
argvn[--i] = slist->data;
|
||||||
}
|
|
||||||
k = i;
|
|
||||||
|
|
||||||
// if this is a bracket, construct a word
|
g_slist_free(string_list);
|
||||||
if ((cmdline[i] != ' ') && (cmdline[i] != '\0')) {
|
|
||||||
argvn[j++] = g_strdup_printf("%c",cmdline[i]);
|
|
||||||
k++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// print them out
|
// print them out
|
||||||
for (i=0;i<newargc;i++) {
|
for (i=0;i<newargc;i++) {
|
||||||
|
@ -380,5 +401,11 @@ gst_parse_launch(const gchar *cmdline,GstBin *parent)
|
||||||
// set up the elementcounts hash
|
// set up the elementcounts hash
|
||||||
priv.elementcounts = g_hash_table_new(g_str_hash,g_str_equal);
|
priv.elementcounts = g_hash_table_new(g_str_hash,g_str_equal);
|
||||||
|
|
||||||
return gst_parse_launch_cmdline(newargc,argvn,parent,&priv);
|
// do it!
|
||||||
|
i = gst_parse_launch_cmdline(newargc,argvn,parent,&priv);
|
||||||
|
|
||||||
|
// GST_DEBUG(0, "Finished - freeing temporary argument array");
|
||||||
|
// g_strfreev(argvn);
|
||||||
|
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ _gst_plugin_initialize (void)
|
||||||
if (!doc || strcmp (doc->xmlRootNode->name, "GST-PluginRegistry") ||
|
if (!doc || strcmp (doc->xmlRootNode->name, "GST-PluginRegistry") ||
|
||||||
!plugin_times_older_than(get_time(GST_CONFIG_DIR"/reg.xml"))) {
|
!plugin_times_older_than(get_time(GST_CONFIG_DIR"/reg.xml"))) {
|
||||||
if (_gst_warn_old_registry)
|
if (_gst_warn_old_registry)
|
||||||
g_warning ("gstplugin: registry needs rebuild\n");
|
g_warning ("gstplugin: registry needs rebuild: run gstreamer-register\n");
|
||||||
gst_plugin_load_all ();
|
gst_plugin_load_all ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
42
gst/gstsparc.h
Normal file
42
gst/gstsparc.h
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/* GStreamer
|
||||||
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
|
* 2000 Wim Taymans <wtay@chello.be>
|
||||||
|
*
|
||||||
|
* gstsparc.h: Header for Sparc-specific architecture issues
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GST_GSTSPARC_H__
|
||||||
|
#define __GST_GSTSPARC_H__
|
||||||
|
|
||||||
|
#define GST_ARCH_SET_SP(stackpointer) \
|
||||||
|
__asm__( "ta 3\n\t"
|
||||||
|
"mov %0, %%sp" : : "r"(stackpointer));
|
||||||
|
|
||||||
|
#define GST_ARCH_CALL(target) \
|
||||||
|
__asm__( "call %0,0\n\t"
|
||||||
|
"nop" : : "r"(target) );
|
||||||
|
|
||||||
|
#define GST_ARCH_PRESETJMP() \
|
||||||
|
__asm__( "ta 3" );
|
||||||
|
|
||||||
|
// Need to get more information about the stackframe format
|
||||||
|
// and get the fields more correct. Check GDB sources maybe?
|
||||||
|
|
||||||
|
#define GST_ARCH_SETUP_STACK(sp) sp -= 4
|
||||||
|
|
||||||
|
#endif /* __GST_GSTSPARC_H__ */
|
|
@ -20,6 +20,9 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "gstextratypes.h"
|
||||||
|
|
||||||
#include "gstutils.h"
|
#include "gstutils.h"
|
||||||
|
|
||||||
|
@ -183,3 +186,78 @@ void gst_util_dump_mem(guchar *mem, guint size) {
|
||||||
}
|
}
|
||||||
g_print("\n");
|
g_print("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gst_util_set_object_arg (GtkObject *object, guchar *name, gchar *value)
|
||||||
|
{
|
||||||
|
if (name && value) {
|
||||||
|
GtkType type = GTK_OBJECT_TYPE (object);
|
||||||
|
GtkArgInfo *info;
|
||||||
|
gchar *result;
|
||||||
|
|
||||||
|
result = gtk_object_arg_get_info (type, name, &info);
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
g_print("gstutil: %s\n", result);
|
||||||
|
}
|
||||||
|
else if (info->arg_flags & GTK_ARG_WRITABLE) {
|
||||||
|
switch (info->type) {
|
||||||
|
case GTK_TYPE_STRING:
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, value, NULL);
|
||||||
|
break;
|
||||||
|
case GTK_TYPE_INT: {
|
||||||
|
gint i;
|
||||||
|
sscanf (value, "%d", &i);
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GTK_TYPE_LONG: {
|
||||||
|
glong i;
|
||||||
|
sscanf (value, "%ld", &i);
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GTK_TYPE_ULONG: {
|
||||||
|
gulong i;
|
||||||
|
sscanf (value, "%lu", &i);
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GTK_TYPE_BOOL: {
|
||||||
|
gboolean i = FALSE;
|
||||||
|
if (!strcmp ("true", value)) i = TRUE;
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GTK_TYPE_CHAR: {
|
||||||
|
gchar i;
|
||||||
|
sscanf (value, "%c", &i);
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GTK_TYPE_UCHAR: {
|
||||||
|
guchar i;
|
||||||
|
sscanf (value, "%c", &i);
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GTK_TYPE_FLOAT: {
|
||||||
|
gfloat i;
|
||||||
|
sscanf (value, "%f", &i);
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GTK_TYPE_DOUBLE: {
|
||||||
|
gdouble i;
|
||||||
|
sscanf (value, "%g", (float *)&i);
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
if (info->type == GST_TYPE_FILENAME) {
|
||||||
|
gtk_object_set (GTK_OBJECT (object), name, value, NULL);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -39,6 +39,8 @@ guchar* gst_util_get_string_arg (GtkObject *object, guchar *argname);
|
||||||
gpointer gst_util_get_pointer_arg (GtkObject *object, guchar *argname);
|
gpointer gst_util_get_pointer_arg (GtkObject *object, guchar *argname);
|
||||||
GtkWidget* gst_util_get_widget_arg (GtkObject *object, guchar *argname);
|
GtkWidget* gst_util_get_widget_arg (GtkObject *object, guchar *argname);
|
||||||
|
|
||||||
|
void gst_util_set_object_arg (GtkObject *object, guchar *name, gchar *value);
|
||||||
|
|
||||||
void gst_util_dump_mem (guchar *mem, guint size);
|
void gst_util_dump_mem (guchar *mem, guint size);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -31,5 +31,7 @@ noinst_HEADERS = \
|
||||||
gstplayprivate.h
|
gstplayprivate.h
|
||||||
|
|
||||||
|
|
||||||
|
libgstmediaplay_la_LDFLAGS = -rdynamic
|
||||||
|
|
||||||
gstmediaplay_CFLAGS = $(LIBGLADE_GNOME_CFLAGS)
|
gstmediaplay_CFLAGS = $(LIBGLADE_GNOME_CFLAGS)
|
||||||
gstmediaplay_LDADD = $(GST_LIBS) $(LIBGLADE_GNOME_LIBS) libgstmediaplay.la
|
gstmediaplay_LDADD = $(GST_LIBS) $(LIBGLADE_GNOME_LIBS) libgstmediaplay.la
|
||||||
|
|
188
gstreamer.m4
188
gstreamer.m4
|
@ -1,21 +1,179 @@
|
||||||
# a macro to get the libs/cflags for gscope
|
dnl Configure paths for GStreamer
|
||||||
# serial 1
|
dnl This was based upon the glib.m4 created by Owen Taylor 97-11-3
|
||||||
|
dnl Changes mostly involve replacing GLIB with GStreamer
|
||||||
|
dnl
|
||||||
|
dnl Written by Thomas Nyberg <thomas.nyberg@codefactory.se> 2001-03-01
|
||||||
|
|
||||||
dnl AM_PATH_GSTREAMER([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
dnl AM_PATH_GSTREAMER([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
dnl Test to see if timestamp is installed, and define GSTREAMER_CFLAGS, LIBS
|
dnl Test for GStreamer, and define GSTREAMER_CFLAGS and GSTREAMER_LIBS
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN(AM_PATH_GSTREAMER,
|
AC_DEFUN(AM_PATH_GSTREAMER,
|
||||||
[dnl
|
[
|
||||||
dnl Get the cflags and libraries for the GtkScope widget
|
|
||||||
dnl
|
dnl
|
||||||
AC_ARG_WITH(gscope-prefix,
|
dnl Get command-line stuff
|
||||||
[ --with-gscope-prefix=PFX Prefix where GtkScope is installed],
|
dnl
|
||||||
GSTREAMER_PREFIX="$withval")
|
AC_ARG_WITH(gstreamer-prefix,[ --with-gstreamer-prefix=PFX Prefix where GStreamer is installed (optional)],
|
||||||
|
gstreamer_config_prefix="$withval", gstreamer_config_prefix="")
|
||||||
|
AC_ARG_WITH(gstreamer-exec-prefix,[ --with-gstreamer-exec-prefix=PFX Exec prefix where GStreamer is installed (optional)],
|
||||||
|
gstreamer_config_exec_prefix="$withval", gstreamer_config_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(gstreamer-test, [ --disable-gstreamer-test Do not try and run a test GStreamer-program],
|
||||||
|
, enable_gstreamer_test=yes)
|
||||||
|
|
||||||
AC_CHECK_LIB(gscope,gtk_scope_new,
|
if test "x$gstreamer_config_prefix" != "x"; then
|
||||||
AC_MSG_RESULT(yes),
|
gstreamer_config_args="$gstreamer_config_args --prefix=$gstreamer_config_prefix" ;
|
||||||
AC_MSG_RESULT(no),"$GSTREAMER_PREFIX $LIBS")
|
|
||||||
AC_SUBST(GSTREAMER_CFLAGS)
|
if test "x${GSTREAMER_CONFIG+set}" != "xset" ; then
|
||||||
AC_SUBST(GSTREAMER_LIBS)
|
GSTREAMER_CONFIG="$glib_config_prefix/bin/gstreamer-config"
|
||||||
AC_SUBST(HAVE_GSTREAMER)
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$gstreamer_config_exec_prefix" != "x"; then
|
||||||
|
gstreamer_config_args="$gstreamer_config_args --exec-prefix=$gstreamer_config_exec_prefix" ;
|
||||||
|
|
||||||
|
if test "x${GSTREAMER_CONFIG+set}" != "xset" ; then
|
||||||
|
GSTREAMER_CONFIG="$glib_config_exec_prefix/bin/gstreamer-config"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(GSTREAMER_CONFIG, gstreamer-config, no)
|
||||||
|
|
||||||
|
if test "x$1" == "x" ; then
|
||||||
|
min_gstreamer_version="0.0.1"
|
||||||
|
else
|
||||||
|
min_gstreamer_version="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Check to make sure version wanted is better than the existing version
|
||||||
|
dnl
|
||||||
|
AC_MSG_CHECKING(for GStreamer-version >= $min_gstreamer_version)
|
||||||
|
no_gstreamer=""
|
||||||
|
|
||||||
|
if test "x$GSTREAMER_CONFIG" = "xno" ; then
|
||||||
|
no_gstreamer=yes
|
||||||
|
else
|
||||||
|
GSTREAMER_CFLAGS=`$GSTREAMER_CONFIG $gstreamer_config_args --cflags`
|
||||||
|
GSTREAMER_LIBS=`$GSTREAMER_CONFIG $gstreamer_config_args --libs`
|
||||||
|
|
||||||
|
gstreamer_config_major_version=`$GSTREAMER_CONFIG $gstreamer_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
gstreamer_config_minor_version=`$GSTREAMER_CONFIG $gstreamer_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
gstreamer_config_micro_version=`$GSTREAMER_CONFIG $gstreamer_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
|
||||||
|
if test "x$enable_gstreamer_test" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $GSTREAMER_CFLAGS"
|
||||||
|
LIBS="$GSTREAMER_LIBS $LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Try and run a program linked with libs
|
||||||
|
dnl
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <gst/gst.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int major, minor, micro;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
system("touch conf.gstreamertest");
|
||||||
|
|
||||||
|
tmp_version = strdup("$min_gstreamer_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||||
|
printf("%s, bad version string\n", "$min_gstreamer_version");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($gstreamer_config_major_version > major) ||
|
||||||
|
(($gstreamer_config_major_version == major) && ($gstreamer_config_minor_version > minor)) ||
|
||||||
|
(($gstreamer_config_major_version == major) && ($gstreamer_config_minor_version == minor) &&
|
||||||
|
($gstreamer_config_micro_version >= micro))) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
printf("\n*** An old version of GStreamer(%d.%d.%d) was found.\n",
|
||||||
|
$gstreamer_config_major_version, $gstreamer_config_minor_version,
|
||||||
|
$gstreamer_config_micro_version);
|
||||||
|
|
||||||
|
printf("*** You need a version of GStreamer newer than %d.%d.%d.\n", major, minor, micro);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
],, no_gstreamer=yes, [echo $ac_n "cross compiling; assuming OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_gstreamer" = "x" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
dnl
|
||||||
|
dnl Something went wrong, looks like GStreamer was not found
|
||||||
|
dnl
|
||||||
|
if test "$GSTREAMER_CONFIG" = "no" ; then
|
||||||
|
echo "*** The gstreamer-config script installed by GStreamer could not be found"
|
||||||
|
echo "*** If GStreamer was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the GSTREAMER_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to gstreamer-config."
|
||||||
|
else
|
||||||
|
if test -f conf.gstreamertest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run GStreamer test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $GSTREAMER_CFLAGS"
|
||||||
|
LIBS="$LIBS $GSTREAMER_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <gst/gst.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
],
|
||||||
|
[
|
||||||
|
gst_init(NULL, NULL);
|
||||||
|
return 0;
|
||||||
|
],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding GStreamer or finding the wrong"
|
||||||
|
echo "*** version of GStreamer. If it is not finding GStreamer, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means GStreamer was incorrectly installed"
|
||||||
|
echo "*** or that you have moved GStreamer since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the gstremaer-config script: $GSTREAMER_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
GSTREAMER_CFLAGS=""
|
||||||
|
GSTREAMER_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Define our flags and libs
|
||||||
|
dnl
|
||||||
|
AC_SUBST(GSTREAMER_CFLAGS)
|
||||||
|
AC_SUBST(GSTREAMER_LIBS)
|
||||||
|
rm -f conf.gstreamertest
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
1
test/.gitignore
vendored
1
test/.gitignore
vendored
|
@ -27,6 +27,7 @@ teardown
|
||||||
buffer
|
buffer
|
||||||
mp3parse
|
mp3parse
|
||||||
mpeg2parse
|
mpeg2parse
|
||||||
|
mpeg2parse2
|
||||||
mp3play
|
mp3play
|
||||||
ac3parse
|
ac3parse
|
||||||
ac3play
|
ac3play
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# FIXME FIXME
|
# FIXME FIXME
|
||||||
|
|
||||||
|
bin_PROGRAMS = xmmstest
|
||||||
noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \
|
noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \
|
||||||
mpeg2parse mp1parse mp3play ac3parse ac3play dvdcat fake cobin videotest \
|
mpeg2parse mp1parse mp3play ac3parse ac3play dvdcat fake cobin videotest \
|
||||||
aviparse vidcapture avi2mpg mp2tomp1 mp1tomp1 pipetest \
|
aviparse vidcapture avi2mpg mp2tomp1 mp1tomp1 pipetest \
|
||||||
vidcapture2 mp2toavi mp3tovorbis
|
vidcapture2 mp2toavi mp3tovorbis mpeg2parse2
|
||||||
|
|
||||||
SUBDIRS = xml bindings
|
SUBDIRS = xml bindings
|
||||||
|
|
||||||
|
|
122
test/mpeg2parse2.c
Normal file
122
test/mpeg2parse2.c
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
#include <gnome.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
GstElement *parse2, *queue;
|
||||||
|
GtkWidget *appwindow;
|
||||||
|
|
||||||
|
void eof(GstElement *src) {
|
||||||
|
g_print("have eos, quitting\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean idle_func(gpointer data) {
|
||||||
|
gst_bin_iterate(GST_BIN(data));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
||||||
|
|
||||||
|
g_print("***** a new pad %s was created\n", gst_pad_get_name(pad));
|
||||||
|
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PAUSED);
|
||||||
|
|
||||||
|
if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) {
|
||||||
|
|
||||||
|
gst_pad_connect(pad, gst_element_get_pad(queue,"sink"));
|
||||||
|
}
|
||||||
|
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc,char *argv[]) {
|
||||||
|
GstPipeline *pipeline;
|
||||||
|
GstElement *src, *parse;
|
||||||
|
GstElement *decode, *show, *thread;
|
||||||
|
|
||||||
|
g_print("have %d args\n",argc);
|
||||||
|
|
||||||
|
g_thread_init(NULL);
|
||||||
|
gtk_init(&argc,&argv);
|
||||||
|
gst_init(&argc,&argv);
|
||||||
|
gnome_init("MPEG2 Video player","0.0.1",argc,argv);
|
||||||
|
//gst_plugin_load("mpeg1parse");
|
||||||
|
|
||||||
|
pipeline = GST_PIPELINE(gst_pipeline_new("pipeline"));
|
||||||
|
g_return_val_if_fail(pipeline != NULL, -1);
|
||||||
|
thread = GST_ELEMENT(gst_thread_new("thread"));
|
||||||
|
g_return_val_if_fail(thread != NULL, -1);
|
||||||
|
|
||||||
|
if (strstr(argv[1],"video_ts")) {
|
||||||
|
src = gst_elementfactory_make("dvdsrc","src");
|
||||||
|
g_print("using DVD source\n");
|
||||||
|
} else
|
||||||
|
src = gst_elementfactory_make("disksrc","src");
|
||||||
|
|
||||||
|
g_return_val_if_fail(src != NULL, -1);
|
||||||
|
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||||
|
if (argc >= 3) {
|
||||||
|
gtk_object_set(GTK_OBJECT(src),"bytesperread",atoi(argv[2]),NULL);
|
||||||
|
g_print("block size is %d\n",atoi(argv[2]));
|
||||||
|
}
|
||||||
|
g_print("should be using file '%s'\n",argv[1]);
|
||||||
|
|
||||||
|
parse = gst_elementfactory_make("mpeg2parse","parse");
|
||||||
|
//parse = gst_elementfactory_make("mpeg1parse","parse");
|
||||||
|
g_return_val_if_fail(parse != NULL, -1);
|
||||||
|
|
||||||
|
queue = gst_elementfactory_make("queue","queue");
|
||||||
|
g_return_val_if_fail(queue != NULL, -1);
|
||||||
|
|
||||||
|
/****
|
||||||
|
* you can substitute mpeg2play with you own player here
|
||||||
|
* optionally you can remove the parse2 element. make
|
||||||
|
* sure to remove the pad connections too and don't add the
|
||||||
|
* mp2videoparse element to the bin.
|
||||||
|
**/
|
||||||
|
//parse2 = gst_elementfactory_make("mp2videoparse","parse");
|
||||||
|
//g_return_val_if_fail(parse2 != NULL, -1);
|
||||||
|
decode = gst_elementfactory_make("mpeg2dec","decode_video");
|
||||||
|
g_return_val_if_fail(decode != NULL, -1);
|
||||||
|
|
||||||
|
show = gst_elementfactory_make("videosink","show");
|
||||||
|
//gtk_object_set(GTK_OBJECT(show),"xv_enabled",FALSE,NULL);
|
||||||
|
g_return_val_if_fail(show != NULL, -1);
|
||||||
|
|
||||||
|
appwindow = gnome_app_new("MPEG player","MPEG player");
|
||||||
|
gnome_app_set_contents(GNOME_APP(appwindow),
|
||||||
|
gst_util_get_widget_arg(GTK_OBJECT(show),"widget"));
|
||||||
|
gtk_widget_show_all(appwindow);
|
||||||
|
|
||||||
|
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
|
||||||
|
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse));
|
||||||
|
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(queue));
|
||||||
|
|
||||||
|
//gst_bin_add(GST_BIN(thread),GST_ELEMENT(parse2));
|
||||||
|
gst_bin_add(GST_BIN(thread),GST_ELEMENT(decode));
|
||||||
|
gst_bin_add(GST_BIN(thread),GST_ELEMENT(show));
|
||||||
|
|
||||||
|
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(thread));
|
||||||
|
|
||||||
|
gtk_signal_connect(GTK_OBJECT(parse),"new_pad",mpeg2parse_newpad, pipeline);
|
||||||
|
|
||||||
|
gtk_signal_connect(GTK_OBJECT(src),"eos",GTK_SIGNAL_FUNC(eof),NULL);
|
||||||
|
|
||||||
|
gst_pad_connect(gst_element_get_pad(src,"src"),
|
||||||
|
gst_element_get_pad(parse,"sink"));
|
||||||
|
|
||||||
|
gst_pad_connect(gst_element_get_pad(queue,"src"),
|
||||||
|
// gst_element_get_pad(parse2,"sink"));
|
||||||
|
//gst_pad_connect(gst_element_get_pad(parse2,"src"),
|
||||||
|
gst_element_get_pad(decode,"sink"));
|
||||||
|
gst_pad_connect(gst_element_get_pad(decode,"src"),
|
||||||
|
gst_element_get_pad(show,"sink"));
|
||||||
|
|
||||||
|
g_print("setting to PLAYING state\n");
|
||||||
|
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
|
||||||
|
|
||||||
|
gtk_idle_add(idle_func,pipeline);
|
||||||
|
|
||||||
|
gdk_threads_enter();
|
||||||
|
gtk_main();
|
||||||
|
gdk_threads_leave();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -38,7 +38,7 @@ int main(int argc,char *argv[]) {
|
||||||
g_return_if_fail(videosinkfactory != NULL);
|
g_return_if_fail(videosinkfactory != NULL);
|
||||||
|
|
||||||
src = gst_elementfactory_create(srcfactory,"src");
|
src = gst_elementfactory_create(srcfactory,"src");
|
||||||
//gtk_object_set(GTK_OBJECT(src),"format",3,NULL);
|
gtk_object_set(GTK_OBJECT(src),"format",3,NULL);
|
||||||
gtk_object_set(GTK_OBJECT(src),"width",320,"height",240,NULL);
|
gtk_object_set(GTK_OBJECT(src),"width",320,"height",240,NULL);
|
||||||
|
|
||||||
videosink = gst_elementfactory_create(videosinkfactory,"videosink");
|
videosink = gst_elementfactory_create(videosinkfactory,"videosink");
|
||||||
|
@ -96,6 +96,8 @@ int main(int argc,char *argv[]) {
|
||||||
|
|
||||||
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING);
|
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING);
|
||||||
|
|
||||||
|
gtk_object_set(GTK_OBJECT(src),"bright",32000,"contrast", 32000,NULL);
|
||||||
|
|
||||||
//gtk_object_set(GTK_OBJECT(src),"tune",133250,NULL);
|
//gtk_object_set(GTK_OBJECT(src),"tune",133250,NULL);
|
||||||
g_idle_add(idle_func,bin);
|
g_idle_add(idle_func,bin);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
#include <gnome-xml/parser.h>
|
#include <gnome-xml/parser.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
// Include compatability defines: if libxml hasn't already defined these,
|
||||||
|
// we have an old version 1.x
|
||||||
|
#ifndef xmlChildrenNode
|
||||||
|
#define xmlChildrenNode childs
|
||||||
|
#define xmlRootNode root
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _GstRegistryPlugin GstRegistryPlugin;
|
typedef struct _GstRegistryPlugin GstRegistryPlugin;
|
||||||
typedef struct _GstRegistryElement GstRegistryElement;
|
typedef struct _GstRegistryElement GstRegistryElement;
|
||||||
|
|
||||||
|
@ -17,7 +24,7 @@ struct _GstRegistryElement {
|
||||||
};
|
};
|
||||||
|
|
||||||
gchar *getcontents(xmlDocPtr doc,xmlNodePtr cur) {
|
gchar *getcontents(xmlDocPtr doc,xmlNodePtr cur) {
|
||||||
return g_strdup(xmlNodeListGetString(doc,cur->childs,1));
|
return g_strdup(xmlNodeListGetString(doc,cur->xmlChildrenNode,1));
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc,char *argv[]) {
|
int main(int argc,char *argv[]) {
|
||||||
|
@ -51,10 +58,10 @@ int main(int argc,char *argv[]) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur = cur->childs; /* 'childs'??? He (Daniel) is Dutch, so... */
|
cur = cur->xmlChildrenNode;
|
||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
if (!strcmp(cur->name,"plugin")) {
|
if (!strcmp(cur->name,"plugin")) {
|
||||||
xmlNodePtr field = cur->childs;
|
xmlNodePtr field = cur->xmlChildrenNode;
|
||||||
GstRegistryPlugin *plugin = g_new0(GstRegistryPlugin,1);
|
GstRegistryPlugin *plugin = g_new0(GstRegistryPlugin,1);
|
||||||
|
|
||||||
while (field) {
|
while (field) {
|
||||||
|
@ -67,7 +74,7 @@ int main(int argc,char *argv[]) {
|
||||||
g_print("new plugin '%s' at '%s'\n",plugin->name,plugin->filename);
|
g_print("new plugin '%s' at '%s'\n",plugin->name,plugin->filename);
|
||||||
plugins = g_slist_prepend(plugins,plugin);
|
plugins = g_slist_prepend(plugins,plugin);
|
||||||
} else if (!strcmp(cur->name,"element")) {
|
} else if (!strcmp(cur->name,"element")) {
|
||||||
xmlNodePtr field = cur->childs;
|
xmlNodePtr field = cur->xmlChildrenNode;
|
||||||
GstRegistryElement *element = g_new0(GstRegistryElement,1);
|
GstRegistryElement *element = g_new0(GstRegistryElement,1);
|
||||||
|
|
||||||
while (field) {
|
while (field) {
|
||||||
|
|
61
test/xmmstest.c
Normal file
61
test/xmmstest.c
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
#include <gnome.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
extern gboolean _gst_plugin_spew;
|
||||||
|
|
||||||
|
gboolean idle_func(gpointer data);
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc,char *argv[])
|
||||||
|
{
|
||||||
|
GstElement *bin;
|
||||||
|
GstElement *src;
|
||||||
|
GstElement *effect;
|
||||||
|
GstElement *audiosink;
|
||||||
|
|
||||||
|
gst_init(&argc,&argv);
|
||||||
|
|
||||||
|
bin = gst_bin_new("bin");
|
||||||
|
|
||||||
|
src = gst_elementfactory_make("XMMS_INPUT_mpeg_layer_1/2/3_player_1.2.4", "xmms_plugin");
|
||||||
|
//src = gst_elementfactory_make("XMMS_INPUT_oggvorbis_player_0.1", "xmms_plugin");
|
||||||
|
//src = gst_elementfactory_make("XMMS_INPUT_mikmod_player_1.2.4", "xmms_plugin");
|
||||||
|
//src = gst_elementfactory_make("XMMS_INPUT_tone_generator_1.2.4", "xmms_plugin");
|
||||||
|
g_return_val_if_fail(src != NULL, -1);
|
||||||
|
|
||||||
|
//effect = gst_elementfactory_make("XMMS_EFFECT_voice_removal_plugin_1.2.4", "xmms_effect");
|
||||||
|
effect = gst_elementfactory_make("XMMS_EFFECT_extra_stereo_plugin_1.2.4", "xmms_effect");
|
||||||
|
//effect = gst_elementfactory_make("XMMS_EFFECT_echo_plugin_1.2.4", "xmms_effect");
|
||||||
|
g_return_val_if_fail(effect != NULL, -1);
|
||||||
|
|
||||||
|
gtk_object_set (GTK_OBJECT (src), "location", argv[1], NULL);
|
||||||
|
//gtk_object_set (GTK_OBJECT (src), "filename", "tone://1000", NULL);
|
||||||
|
|
||||||
|
audiosink = gst_elementfactory_make("audiosink", "audiosink");
|
||||||
|
g_return_val_if_fail(audiosink != NULL, -1);
|
||||||
|
|
||||||
|
gst_bin_add(GST_BIN(bin),GST_ELEMENT(src));
|
||||||
|
gst_bin_add(GST_BIN(bin),GST_ELEMENT(effect));
|
||||||
|
gst_bin_add(GST_BIN(bin),GST_ELEMENT(audiosink));
|
||||||
|
|
||||||
|
gst_pad_connect(gst_element_get_pad(src,"src"),
|
||||||
|
gst_element_get_pad(effect,"sink"));
|
||||||
|
gst_pad_connect(gst_element_get_pad(effect,"src"),
|
||||||
|
gst_element_get_pad(audiosink,"sink"));
|
||||||
|
|
||||||
|
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING);
|
||||||
|
|
||||||
|
g_idle_add(idle_func, bin);
|
||||||
|
|
||||||
|
gtk_main();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
idle_func (gpointer data)
|
||||||
|
{
|
||||||
|
gst_bin_iterate(GST_BIN(data));
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ main (int argc, char *argv[])
|
||||||
GstElement *element;
|
GstElement *element;
|
||||||
GstElement *sink1, *sink2;
|
GstElement *sink1, *sink2;
|
||||||
GstAutoplug *autoplug;
|
GstAutoplug *autoplug;
|
||||||
|
GstAutoplug *autoplug2;
|
||||||
|
|
||||||
gst_init(&argc,&argv);
|
gst_init(&argc,&argv);
|
||||||
|
|
||||||
|
@ -13,6 +14,7 @@ main (int argc, char *argv[])
|
||||||
sink2 = gst_elementfactory_make ("audiosink", "audiosink");
|
sink2 = gst_elementfactory_make ("audiosink", "audiosink");
|
||||||
|
|
||||||
autoplug = gst_autoplugfactory_make ("staticrender");
|
autoplug = gst_autoplugfactory_make ("staticrender");
|
||||||
|
autoplug2 = gst_autoplugfactory_make ("static");
|
||||||
|
|
||||||
element = gst_autoplug_to_renderers (autoplug,
|
element = gst_autoplug_to_renderers (autoplug,
|
||||||
g_list_append (NULL, gst_caps_new ("mp3caps", "audio/mp3")), sink2, NULL);
|
g_list_append (NULL, gst_caps_new ("mp3caps", "audio/mp3")), sink2, NULL);
|
||||||
|
@ -24,7 +26,7 @@ main (int argc, char *argv[])
|
||||||
xmlSaveFile ("autoplug3_2.gst", gst_xml_write (element));
|
xmlSaveFile ("autoplug3_2.gst", gst_xml_write (element));
|
||||||
}
|
}
|
||||||
|
|
||||||
element = gst_autoplug_to_caps (autoplug,
|
element = gst_autoplug_to_caps (autoplug2,
|
||||||
g_list_append (NULL, gst_caps_new_with_props(
|
g_list_append (NULL, gst_caps_new_with_props(
|
||||||
"testcaps3",
|
"testcaps3",
|
||||||
"video/mpeg",
|
"video/mpeg",
|
||||||
|
@ -38,7 +40,7 @@ main (int argc, char *argv[])
|
||||||
xmlSaveFile ("autoplug3_3.gst", gst_xml_write (element));
|
xmlSaveFile ("autoplug3_3.gst", gst_xml_write (element));
|
||||||
}
|
}
|
||||||
|
|
||||||
element = gst_autoplug_to_caps (autoplug,
|
element = gst_autoplug_to_caps (autoplug2,
|
||||||
g_list_append (NULL, gst_caps_new_with_props(
|
g_list_append (NULL, gst_caps_new_with_props(
|
||||||
"testcaps5",
|
"testcaps5",
|
||||||
"video/mpeg",
|
"video/mpeg",
|
||||||
|
@ -52,7 +54,7 @@ main (int argc, char *argv[])
|
||||||
xmlSaveFile ("autoplug3_4.gst", gst_xml_write (element));
|
xmlSaveFile ("autoplug3_4.gst", gst_xml_write (element));
|
||||||
}
|
}
|
||||||
|
|
||||||
element = gst_autoplug_to_caps (autoplug,
|
element = gst_autoplug_to_caps (autoplug2,
|
||||||
g_list_append (NULL, gst_caps_new(
|
g_list_append (NULL, gst_caps_new(
|
||||||
"testcaps7",
|
"testcaps7",
|
||||||
"video/avi")),
|
"video/avi")),
|
||||||
|
@ -63,7 +65,7 @@ main (int argc, char *argv[])
|
||||||
xmlSaveFile ("autoplug3_5.gst", gst_xml_write (element));
|
xmlSaveFile ("autoplug3_5.gst", gst_xml_write (element));
|
||||||
}
|
}
|
||||||
|
|
||||||
element = gst_autoplug_to_caps (autoplug,
|
element = gst_autoplug_to_caps (autoplug2,
|
||||||
g_list_append (NULL, gst_caps_new_with_props(
|
g_list_append (NULL, gst_caps_new_with_props(
|
||||||
"testcaps10",
|
"testcaps10",
|
||||||
"video/mpeg",
|
"video/mpeg",
|
||||||
|
|
|
@ -28,7 +28,6 @@ int main(int argc,char *argv[])
|
||||||
pipeline = gst_pipeline_new("pipeline");
|
pipeline = gst_pipeline_new("pipeline");
|
||||||
g_assert(pipeline != NULL);
|
g_assert(pipeline != NULL);
|
||||||
|
|
||||||
gst_bin_add(GST_BIN(thread), pipeline);
|
|
||||||
|
|
||||||
/* create a disk reader */
|
/* create a disk reader */
|
||||||
disksrc = gst_elementfactory_make("disksrc", "disk_source");
|
disksrc = gst_elementfactory_make("disksrc", "disk_source");
|
||||||
|
@ -52,8 +51,11 @@ int main(int argc,char *argv[])
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* make it ready */
|
// hmmmm hack? FIXME
|
||||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_READY);
|
GST_FLAG_UNSET (pipeline, GST_BIN_FLAG_MANAGER);
|
||||||
|
|
||||||
|
gst_bin_add(GST_BIN(thread), pipeline);
|
||||||
|
|
||||||
/* start playing */
|
/* start playing */
|
||||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
|
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
for loc in "$@"; do
|
for loc in "$@"; do
|
||||||
gstreamer-launch disksrc "location=$loc" ! mp3parse ! mpg123 ! audiosink
|
../../tools/gstreamer-launch disksrc \""location=$loc"\" ! mp3parse ! mpg123 ! audiosink
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue