mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
configure.ac: Put DEFAULT_AUDIOSINK in config.h and use whereever possible. (Fixes #165997)
Original commit message from CVS: * configure.ac: Put DEFAULT_AUDIOSINK in config.h and use whereever possible. (Fixes #165997) * examples/capsfilter/capsfilter1.c: (main): * examples/dynparams/filter.c: (create_ui): * examples/seeking/cdparanoia.c: (get_track_info), (main): * examples/seeking/chained.c: (main): * examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline), (make_vorbis_pipeline), (make_mp3_pipeline), (make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline): * examples/seeking/spider_seek.c: (make_spider_pipeline): * examples/switch/switcher.c: (main): * ext/dv/demo-play.c: (main): * ext/faad/gstfaad.c: (gst_faad_change_state): * ext/mad/gstmad.c: (gst_mad_chain): * ext/smoothwave/demo-osssrc.c: (main): * gst-libs/gst/gconf/gconf.c: (gst_gconf_set_string), (gst_gconf_render_bin_from_description), (gst_gconf_get_default_audio_sink), (gst_gconf_get_default_video_sink), (gst_gconf_get_default_audio_src), (gst_gconf_get_default_video_src), (gst_gconf_get_default_visualization_element): * gst/level/demo.c: (main): * gst/level/plot.c: (main): * gst/playback/gstplaybin.c: (gen_video_element), (gen_audio_element): * gst/playback/test.c: (gen_video_element), (gen_audio_element): * gst/playondemand/demo-mp3.c: (setup_pipeline): * gst/sine/demo-dparams.c: (main): * gst/spectrum/demo-osssrc.c: (main): * gst/speed/demo-mp3.c: (main): * gst/volume/demo.c: (main): * testsuite/embed/embed.c: (main):
This commit is contained in:
parent
6776bbd183
commit
59e2b0fcd5
11 changed files with 121 additions and 64 deletions
37
ChangeLog
37
ChangeLog
|
@ -1,3 +1,40 @@
|
||||||
|
2005-02-02 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* configure.ac: Put DEFAULT_AUDIOSINK in config.h and use
|
||||||
|
whereever possible. (Fixes #165997)
|
||||||
|
* examples/capsfilter/capsfilter1.c: (main):
|
||||||
|
* examples/dynparams/filter.c: (create_ui):
|
||||||
|
* examples/seeking/cdparanoia.c: (get_track_info), (main):
|
||||||
|
* examples/seeking/chained.c: (main):
|
||||||
|
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
|
||||||
|
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
|
||||||
|
(make_vorbis_pipeline), (make_mp3_pipeline), (make_avi_pipeline),
|
||||||
|
(make_mpeg_pipeline), (make_mpegnt_pipeline):
|
||||||
|
* examples/seeking/spider_seek.c: (make_spider_pipeline):
|
||||||
|
* examples/switch/switcher.c: (main):
|
||||||
|
* ext/dv/demo-play.c: (main):
|
||||||
|
* ext/faad/gstfaad.c: (gst_faad_change_state):
|
||||||
|
* ext/mad/gstmad.c: (gst_mad_chain):
|
||||||
|
* ext/smoothwave/demo-osssrc.c: (main):
|
||||||
|
* gst-libs/gst/gconf/gconf.c: (gst_gconf_set_string),
|
||||||
|
(gst_gconf_render_bin_from_description),
|
||||||
|
(gst_gconf_get_default_audio_sink),
|
||||||
|
(gst_gconf_get_default_video_sink),
|
||||||
|
(gst_gconf_get_default_audio_src),
|
||||||
|
(gst_gconf_get_default_video_src),
|
||||||
|
(gst_gconf_get_default_visualization_element):
|
||||||
|
* gst/level/demo.c: (main):
|
||||||
|
* gst/level/plot.c: (main):
|
||||||
|
* gst/playback/gstplaybin.c: (gen_video_element),
|
||||||
|
(gen_audio_element):
|
||||||
|
* gst/playback/test.c: (gen_video_element), (gen_audio_element):
|
||||||
|
* gst/playondemand/demo-mp3.c: (setup_pipeline):
|
||||||
|
* gst/sine/demo-dparams.c: (main):
|
||||||
|
* gst/spectrum/demo-osssrc.c: (main):
|
||||||
|
* gst/speed/demo-mp3.c: (main):
|
||||||
|
* gst/volume/demo.c: (main):
|
||||||
|
* testsuite/embed/embed.c: (main):
|
||||||
|
|
||||||
2005-02-02 Jan Schmidt <thaytan@mad.scientist.com>
|
2005-02-02 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_class_init),
|
* gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_class_init),
|
||||||
|
|
|
@ -119,10 +119,15 @@ case "$host" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_SUBST(DEFAULT_AUDIOSINK)
|
AC_SUBST(DEFAULT_AUDIOSINK)
|
||||||
|
AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK,"$DEFAULT_AUDIOSINK",[Default audio sink])
|
||||||
AC_SUBST(DEFAULT_AUDIOSRC)
|
AC_SUBST(DEFAULT_AUDIOSRC)
|
||||||
|
AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC,"$DEFAULT_AUDIOSRC",[Default audio source])
|
||||||
AC_SUBST(DEFAULT_VIDEOSINK)
|
AC_SUBST(DEFAULT_VIDEOSINK)
|
||||||
|
AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK,"$DEFAULT_VIDEOSINK",[Default video sink])
|
||||||
AC_SUBST(DEFAULT_VIDEOSRC)
|
AC_SUBST(DEFAULT_VIDEOSRC)
|
||||||
|
AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC,"$DEFAULT_VIDEOSRC",[Default video source])
|
||||||
AC_SUBST(DEFAULT_VISUALIZER)
|
AC_SUBST(DEFAULT_VISUALIZER)
|
||||||
|
AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER,"$DEFAULT_VISUALIZER",[Default visualizer])
|
||||||
|
|
||||||
dnl ############################################
|
dnl ############################################
|
||||||
dnl # Super Duper options for plug-in building #
|
dnl # Super Duper options for plug-in building #
|
||||||
|
@ -335,6 +340,7 @@ fi
|
||||||
AM_CONDITIONAL(HAVE_GDK_LOADERS, test "x$HAVE_GDK_LOADERS" = "xyes")
|
AM_CONDITIONAL(HAVE_GDK_LOADERS, test "x$HAVE_GDK_LOADERS" = "xyes")
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBOIL, liboil-0.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
|
PKG_CHECK_MODULES(LIBOIL, liboil-0.2, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
|
||||||
|
#PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= 0.3.0, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
|
||||||
AC_SUBST(LIBOIL_CFLAGS)
|
AC_SUBST(LIBOIL_CFLAGS)
|
||||||
AC_SUBST(LIBOIL_LIBS)
|
AC_SUBST(LIBOIL_LIBS)
|
||||||
if test "x${HAVE_LIBOIL}" = xyes ; then
|
if test "x${HAVE_LIBOIL}" = xyes ; then
|
||||||
|
|
|
@ -54,7 +54,7 @@ main (gint argc, gchar * argv[])
|
||||||
g_return_val_if_fail (mpeg2dec, -1);
|
g_return_val_if_fail (mpeg2dec, -1);
|
||||||
colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace");
|
colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace");
|
||||||
g_return_val_if_fail (colorspace, -1);
|
g_return_val_if_fail (colorspace, -1);
|
||||||
videosink = gst_element_factory_make ("ximagesink", "videosink");
|
videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "videosink");
|
||||||
g_return_val_if_fail (videosink, -1);
|
g_return_val_if_fail (videosink, -1);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), filesrc);
|
gst_bin_add (GST_BIN (pipeline), filesrc);
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
* you can also enter an input and output part of a pipeline
|
* you can also enter an input and output part of a pipeline
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
@ -481,7 +484,7 @@ create_ui (_filter_ui_t * fui, _filter_data_t * fd)
|
||||||
widget = gtk_label_new ("Output Pipe");
|
widget = gtk_label_new ("Output Pipe");
|
||||||
gtk_container_add (GTK_CONTAINER (vbox), widget);
|
gtk_container_add (GTK_CONTAINER (vbox), widget);
|
||||||
fui->output = gtk_entry_new ();
|
fui->output = gtk_entry_new ();
|
||||||
gtk_entry_set_text (GTK_ENTRY (fui->output), "osssink fragment=1572872"); /* fixme: gconf default ? */
|
gtk_entry_set_text (GTK_ENTRY (fui->output), DEFAULT_AUDIOSINK);
|
||||||
gtk_container_add (GTK_CONTAINER (vbox), fui->output);
|
gtk_container_add (GTK_CONTAINER (vbox), fui->output);
|
||||||
gtk_container_add (GTK_CONTAINER (fui->selection), vbox);
|
gtk_container_add (GTK_CONTAINER (fui->selection), vbox);
|
||||||
g_signal_connect (G_OBJECT (fui->output), "activate",
|
g_signal_connect (G_OBJECT (fui->output), "activate",
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -132,7 +135,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
GstElement *cdparanoia;
|
GstElement *cdparanoia;
|
||||||
GstElement *osssink;
|
GstElement *audiosink;
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
GstFormat track_format;
|
GstFormat track_format;
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
@ -147,13 +150,13 @@ main (int argc, char **argv)
|
||||||
g_assert (cdparanoia);
|
g_assert (cdparanoia);
|
||||||
g_object_set (G_OBJECT (cdparanoia), "paranoia_mode", 0, NULL);
|
g_object_set (G_OBJECT (cdparanoia), "paranoia_mode", 0, NULL);
|
||||||
|
|
||||||
osssink = gst_element_factory_make ("osssink", "osssink");
|
audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, DEFAULT_AUDIOSINK);
|
||||||
g_assert (osssink);
|
g_assert (audiosink);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), cdparanoia);
|
gst_bin_add (GST_BIN (pipeline), cdparanoia);
|
||||||
gst_bin_add (GST_BIN (pipeline), osssink);
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
||||||
|
|
||||||
gst_element_link_pads (cdparanoia, "src", osssink, "sink");
|
gst_element_link_pads (cdparanoia, "src", audiosink, "sink");
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (pipeline), "deep_notify",
|
g_signal_connect (G_OBJECT (pipeline), "deep_notify",
|
||||||
G_CALLBACK (gst_element_default_deep_notify), NULL);
|
G_CALLBACK (gst_element_default_deep_notify), NULL);
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -44,7 +47,7 @@ main (int argc, char **argv)
|
||||||
GstElement *oggdemux;
|
GstElement *oggdemux;
|
||||||
GstElement *vorbisdec;
|
GstElement *vorbisdec;
|
||||||
GstElement *audioconvert;
|
GstElement *audioconvert;
|
||||||
GstElement *osssink;
|
GstElement *audiosink;
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -75,14 +78,14 @@ main (int argc, char **argv)
|
||||||
g_assert (vorbisdec);
|
g_assert (vorbisdec);
|
||||||
audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
|
audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
|
||||||
g_assert (audioconvert);
|
g_assert (audioconvert);
|
||||||
osssink = gst_element_factory_make ("osssink", "osssink");
|
audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, DEFAULT_AUDIOSINK);
|
||||||
g_assert (osssink);
|
g_assert (audiosink);
|
||||||
gst_bin_add (GST_BIN (bin), vorbisdec);
|
gst_bin_add (GST_BIN (bin), vorbisdec);
|
||||||
gst_bin_add (GST_BIN (bin), audioconvert);
|
gst_bin_add (GST_BIN (bin), audioconvert);
|
||||||
gst_bin_add (GST_BIN (bin), osssink);
|
gst_bin_add (GST_BIN (bin), audiosink);
|
||||||
|
|
||||||
gst_element_link_pads (vorbisdec, "src", audioconvert, "sink");
|
gst_element_link_pads (vorbisdec, "src", audioconvert, "sink");
|
||||||
gst_element_link_pads (audioconvert, "src", osssink, "sink");
|
gst_element_link_pads (audioconvert, "src", audiosink, "sink");
|
||||||
|
|
||||||
gst_element_add_ghost_pad (bin, gst_element_get_pad (vorbisdec, "sink"),
|
gst_element_add_ghost_pad (bin, gst_element_get_pad (vorbisdec, "sink"),
|
||||||
"sink");
|
"sink");
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
@ -88,7 +91,7 @@ make_mod_pipeline (const gchar * location)
|
||||||
|
|
||||||
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
||||||
decoder = gst_element_factory_make_or_warn ("modplug", "decoder");
|
decoder = gst_element_factory_make_or_warn ("modplug", "decoder");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
|
@ -119,8 +122,8 @@ make_dv_pipeline (const gchar * location)
|
||||||
|
|
||||||
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
||||||
decoder = gst_element_factory_make_or_warn ("dvdec", "decoder");
|
decoder = gst_element_factory_make_or_warn ("dvdec", "decoder");
|
||||||
videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink");
|
videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
|
@ -156,7 +159,7 @@ make_wav_pipeline (const gchar * location)
|
||||||
|
|
||||||
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
||||||
decoder = gst_element_factory_make_or_warn ("wavparse", "decoder");
|
decoder = gst_element_factory_make_or_warn ("wavparse", "decoder");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
|
@ -187,7 +190,7 @@ make_flac_pipeline (const gchar * location)
|
||||||
|
|
||||||
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
||||||
decoder = gst_element_factory_make_or_warn ("flacdec", "decoder");
|
decoder = gst_element_factory_make_or_warn ("flacdec", "decoder");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink");
|
||||||
g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
|
@ -218,7 +221,7 @@ make_sid_pipeline (const gchar * location)
|
||||||
|
|
||||||
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
||||||
decoder = gst_element_factory_make_or_warn ("siddec", "decoder");
|
decoder = gst_element_factory_make_or_warn ("siddec", "decoder");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
|
@ -281,7 +284,7 @@ make_vorbis_pipeline (const gchar * location)
|
||||||
|
|
||||||
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
||||||
decoder = gst_element_factory_make_or_warn ("vorbisfile", "decoder");
|
decoder = gst_element_factory_make_or_warn ("vorbisfile", "decoder");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink");
|
||||||
g_object_set (G_OBJECT (audiosink), "sync", TRUE, NULL);
|
g_object_set (G_OBJECT (audiosink), "sync", TRUE, NULL);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
|
@ -305,7 +308,7 @@ static GstElement *
|
||||||
make_mp3_pipeline (const gchar * location)
|
make_mp3_pipeline (const gchar * location)
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
GstElement *src, *decoder, *osssink, *queue, *audio_thread;
|
GstElement *src, *decoder, *audiosink, *queue, *audio_thread;
|
||||||
GstPad *seekable;
|
GstPad *seekable;
|
||||||
|
|
||||||
pipeline = gst_pipeline_new ("app");
|
pipeline = gst_pipeline_new ("app");
|
||||||
|
@ -313,24 +316,24 @@ make_mp3_pipeline (const gchar * location)
|
||||||
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
||||||
decoder = gst_element_factory_make_or_warn ("mad", "dec");
|
decoder = gst_element_factory_make_or_warn ("mad", "dec");
|
||||||
queue = gst_element_factory_make_or_warn ("queue", "queue");
|
queue = gst_element_factory_make_or_warn ("queue", "queue");
|
||||||
osssink = gst_element_factory_make_or_warn ("osssink", "sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "sink");
|
||||||
|
|
||||||
audio_thread = gst_thread_new ("a_decoder_thread");
|
audio_thread = gst_thread_new ("a_decoder_thread");
|
||||||
|
|
||||||
seekable_elements = g_list_prepend (seekable_elements, osssink);
|
seekable_elements = g_list_prepend (seekable_elements, audiosink);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
g_object_set (G_OBJECT (osssink), "fragment", 0x00180008, NULL);
|
g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), src);
|
gst_bin_add (GST_BIN (pipeline), src);
|
||||||
gst_bin_add (GST_BIN (pipeline), decoder);
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
||||||
gst_bin_add (GST_BIN (audio_thread), queue);
|
gst_bin_add (GST_BIN (audio_thread), queue);
|
||||||
gst_bin_add (GST_BIN (audio_thread), osssink);
|
gst_bin_add (GST_BIN (audio_thread), audiosink);
|
||||||
gst_bin_add (GST_BIN (pipeline), audio_thread);
|
gst_bin_add (GST_BIN (pipeline), audio_thread);
|
||||||
|
|
||||||
gst_element_link (src, decoder);
|
gst_element_link (src, decoder);
|
||||||
gst_element_link (decoder, queue);
|
gst_element_link (decoder, queue);
|
||||||
gst_element_link (queue, osssink);
|
gst_element_link (queue, audiosink);
|
||||||
|
|
||||||
seekable = gst_element_get_pad (queue, "src");
|
seekable = gst_element_get_pad (queue, "src");
|
||||||
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
||||||
|
@ -364,7 +367,7 @@ make_avi_pipeline (const gchar * location)
|
||||||
audio_bin = gst_bin_new ("a_decoder_bin");
|
audio_bin = gst_bin_new ("a_decoder_bin");
|
||||||
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
||||||
audio_thread = gst_thread_new ("a_decoder_thread");
|
audio_thread = gst_thread_new ("a_decoder_thread");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
||||||
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
||||||
gst_element_link (a_decoder, a_queue);
|
gst_element_link (a_decoder, a_queue);
|
||||||
|
@ -389,7 +392,7 @@ make_avi_pipeline (const gchar * location)
|
||||||
//v_decoder = gst_element_factory_make_or_warn ("windec", "v_dec");
|
//v_decoder = gst_element_factory_make_or_warn ("windec", "v_dec");
|
||||||
v_decoder = gst_element_factory_make_or_warn ("ffmpegdecall", "v_dec");
|
v_decoder = gst_element_factory_make_or_warn ("ffmpegdecall", "v_dec");
|
||||||
video_thread = gst_thread_new ("v_decoder_thread");
|
video_thread = gst_thread_new ("v_decoder_thread");
|
||||||
videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink");
|
videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink");
|
||||||
//videosink = gst_element_factory_make_or_warn ("fakesink", "v_sink");
|
//videosink = gst_element_factory_make_or_warn ("fakesink", "v_sink");
|
||||||
//g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL);
|
//g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL);
|
||||||
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
||||||
|
@ -442,7 +445,7 @@ make_mpeg_pipeline (const gchar * location)
|
||||||
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
||||||
audio_thread = gst_thread_new ("a_decoder_thread");
|
audio_thread = gst_thread_new ("a_decoder_thread");
|
||||||
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink");
|
||||||
g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
||||||
gst_element_link (a_decoder, a_queue);
|
gst_element_link (a_decoder, a_queue);
|
||||||
gst_element_link (a_queue, audiosink);
|
gst_element_link (a_queue, audiosink);
|
||||||
|
@ -466,7 +469,7 @@ make_mpeg_pipeline (const gchar * location)
|
||||||
//g_object_set (G_OBJECT (video_thread), "priority", 2, NULL);
|
//g_object_set (G_OBJECT (video_thread), "priority", 2, NULL);
|
||||||
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
||||||
v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter");
|
v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter");
|
||||||
videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink");
|
videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink");
|
||||||
gst_element_link_many (v_decoder, v_queue, v_filter, NULL);
|
gst_element_link_many (v_decoder, v_queue, v_filter, NULL);
|
||||||
|
|
||||||
gst_element_link (v_filter, videosink);
|
gst_element_link (v_filter, videosink);
|
||||||
|
@ -512,7 +515,7 @@ make_mpegnt_pipeline (const gchar * location)
|
||||||
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
||||||
audio_thread = gst_thread_new ("a_decoder_thread");
|
audio_thread = gst_thread_new ("a_decoder_thread");
|
||||||
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
||||||
audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink");
|
audiosink = gst_element_factory_make_or_warn (DEFAULT_AUDIOSINK, "a_sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
||||||
g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
||||||
gst_element_link (a_decoder, a_queue);
|
gst_element_link (a_decoder, a_queue);
|
||||||
|
@ -534,7 +537,7 @@ make_mpegnt_pipeline (const gchar * location)
|
||||||
video_bin = gst_bin_new ("v_decoder_bin");
|
video_bin = gst_bin_new ("v_decoder_bin");
|
||||||
v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec");
|
v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec");
|
||||||
v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter");
|
v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter");
|
||||||
videosink = gst_element_factory_make_or_warn ("ximagesink", "v_sink");
|
videosink = gst_element_factory_make_or_warn (DEFAULT_VIDEOSINK, "v_sink");
|
||||||
gst_element_link_many (v_decoder, v_filter, videosink, NULL);
|
gst_element_link_many (v_decoder, v_filter, videosink, NULL);
|
||||||
|
|
||||||
gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL);
|
gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL);
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
@ -37,12 +40,12 @@ make_spider_pipeline (const gchar * location, gboolean thread)
|
||||||
decoder = gst_element_factory_make ("spider", "decoder");
|
decoder = gst_element_factory_make ("spider", "decoder");
|
||||||
a_thread = gst_thread_new ("a_thread");
|
a_thread = gst_thread_new ("a_thread");
|
||||||
a_queue = gst_element_factory_make ("queue", "a_queue");
|
a_queue = gst_element_factory_make ("queue", "a_queue");
|
||||||
audiosink = gst_element_factory_make ("osssink", "a_sink");
|
audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, "a_sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
||||||
|
|
||||||
v_thread = gst_thread_new ("v_thread");
|
v_thread = gst_thread_new ("v_thread");
|
||||||
v_queue = gst_element_factory_make ("queue", "v_queue");
|
v_queue = gst_element_factory_make ("queue", "v_queue");
|
||||||
videosink = gst_element_factory_make ("xvimagesink", "v_sink");
|
videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "v_sink");
|
||||||
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "location", location, NULL);
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
||||||
|
|
|
@ -77,7 +77,7 @@ main (int argc, char *argv[])
|
||||||
src2 = gst_element_factory_make ("videotestsrc", "src2");
|
src2 = gst_element_factory_make ("videotestsrc", "src2");
|
||||||
g_object_set (G_OBJECT (src2), "pattern", 1, NULL);
|
g_object_set (G_OBJECT (src2), "pattern", 1, NULL);
|
||||||
video_switch = gst_element_factory_make ("switch", "video_switch");
|
video_switch = gst_element_factory_make ("switch", "video_switch");
|
||||||
video_sink = gst_element_factory_make ("ximagesink", "video_sink");
|
video_sink = gst_element_factory_make (DEFAULT_VIDEOSINK, "video_sink");
|
||||||
|
|
||||||
gst_bin_add_many (GST_BIN (pipeline), src1, src2, video_switch,
|
gst_bin_add_many (GST_BIN (pipeline), src1, src2, video_switch,
|
||||||
video_sink, NULL);
|
video_sink, NULL);
|
||||||
|
|
|
@ -1441,8 +1441,9 @@ gst_mad_chain (GstPad * pad, GstData * _data)
|
||||||
&mad->total_samples);
|
&mad->total_samples);
|
||||||
mad->last_ts = GST_CLOCK_TIME_NONE;
|
mad->last_ts = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
time_offset = mad->total_samples * GST_SECOND / mad->rate;
|
time_offset =
|
||||||
time_duration = (nsamples * GST_SECOND / mad->rate);
|
mad->total_samples * GST_SECOND / mad->frame.header.samplerate;
|
||||||
|
time_duration = (nsamples * GST_SECOND / mad->frame.header.samplerate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mad->index) {
|
if (mad->index) {
|
||||||
|
|
|
@ -123,7 +123,7 @@ gst_gconf_set_string (const gchar * key, const gchar * value)
|
||||||
|
|
||||||
gconf_client_set_string (gst_gconf_get_client (), full_key, value, &error);
|
gconf_client_set_string (gst_gconf_get_client (), full_key, value, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_print ("gst_gconf_set_string: error: %s\n", error->message);
|
GST_ERROR ("gst_gconf_set_string: error: %s\n", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
g_free (full_key);
|
g_free (full_key);
|
||||||
|
@ -150,7 +150,7 @@ gst_gconf_render_bin_from_description (const gchar * description)
|
||||||
bin = GST_ELEMENT (gst_parse_launch (desc, &error));
|
bin = GST_ELEMENT (gst_parse_launch (desc, &error));
|
||||||
g_free (desc);
|
g_free (desc);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_print ("DEBUG: gstgconf: error parsing pipeline %s\n%s\n",
|
GST_ERROR ("gstgconf: error parsing pipeline %s\n%s\n",
|
||||||
description, error->message);
|
description, error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -191,7 +191,8 @@ gst_gconf_render_bin_from_key (const gchar * key)
|
||||||
* gst_gconf_get_default_audio_sink:
|
* gst_gconf_get_default_audio_sink:
|
||||||
*
|
*
|
||||||
* Render audio output bin from GStreamer GConf key : "default/audiosink".
|
* Render audio output bin from GStreamer GConf key : "default/audiosink".
|
||||||
* If key is invalid osssink is used as default output plugin.
|
* If key is invalid, the default audio sink for the platform is used
|
||||||
|
* (typically osssink or sunaudiosink).
|
||||||
*
|
*
|
||||||
* Returns: a #GstElement containing the audio output bin, or NULL if
|
* Returns: a #GstElement containing the audio output bin, or NULL if
|
||||||
* everything failed.
|
* everything failed.
|
||||||
|
@ -202,12 +203,11 @@ gst_gconf_get_default_audio_sink (void)
|
||||||
GstElement *ret = gst_gconf_render_bin_from_key ("default/audiosink");
|
GstElement *ret = gst_gconf_render_bin_from_key ("default/audiosink");
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ret = gst_element_factory_make ("osssink", NULL);
|
ret = gst_element_factory_make (DEFAULT_AUDIOSINK, NULL);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
g_warning ("No GConf default audio sink key and osssink doesn't work");
|
g_warning ("No GConf default audio sink key and %s doesn't work",
|
||||||
else
|
DEFAULT_AUDIOSINK);
|
||||||
g_print ("GConf audio sink not found, using osssink\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -217,7 +217,8 @@ gst_gconf_get_default_audio_sink (void)
|
||||||
* gst_gconf_get_default_video_sink:
|
* gst_gconf_get_default_video_sink:
|
||||||
*
|
*
|
||||||
* Render video output bin from GStreamer GConf key : "default/videosink".
|
* Render video output bin from GStreamer GConf key : "default/videosink".
|
||||||
* If key is invalid ximagesink is used as default output plugin.
|
* If key is invalid, the default video sink for the platform is used
|
||||||
|
* (typically xvimagesink or ximagesink).
|
||||||
*
|
*
|
||||||
* Returns: a #GstElement containing the video output bin, or NULL if
|
* Returns: a #GstElement containing the video output bin, or NULL if
|
||||||
* everything failed.
|
* everything failed.
|
||||||
|
@ -228,12 +229,11 @@ gst_gconf_get_default_video_sink (void)
|
||||||
GstElement *ret = gst_gconf_render_bin_from_key ("default/videosink");
|
GstElement *ret = gst_gconf_render_bin_from_key ("default/videosink");
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ret = gst_element_factory_make ("ximagesink", NULL);
|
ret = gst_element_factory_make (DEFAULT_VIDEOSINK, NULL);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
g_warning ("No GConf default video sink key and ximagesink doesn't work");
|
g_warning ("No GConf default video sink key and %s doesn't work",
|
||||||
else
|
DEFAULT_VIDEOSINK);
|
||||||
g_print ("GConf video sink not found, using ximagesink\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -243,7 +243,8 @@ gst_gconf_get_default_video_sink (void)
|
||||||
* gst_gconf_get_default_audio_src:
|
* gst_gconf_get_default_audio_src:
|
||||||
*
|
*
|
||||||
* Render audio acquisition bin from GStreamer GConf key : "default/audiosrc".
|
* Render audio acquisition bin from GStreamer GConf key : "default/audiosrc".
|
||||||
* If key is invalid osssrc is used as default source.
|
* If key is invalid, the default audio source for the plaform is used.
|
||||||
|
* (typically osssrc or sunaudiosrc).
|
||||||
*
|
*
|
||||||
* Returns: a #GstElement containing the audio source bin, or NULL if
|
* Returns: a #GstElement containing the audio source bin, or NULL if
|
||||||
* everything failed.
|
* everything failed.
|
||||||
|
@ -254,12 +255,11 @@ gst_gconf_get_default_audio_src (void)
|
||||||
GstElement *ret = gst_gconf_render_bin_from_key ("default/audiosrc");
|
GstElement *ret = gst_gconf_render_bin_from_key ("default/audiosrc");
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ret = gst_element_factory_make ("osssrc", NULL);
|
ret = gst_element_factory_make (DEFAULT_AUDIOSRC, NULL);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
g_warning ("No GConf default audio src key and osssrc doesn't work");
|
g_warning ("No GConf default audio src key and %s doesn't work",
|
||||||
else
|
DEFAULT_AUDIOSRC);
|
||||||
g_print ("GConf audio src not found, using osssrc\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -269,8 +269,8 @@ gst_gconf_get_default_audio_src (void)
|
||||||
* gst_gconf_get_default_video_src:
|
* gst_gconf_get_default_video_src:
|
||||||
*
|
*
|
||||||
* Render video acquisition bin from GStreamer GConf key :
|
* Render video acquisition bin from GStreamer GConf key :
|
||||||
* "default/videosrc". If key is invalid videotestsrc
|
* "default/videosrc". If key is invalid, the default video source
|
||||||
* is used as default source.
|
* for the platform is used (typically videotestsrc).
|
||||||
*
|
*
|
||||||
* Returns: a #GstElement containing the video source bin, or NULL if
|
* Returns: a #GstElement containing the video source bin, or NULL if
|
||||||
* everything failed.
|
* everything failed.
|
||||||
|
@ -281,12 +281,11 @@ gst_gconf_get_default_video_src (void)
|
||||||
GstElement *ret = gst_gconf_render_bin_from_key ("default/videosrc");
|
GstElement *ret = gst_gconf_render_bin_from_key ("default/videosrc");
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ret = gst_element_factory_make ("videotestsrc", NULL);
|
ret = gst_element_factory_make (DEFAULT_VIDEOSRC, NULL);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
g_warning ("No GConf default video src key and videotestrc doesn't work");
|
g_warning ("No GConf default video src key and %s doesn't work",
|
||||||
else
|
DEFAULT_VIDEOSRC);
|
||||||
g_print ("GConf video src not found, using videotestrc\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -296,7 +295,7 @@ gst_gconf_get_default_video_src (void)
|
||||||
* gst_gconf_get_default_visualization_element:
|
* gst_gconf_get_default_visualization_element:
|
||||||
*
|
*
|
||||||
* Render visualization bin from GStreamer GConf key : "default/visualization".
|
* Render visualization bin from GStreamer GConf key : "default/visualization".
|
||||||
* If key is invalid goom is used as default visualization element.
|
* If key is invalid, the default visualization element is used.
|
||||||
*
|
*
|
||||||
* Returns: a #GstElement containing the visualization bin, or NULL if
|
* Returns: a #GstElement containing the visualization bin, or NULL if
|
||||||
* everything failed.
|
* everything failed.
|
||||||
|
@ -307,13 +306,12 @@ gst_gconf_get_default_visualization_element (void)
|
||||||
GstElement *ret = gst_gconf_render_bin_from_key ("default/visualization");
|
GstElement *ret = gst_gconf_render_bin_from_key ("default/visualization");
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ret = gst_element_factory_make ("goom", NULL);
|
ret = gst_element_factory_make (DEFAULT_VISUALIZER, NULL);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
g_warning
|
g_warning
|
||||||
("No GConf default visualization plugin key and goom doesn't work");
|
("No GConf default visualization plugin key and %s doesn't work",
|
||||||
else
|
DEFAULT_VISUALIZER);
|
||||||
g_print ("GConf visualization plugin not found, using goom\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue