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):
2005-02-02 08:14:01 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2002-10-31 00:08:06 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2002-11-01 00:41:25 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
get_position_info (GstElement * cdparanoia)
|
2002-11-01 00:41:25 +00:00
|
|
|
{
|
|
|
|
GstFormat track_format;
|
|
|
|
const GstFormat *formats;
|
|
|
|
GstPad *pad;
|
|
|
|
|
|
|
|
track_format = gst_format_get_by_nick ("track");
|
|
|
|
g_assert (track_format != 0);
|
|
|
|
|
|
|
|
pad = gst_element_get_pad (cdparanoia, "src");
|
|
|
|
formats = gst_pad_get_formats (pad);
|
|
|
|
|
|
|
|
while (*formats) {
|
|
|
|
const GstFormatDefinition *definition;
|
|
|
|
GstFormat format;
|
|
|
|
gint64 position;
|
|
|
|
gboolean res;
|
|
|
|
|
|
|
|
definition = gst_format_get_details (*formats);
|
|
|
|
|
|
|
|
format = *formats;
|
2004-03-14 22:34:34 +00:00
|
|
|
res = gst_pad_query (pad, GST_QUERY_POSITION, &format, &position);
|
2002-11-01 00:41:25 +00:00
|
|
|
|
|
|
|
if (format == GST_FORMAT_TIME) {
|
|
|
|
position /= GST_SECOND;
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:27 +00:00
|
|
|
g_print ("%s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT,
|
|
|
|
definition->nick, position / 60, position % 60);
|
2004-03-14 22:34:34 +00:00
|
|
|
} else {
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:27 +00:00
|
|
|
g_print ("%s: %" G_GINT64_FORMAT, definition->nick, position);
|
2002-11-01 00:41:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
formats++;
|
|
|
|
if (*formats) {
|
|
|
|
g_print (", ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_print ("\r");
|
|
|
|
}
|
|
|
|
|
2002-10-31 00:08:06 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
get_track_info (GstElement * cdparanoia)
|
2002-10-31 00:08:06 +00:00
|
|
|
{
|
|
|
|
GstFormat track_format;
|
2002-11-01 00:41:25 +00:00
|
|
|
gint64 total_tracks = 0, total_time = 0;
|
2002-10-31 00:08:06 +00:00
|
|
|
GstPad *pad;
|
|
|
|
const GstFormat *formats;
|
|
|
|
gint i;
|
|
|
|
gint64 time_count = 0;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-10-31 00:08:06 +00:00
|
|
|
track_format = gst_format_get_by_nick ("track");
|
|
|
|
g_assert (track_format != 0);
|
|
|
|
|
|
|
|
pad = gst_element_get_pad (cdparanoia, "src");
|
|
|
|
formats = gst_pad_get_formats (pad);
|
|
|
|
|
|
|
|
/* we loop over all supported formats and report the total
|
|
|
|
* number of them */
|
|
|
|
while (*formats) {
|
|
|
|
const GstFormatDefinition *definition;
|
|
|
|
gint64 total;
|
2002-11-01 00:41:25 +00:00
|
|
|
GstFormat format;
|
2002-10-31 00:08:06 +00:00
|
|
|
gboolean res;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-10-31 00:08:06 +00:00
|
|
|
definition = gst_format_get_details (*formats);
|
|
|
|
|
2002-11-01 00:41:25 +00:00
|
|
|
format = *formats;
|
2004-03-14 22:34:34 +00:00
|
|
|
res = gst_pad_query (pad, GST_QUERY_TOTAL, &format, &total);
|
2002-10-31 00:08:06 +00:00
|
|
|
if (res) {
|
2002-11-01 00:41:25 +00:00
|
|
|
if (format == GST_FORMAT_TIME) {
|
2004-03-15 19:32:28 +00:00
|
|
|
total /= GST_SECOND;
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:27 +00:00
|
|
|
g_print ("%s total: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
|
|
|
|
definition->nick, total / 60, total % 60);
|
2004-03-14 22:34:34 +00:00
|
|
|
} else
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:27 +00:00
|
|
|
g_print ("%s total: %" G_GINT64_FORMAT "\n", definition->nick, total);
|
2002-10-31 00:08:06 +00:00
|
|
|
|
2002-11-01 00:41:25 +00:00
|
|
|
if (format == track_format)
|
2004-03-15 19:32:28 +00:00
|
|
|
total_tracks = total;
|
2002-11-01 00:41:25 +00:00
|
|
|
else if (format == GST_FORMAT_TIME)
|
2004-03-15 19:32:28 +00:00
|
|
|
total_time = total;
|
2004-03-14 22:34:34 +00:00
|
|
|
} else
|
2002-10-31 00:08:06 +00:00
|
|
|
g_print ("failed to get %s total\n", definition->nick);
|
|
|
|
|
|
|
|
formats++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* then we loop over all the tracks to get more info.
|
|
|
|
* since pad_convert always works from 0, the time from track 1 needs
|
|
|
|
* to be substracted from track 2 */
|
|
|
|
for (i = 0; i <= total_tracks; i++) {
|
|
|
|
gint64 time;
|
|
|
|
gboolean res;
|
|
|
|
|
|
|
|
if (i < total_tracks) {
|
|
|
|
GstFormat format;
|
|
|
|
|
|
|
|
format = GST_FORMAT_TIME;
|
2004-03-14 22:34:34 +00:00
|
|
|
res = gst_pad_convert (pad, track_format, i, &format, &time);
|
2002-11-01 00:41:25 +00:00
|
|
|
time /= GST_SECOND;
|
2004-03-14 22:34:34 +00:00
|
|
|
} else {
|
2002-10-31 00:08:06 +00:00
|
|
|
time = total_time;
|
|
|
|
res = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (res) {
|
2003-01-10 10:22:25 +00:00
|
|
|
/* for the first track (i==0) we wait until we have the
|
2002-10-31 00:08:06 +00:00
|
|
|
* time of the next track */
|
|
|
|
if (i > 0) {
|
2004-03-15 19:32:28 +00:00
|
|
|
gint64 length = time - time_count;
|
2002-10-31 00:08:06 +00:00
|
|
|
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:27 +00:00
|
|
|
g_print ("track %d: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT
|
|
|
|
" -> %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ", length: %"
|
|
|
|
G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
|
2004-03-15 19:32:28 +00:00
|
|
|
i - 1,
|
|
|
|
time_count / 60, time_count % 60,
|
|
|
|
time / 60, time % 60, length / 60, length % 60);
|
2002-10-31 00:08:06 +00:00
|
|
|
}
|
2004-03-14 22:34:34 +00:00
|
|
|
} else {
|
2002-10-31 00:08:06 +00:00
|
|
|
g_print ("could not get time for track %d\n", i);
|
|
|
|
}
|
|
|
|
|
|
|
|
time_count = time;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
GstElement *cdparanoia;
|
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):
2005-02-02 08:14:01 +00:00
|
|
|
GstElement *audiosink;
|
2002-10-31 00:08:06 +00:00
|
|
|
GstPad *pad;
|
|
|
|
GstFormat track_format;
|
|
|
|
GstEvent *event;
|
|
|
|
gint count;
|
2002-11-01 00:41:25 +00:00
|
|
|
gboolean res;
|
2003-01-10 10:22:25 +00:00
|
|
|
|
2002-10-31 00:08:06 +00:00
|
|
|
gst_init (&argc, &argv);
|
|
|
|
|
|
|
|
pipeline = gst_pipeline_new ("pipeline");
|
|
|
|
|
|
|
|
cdparanoia = gst_element_factory_make ("cdparanoia", "cdparanoia");
|
|
|
|
g_assert (cdparanoia);
|
|
|
|
g_object_set (G_OBJECT (cdparanoia), "paranoia_mode", 0, NULL);
|
|
|
|
|
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):
2005-02-02 08:14:01 +00:00
|
|
|
audiosink = gst_element_factory_make (DEFAULT_AUDIOSINK, DEFAULT_AUDIOSINK);
|
|
|
|
g_assert (audiosink);
|
2002-10-31 00:08:06 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), cdparanoia);
|
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):
2005-02-02 08:14:01 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
2002-10-31 00:08:06 +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):
2005-02-02 08:14:01 +00:00
|
|
|
gst_element_link_pads (cdparanoia, "src", audiosink, "sink");
|
2002-10-31 00:08:06 +00:00
|
|
|
|
2003-01-10 10:22:25 +00:00
|
|
|
g_signal_connect (G_OBJECT (pipeline), "deep_notify",
|
2005-03-31 09:43:49 +00:00
|
|
|
G_CALLBACK (gst_object_default_deep_notify), NULL);
|
2003-01-10 10:22:25 +00:00
|
|
|
|
2002-10-31 00:08:06 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
|
|
|
|
|
|
|
/* now we go into probe mode */
|
|
|
|
get_track_info (cdparanoia);
|
|
|
|
|
|
|
|
track_format = gst_format_get_by_nick ("track");
|
|
|
|
g_assert (track_format != 0);
|
|
|
|
|
|
|
|
pad = gst_element_get_pad (cdparanoia, "src");
|
|
|
|
g_assert (pad);
|
|
|
|
|
|
|
|
g_print ("playing from track 3\n");
|
|
|
|
/* seek to track3 */
|
|
|
|
event = gst_event_new_seek (track_format |
|
2004-03-14 22:34:34 +00:00
|
|
|
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, 3);
|
2002-10-31 00:08:06 +00:00
|
|
|
|
2002-11-01 00:41:25 +00:00
|
|
|
res = gst_pad_send_event (pad, event);
|
|
|
|
if (!res)
|
|
|
|
g_warning ("seek failed");
|
|
|
|
|
2002-10-31 00:08:06 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
|
|
|
|
count = 0;
|
2005-03-31 09:43:49 +00:00
|
|
|
while (count++ < 500) {
|
2002-11-01 00:41:25 +00:00
|
|
|
get_position_info (cdparanoia);
|
2005-03-31 09:43:49 +00:00
|
|
|
g_usleep (G_USEC_PER_SEC / 2);
|
2002-10-31 00:08:06 +00:00
|
|
|
}
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
|
|
|
|
2002-11-01 00:41:25 +00:00
|
|
|
g_print ("\nplaying from second 25 to second 29\n");
|
|
|
|
/* seek to some seconds */
|
|
|
|
event = gst_event_new_segment_seek (GST_FORMAT_TIME |
|
2004-03-14 22:34:34 +00:00
|
|
|
GST_SEEK_METHOD_SET |
|
|
|
|
GST_SEEK_FLAG_FLUSH, 25 * GST_SECOND, 29 * GST_SECOND);
|
2002-11-01 00:41:25 +00:00
|
|
|
res = gst_pad_send_event (pad, event);
|
|
|
|
if (!res)
|
|
|
|
g_warning ("seek failed");
|
|
|
|
|
2002-10-31 00:08:06 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
count = 0;
|
|
|
|
while (count++ < 500) {
|
2002-11-01 00:41:25 +00:00
|
|
|
get_position_info (cdparanoia);
|
2005-03-31 09:43:49 +00:00
|
|
|
g_usleep (G_USEC_PER_SEC / 2);
|
2002-10-31 00:08:06 +00:00
|
|
|
}
|
2002-11-01 00:41:25 +00:00
|
|
|
g_print ("\n");
|
2002-10-31 00:08:06 +00:00
|
|
|
|
|
|
|
/* shutdown everything again */
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|