tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
/* GStreamer
|
|
|
|
*
|
|
|
|
* seek.c: seeking sample application
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005 Wim Taymans <wim@fluendo.com>
|
|
|
|
* 2006 Stefan Kost <ensonic@users.sf.net>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2008-06-27 07:42:07 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2002-08-11 11:45:07 +00:00
|
|
|
#include <stdlib.h>
|
2009-05-27 14:37:38 +00:00
|
|
|
#include <math.h>
|
2002-05-28 20:30:11 +00:00
|
|
|
#include <glib.h>
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2008-06-27 07:42:07 +00:00
|
|
|
#ifdef HAVE_X
|
2008-06-24 16:05:06 +00:00
|
|
|
#include <gdk/gdkx.h>
|
2008-06-27 07:42:07 +00:00
|
|
|
#endif
|
2008-06-24 16:05:06 +00:00
|
|
|
#include <gst/interfaces/xoverlay.h>
|
|
|
|
|
2006-06-23 09:53:09 +00:00
|
|
|
GST_DEBUG_CATEGORY_STATIC (seek_debug);
|
2005-09-19 16:09:41 +00:00
|
|
|
#define GST_CAT_DEFAULT (seek_debug)
|
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
/* configuration */
|
|
|
|
|
|
|
|
//#define SOURCE "filesrc"
|
|
|
|
#define SOURCE "gnomevfssrc"
|
|
|
|
|
|
|
|
#define ASINK "alsasink"
|
|
|
|
//#define ASINK "osssink"
|
|
|
|
|
|
|
|
#define VSINK "xvimagesink"
|
|
|
|
//#define VSINK "sdlvideosink"
|
|
|
|
//#define VSINK "ximagesink"
|
|
|
|
//#define VSINK "aasink"
|
|
|
|
//#define VSINK "cacasink"
|
|
|
|
|
2008-04-09 21:42:24 +00:00
|
|
|
#define FILL_INTERVAL 100
|
2007-06-21 08:34:46 +00:00
|
|
|
//#define UPDATE_INTERVAL 500
|
|
|
|
//#define UPDATE_INTERVAL 100
|
|
|
|
#define UPDATE_INTERVAL 10
|
|
|
|
|
|
|
|
/* number of milliseconds to play for after a seek */
|
|
|
|
#define SCRUB_TIME 100
|
|
|
|
|
|
|
|
/* timeout for gst_element_get_state() after a seek */
|
|
|
|
#define SEEK_TIMEOUT 40 * GST_MSECOND
|
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
#define DEFAULT_VIDEO_HEIGHT 300
|
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
|
2002-06-06 20:26:52 +00:00
|
|
|
static GList *seekable_pads = NULL;
|
2002-05-28 20:30:11 +00:00
|
|
|
static GList *rate_pads = NULL;
|
2002-06-06 20:26:52 +00:00
|
|
|
static GList *seekable_elements = NULL;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2005-11-13 13:53:26 +00:00
|
|
|
static gboolean accurate_seek = FALSE;
|
|
|
|
static gboolean keyframe_seek = FALSE;
|
2005-11-16 10:54:45 +00:00
|
|
|
static gboolean loop_seek = FALSE;
|
2005-12-12 13:03:50 +00:00
|
|
|
static gboolean flush_seek = TRUE;
|
2006-08-24 11:18:56 +00:00
|
|
|
static gboolean scrub = TRUE;
|
|
|
|
static gboolean play_scrub = FALSE;
|
2008-12-11 10:28:43 +00:00
|
|
|
static gboolean skip_seek = FALSE;
|
2006-10-07 18:35:39 +00:00
|
|
|
static gdouble rate = 1.0;
|
2005-11-13 13:53:26 +00:00
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
static GstElement *pipeline;
|
2007-06-21 08:34:46 +00:00
|
|
|
static gint pipeline_type;
|
|
|
|
static const gchar *pipeline_spec;
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
static gint64 position = -1;
|
|
|
|
static gint64 duration = -1;
|
2002-05-28 20:30:11 +00:00
|
|
|
static GtkAdjustment *adjustment;
|
2008-04-03 16:10:53 +00:00
|
|
|
static GtkWidget *hscale, *statusbar;
|
|
|
|
static guint status_id = 0;
|
2002-06-11 19:20:52 +00:00
|
|
|
static gboolean stats = FALSE;
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
static gboolean elem_seek = FALSE;
|
|
|
|
static gboolean verbose = FALSE;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2008-04-03 16:10:53 +00:00
|
|
|
static gboolean is_live = FALSE;
|
|
|
|
static gboolean buffering = FALSE;
|
2008-04-11 01:25:01 +00:00
|
|
|
static GstBufferingMode mode;
|
|
|
|
static gint64 buffering_left;
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
static GstState state = GST_STATE_NULL;
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
static guint update_id = 0;
|
2005-03-31 09:43:49 +00:00
|
|
|
static guint seek_timeout_id = 0;
|
|
|
|
static gulong changed_id;
|
2008-04-09 21:42:24 +00:00
|
|
|
static guint fill_id = 0;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2008-02-08 18:17:51 +00:00
|
|
|
static gint n_video = 0, n_audio = 0, n_text = 0;
|
2008-02-18 11:54:15 +00:00
|
|
|
static gboolean need_streams = TRUE;
|
2008-02-27 12:19:31 +00:00
|
|
|
static GtkWidget *video_combo, *audio_combo, *text_combo, *vis_combo;
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
static GtkWidget *vis_checkbox, *video_checkbox, *audio_checkbox;
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
static GtkWidget *text_checkbox, *mute_checkbox, *volume_spinbutton;
|
2009-07-10 19:25:43 +00:00
|
|
|
static GtkWidget *skip_checkbox, *video_window, *download_checkbox;
|
2009-06-12 11:55:33 +00:00
|
|
|
static GtkWidget *rate_spinbutton;
|
|
|
|
|
|
|
|
static GStaticMutex state_mutex = G_STATIC_MUTEX_INIT;
|
2008-06-24 16:05:06 +00:00
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
static GtkWidget *format_combo, *step_amount_spinbutton, *step_rate_spinbutton;
|
2009-06-12 11:55:33 +00:00
|
|
|
static GtkWidget *shuttle_checkbox, *step_button;
|
|
|
|
static GtkWidget *shuttle_hscale;
|
|
|
|
static GtkAdjustment *shuttle_adjustment;
|
2009-06-01 09:31:49 +00:00
|
|
|
|
|
|
|
static GList *paths = NULL, *l = NULL;
|
2008-02-08 18:17:51 +00:00
|
|
|
|
2008-02-27 12:19:31 +00:00
|
|
|
/* we keep an array of the visualisation entries so that we can easily switch
|
|
|
|
* with the combo box index. */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GstElementFactory *factory;
|
|
|
|
} VisEntry;
|
|
|
|
|
|
|
|
static GArray *vis_entries;
|
|
|
|
|
2008-02-08 18:17:51 +00:00
|
|
|
static void clear_streams (GstElement * pipeline);
|
2009-05-27 14:37:38 +00:00
|
|
|
static void volume_notify_cb (GstElement * pipeline, GParamSpec * arg,
|
|
|
|
gpointer user_dat);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
/* pipeline construction */
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2004-03-14 22:34:34 +00:00
|
|
|
const gchar *padname;
|
|
|
|
GstPad *target;
|
|
|
|
GstElement *bin;
|
2004-03-15 19:32:28 +00:00
|
|
|
}
|
|
|
|
dyn_link;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2003-11-02 23:06:23 +00:00
|
|
|
static GstElement *
|
2004-03-14 22:34:34 +00:00
|
|
|
gst_element_factory_make_or_warn (gchar * type, gchar * name)
|
2003-11-02 23:06:23 +00:00
|
|
|
{
|
|
|
|
GstElement *element = gst_element_factory_make (type, name);
|
|
|
|
|
|
|
|
if (!element) {
|
2004-03-14 22:34:34 +00:00
|
|
|
g_warning ("Failed to create element %s of type %s", name, type);
|
2003-11-02 23:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return element;
|
|
|
|
}
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer data)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
gchar *padname;
|
2003-01-10 10:22:25 +00:00
|
|
|
dyn_link *connect = (dyn_link *) data;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
padname = gst_pad_get_name (newpad);
|
|
|
|
|
|
|
|
if (connect->padname == NULL || !strcmp (padname, connect->padname)) {
|
2005-03-31 09:43:49 +00:00
|
|
|
if (connect->bin)
|
|
|
|
gst_bin_add (GST_BIN (pipeline), connect->bin);
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_pad_link (newpad, connect->target);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
//seekable_pads = g_list_prepend (seekable_pads, newpad);
|
2002-05-28 20:30:11 +00:00
|
|
|
rate_pads = g_list_prepend (rate_pads, newpad);
|
|
|
|
}
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
g_free (padname);
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
setup_dynamic_link (GstElement * element, const gchar * padname,
|
|
|
|
GstPad * target, GstElement * bin)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
2003-01-10 10:22:25 +00:00
|
|
|
dyn_link *connect;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2003-01-10 10:22:25 +00:00
|
|
|
connect = g_new0 (dyn_link, 1);
|
2004-03-14 22:34:34 +00:00
|
|
|
connect->padname = g_strdup (padname);
|
|
|
|
connect->target = target;
|
|
|
|
connect->bin = bin;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/seek.c: Update seek example.
Original commit message from CVS:
* examples/seeking/seek.c: (setup_dynamic_link),
(make_dv_pipeline), (make_vorbis_theora_pipeline), (query_rates),
(query_positions_elems), (query_positions_pads), (do_seek):
Update seek example.
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_event),
(gst_ogg_pad_typefind), (gst_ogg_demux_chain_elem_pad),
(gst_ogg_demux_queue_data), (gst_ogg_demux_chain_peer),
(gst_ogg_pad_submit_packet), (gst_ogg_pad_submit_page),
(gst_ogg_demux_handle_event),
(gst_ogg_demux_deactivate_current_chain),
(gst_ogg_demux_activate_chain), (gst_ogg_demux_perform_seek),
(gst_ogg_demux_collect_chain_info), (gst_ogg_demux_collect_info),
(gst_ogg_demux_chain), (gst_ogg_demux_send_event),
(gst_ogg_demux_loop):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_collected):
* ext/theora/theoradec.c: (theora_dec_src_event),
(theora_dec_src_getcaps), (theora_dec_sink_event),
(theora_dec_push), (theora_dec_chain):
* ext/vorbis/Makefile.am:
* ext/vorbis/vorbisdec.c: (vorbis_dec_src_event),
(vorbis_dec_sink_event), (vorbis_dec_push),
(vorbis_handle_data_packet):
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_sink_event),
(gst_vorbisenc_chain):
* gst/playback/gststreaminfo.c: (cb_probe):
* gst/subparse/gstsubparse.c: (gst_subparse_src_event):
* gst/videorate/gstvideorate.c: (gst_videorate_event):
* gst/videoscale/gstvideoscale.c:
(gst_videoscale_handle_src_event):
* gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_event):
* sys/ximage/ximagesink.c: (gst_ximagesink_show_frame),
(gst_ximagesink_navigation_send_event):
* sys/xvimage/xvimagesink.c:
(gst_xvimagesink_navigation_send_event):
Various event updates and cleanups
2005-07-27 18:34:29 +00:00
|
|
|
g_signal_connect (G_OBJECT (element), "pad-added", G_CALLBACK (dynamic_link),
|
2004-03-14 22:34:34 +00:00
|
|
|
connect);
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_mod_pipeline (const gchar * location)
|
2002-06-11 19:20:52 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
GstElement *src, *decoder, *audiosink;
|
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-06-11 19:20:52 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
decoder = gst_element_factory_make_or_warn ("modplug", "decoder");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "sink");
|
2002-06-11 19:20:52 +00:00
|
|
|
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
|
|
|
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, decoder);
|
|
|
|
gst_element_link (decoder, audiosink);
|
2002-06-11 19:20:52 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (decoder, "src");
|
2002-06-11 19:20:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
rate_pads =
|
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
|
2002-06-11 19:20:52 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_dv_pipeline (const gchar * location)
|
2002-06-16 21:54:38 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
2005-08-16 14:35:52 +00:00
|
|
|
GstElement *src, *demux, *decoder, *audiosink, *videosink;
|
2005-07-19 11:57:27 +00:00
|
|
|
GstElement *a_queue, *v_queue;
|
2002-06-16 21:54:38 +00:00
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-06-16 21:54:38 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
2005-08-16 14:35:52 +00:00
|
|
|
demux = gst_element_factory_make_or_warn ("dvdemux", "demuxer");
|
2005-07-19 11:57:27 +00:00
|
|
|
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
2005-08-16 14:35:52 +00:00
|
|
|
decoder = gst_element_factory_make_or_warn ("ffdec_dvvideo", "decoder");
|
2005-11-17 12:36:36 +00:00
|
|
|
videosink = gst_element_factory_make_or_warn (VSINK, "v_sink");
|
2005-07-19 11:57:27 +00:00
|
|
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
2005-08-16 14:35:52 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn ("alsasink", "a_sink");
|
2002-06-16 21:54:38 +00:00
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
2005-08-16 14:35:52 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
2005-07-19 11:57:27 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), a_queue);
|
2002-06-16 21:54:38 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
2005-07-19 11:57:27 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), v_queue);
|
2005-08-16 14:35:52 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
2002-06-16 21:54:38 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), videosink);
|
|
|
|
|
2005-08-16 14:35:52 +00:00
|
|
|
gst_element_link (src, demux);
|
2005-07-19 11:57:27 +00:00
|
|
|
gst_element_link (a_queue, audiosink);
|
2005-08-16 14:35:52 +00:00
|
|
|
gst_element_link (v_queue, decoder);
|
|
|
|
gst_element_link (decoder, videosink);
|
2002-06-16 21:54:38 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, "video", gst_element_get_static_pad (v_queue,
|
|
|
|
"sink"), NULL);
|
|
|
|
setup_dynamic_link (demux, "audio", gst_element_get_static_pad (a_queue,
|
|
|
|
"sink"), NULL);
|
2005-07-19 11:57:27 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (decoder, "src");
|
2005-08-16 14:35:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
2002-06-16 21:54:38 +00:00
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_wav_pipeline (const gchar * location)
|
2002-06-08 14:57:15 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
GstElement *src, *decoder, *audiosink;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-06-08 14:57:15 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
decoder = gst_element_factory_make_or_warn ("wavparse", "decoder");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "sink");
|
2002-06-08 14:57:15 +00:00
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
|
|
|
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, decoder);
|
2002-06-08 14:57:15 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (decoder, "src", gst_element_get_static_pad (audiosink,
|
|
|
|
"sink"), NULL);
|
2005-09-19 16:09:41 +00:00
|
|
|
|
|
|
|
seekable_elements = g_list_prepend (seekable_elements, audiosink);
|
|
|
|
|
|
|
|
/* force element seeking on this pipeline */
|
|
|
|
elem_seek = TRUE;
|
2002-06-08 14:57:15 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_flac_pipeline (const gchar * location)
|
2002-06-06 20:26:52 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
GstElement *src, *decoder, *audiosink;
|
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-06-06 20:26:52 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
decoder = gst_element_factory_make_or_warn ("flacdec", "decoder");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "sink");
|
2003-05-24 10:51:02 +00:00
|
|
|
g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
|
|
|
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, decoder);
|
|
|
|
gst_element_link (decoder, audiosink);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (decoder, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
rate_pads =
|
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
|
2002-06-06 20:26:52 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_sid_pipeline (const gchar * location)
|
2002-06-06 20:26:52 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
GstElement *src, *decoder, *audiosink;
|
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-06-06 20:26:52 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
decoder = gst_element_factory_make_or_warn ("siddec", "decoder");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "sink");
|
2002-06-06 20:26:52 +00:00
|
|
|
//g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
|
|
|
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, decoder);
|
|
|
|
gst_element_link (decoder, audiosink);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (decoder, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
rate_pads =
|
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
|
2002-06-06 20:26:52 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_parse_pipeline (const gchar * location)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
GstElement *src, *parser, *fakesink;
|
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
parser = gst_element_factory_make_or_warn ("mpegparse", "parse");
|
|
|
|
fakesink = gst_element_factory_make_or_warn ("fakesink", "sink");
|
2002-12-26 22:53:36 +00:00
|
|
|
g_object_set (G_OBJECT (fakesink), "silent", TRUE, NULL);
|
|
|
|
g_object_set (G_OBJECT (fakesink), "sync", TRUE, NULL);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), parser);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), fakesink);
|
|
|
|
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, parser);
|
|
|
|
gst_element_link (parser, fakesink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (parser, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
2002-05-28 20:30:11 +00:00
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
rate_pads =
|
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (parser, "sink"));
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_vorbis_pipeline (const gchar * location)
|
2002-06-06 20:26:52 +00:00
|
|
|
{
|
2005-03-31 09:43:49 +00:00
|
|
|
GstElement *pipeline, *audio_bin;
|
|
|
|
GstElement *src, *demux, *decoder, *convert, *audiosink;
|
2005-08-23 18:30:07 +00:00
|
|
|
GstPad *pad, *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-06-06 20:26:52 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
2005-03-31 09:43:49 +00:00
|
|
|
demux = gst_element_factory_make_or_warn ("oggdemux", "demux");
|
|
|
|
decoder = gst_element_factory_make_or_warn ("vorbisdec", "decoder");
|
|
|
|
convert = gst_element_factory_make_or_warn ("audioconvert", "convert");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "sink");
|
2003-02-02 19:25:58 +00:00
|
|
|
g_object_set (G_OBJECT (audiosink), "sync", TRUE, NULL);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
audio_bin = gst_bin_new ("a_decoder_bin");
|
|
|
|
|
2002-06-06 20:26:52 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), decoder);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), convert);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), audiosink);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), audio_bin);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_element_link (src, demux);
|
|
|
|
gst_element_link (decoder, convert);
|
|
|
|
gst_element_link (convert, audiosink);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (decoder, "sink");
|
2005-08-23 18:30:07 +00:00
|
|
|
gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, NULL, gst_element_get_static_pad (audio_bin,
|
|
|
|
"sink"), NULL);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (decoder, "src");
|
2005-03-31 09:43:49 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
rate_pads =
|
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstElement *
|
|
|
|
make_theora_pipeline (const gchar * location)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *video_bin;
|
|
|
|
GstElement *src, *demux, *decoder, *convert, *videosink;
|
2005-08-23 18:30:07 +00:00
|
|
|
GstPad *pad, *seekable;
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
demux = gst_element_factory_make_or_warn ("oggdemux", "demux");
|
|
|
|
decoder = gst_element_factory_make_or_warn ("theoradec", "decoder");
|
|
|
|
convert = gst_element_factory_make_or_warn ("ffmpegcolorspace", "convert");
|
2005-05-09 10:56:13 +00:00
|
|
|
videosink = gst_element_factory_make_or_warn (VSINK, "sink");
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
video_bin = gst_bin_new ("v_decoder_bin");
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), decoder);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), convert);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), videosink);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), video_bin);
|
|
|
|
|
|
|
|
gst_element_link (src, demux);
|
|
|
|
gst_element_link (decoder, convert);
|
|
|
|
gst_element_link (convert, videosink);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (decoder, "sink");
|
2005-08-23 18:30:07 +00:00
|
|
|
gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, NULL, gst_element_get_static_pad (video_bin,
|
|
|
|
"sink"), NULL);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (decoder, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
rate_pads =
|
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
|
2002-06-06 20:26:52 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
static GstElement *
|
|
|
|
make_vorbis_theora_pipeline (const gchar * location)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *audio_bin, *video_bin;
|
|
|
|
GstElement *src, *demux, *a_decoder, *a_convert, *v_decoder, *v_convert;
|
|
|
|
GstElement *audiosink, *videosink;
|
2005-11-17 12:36:36 +00:00
|
|
|
GstElement *a_queue, *v_queue, *v_scale;
|
2005-03-31 09:43:49 +00:00
|
|
|
GstPad *seekable;
|
Updated seek example.
Original commit message from CVS:
* docs/libs/tmpl/gstringbuffer.sgml:
* examples/seeking/seek.c: (make_vorbis_theora_pipeline),
(query_rates), (query_positions_elems), (query_positions_pads),
(update_scale), (do_seek):
Updated seek example.
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_submit_packet),
(gst_ogg_pad_submit_page), (gst_ogg_demux_activate_chain),
(gst_ogg_demux_find_chains), (gst_ogg_demux_send_event),
(gst_ogg_demux_loop):
Push out correct discont values.
* ext/theora/theoradec.c: (theora_dec_src_convert),
(theora_dec_sink_convert), (theora_dec_src_getcaps),
(theora_dec_sink_event), (theora_handle_type_packet),
(theora_handle_header_packet), (theora_dec_push),
(theora_handle_data_packet), (theora_dec_chain),
(theora_dec_change_state):
Better timestamping.
* ext/vorbis/vorbisdec.c: (gst_vorbis_dec_init),
(vorbis_dec_sink_event), (vorbis_dec_push),
(vorbis_handle_data_packet), (vorbis_dec_chain):
* ext/vorbis/vorbisdec.h:
Better timestamping.
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_time), (gst_base_audio_sink_get_times),
(gst_base_audio_sink_event), (gst_base_audio_sink_render):
Handle syncing on timestamps instead of sample offsets. Make
use of DISCONT values as described in design docs.
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_get_time):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_acquire),
(gst_ring_buffer_set_sample), (gst_ring_buffer_commit),
(gst_ring_buffer_read):
* gst-libs/gst/audio/gstringbuffer.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_get_times),
(gst_ximagesink_show_frame):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_times):
Correcly convert buffer timestamp to stream time.
2005-07-16 14:47:27 +00:00
|
|
|
GstPad *pad;
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
demux = gst_element_factory_make_or_warn ("oggdemux", "demux");
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
|
|
|
gst_element_link (src, demux);
|
|
|
|
|
|
|
|
audio_bin = gst_bin_new ("a_decoder_bin");
|
|
|
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
|
|
|
a_decoder = gst_element_factory_make_or_warn ("vorbisdec", "a_dec");
|
|
|
|
a_convert = gst_element_factory_make_or_warn ("audioconvert", "a_convert");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "a_sink");
|
2005-03-31 09:43:49 +00:00
|
|
|
|
2005-06-02 13:33:40 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), audio_bin);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_queue);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_decoder);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_convert);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), audiosink);
|
|
|
|
|
2005-06-02 13:33:40 +00:00
|
|
|
gst_element_link (a_queue, a_decoder);
|
|
|
|
gst_element_link (a_decoder, a_convert);
|
|
|
|
gst_element_link (a_convert, audiosink);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (a_queue, "sink");
|
Updated seek example.
Original commit message from CVS:
* docs/libs/tmpl/gstringbuffer.sgml:
* examples/seeking/seek.c: (make_vorbis_theora_pipeline),
(query_rates), (query_positions_elems), (query_positions_pads),
(update_scale), (do_seek):
Updated seek example.
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_submit_packet),
(gst_ogg_pad_submit_page), (gst_ogg_demux_activate_chain),
(gst_ogg_demux_find_chains), (gst_ogg_demux_send_event),
(gst_ogg_demux_loop):
Push out correct discont values.
* ext/theora/theoradec.c: (theora_dec_src_convert),
(theora_dec_sink_convert), (theora_dec_src_getcaps),
(theora_dec_sink_event), (theora_handle_type_packet),
(theora_handle_header_packet), (theora_dec_push),
(theora_handle_data_packet), (theora_dec_chain),
(theora_dec_change_state):
Better timestamping.
* ext/vorbis/vorbisdec.c: (gst_vorbis_dec_init),
(vorbis_dec_sink_event), (vorbis_dec_push),
(vorbis_handle_data_packet), (vorbis_dec_chain):
* ext/vorbis/vorbisdec.h:
Better timestamping.
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_time), (gst_base_audio_sink_get_times),
(gst_base_audio_sink_event), (gst_base_audio_sink_render):
Handle syncing on timestamps instead of sample offsets. Make
use of DISCONT values as described in design docs.
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_get_time):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_acquire),
(gst_ring_buffer_set_sample), (gst_ring_buffer_commit),
(gst_ring_buffer_read):
* gst-libs/gst/audio/gstringbuffer.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_get_times),
(gst_ximagesink_show_frame):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_times):
Correcly convert buffer timestamp to stream time.
2005-07-16 14:47:27 +00:00
|
|
|
gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
|
2005-08-23 18:30:07 +00:00
|
|
|
gst_object_unref (pad);
|
2005-06-02 13:33:40 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, NULL, gst_element_get_static_pad (audio_bin,
|
|
|
|
"sink"), NULL);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
video_bin = gst_bin_new ("v_decoder_bin");
|
|
|
|
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
|
|
|
v_decoder = gst_element_factory_make_or_warn ("theoradec", "v_dec");
|
|
|
|
v_convert =
|
|
|
|
gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_convert");
|
2005-11-17 12:36:36 +00:00
|
|
|
v_scale = gst_element_factory_make_or_warn ("videoscale", "v_scale");
|
2005-05-09 10:56:13 +00:00
|
|
|
videosink = gst_element_factory_make_or_warn (VSINK, "v_sink");
|
2005-06-02 13:33:40 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), video_bin);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_queue);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_decoder);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_convert);
|
2005-11-17 12:36:36 +00:00
|
|
|
gst_bin_add (GST_BIN (video_bin), v_scale);
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (video_bin), videosink);
|
|
|
|
|
2005-11-17 12:36:36 +00:00
|
|
|
gst_element_link_many (v_queue, v_decoder, v_convert, v_scale, videosink,
|
|
|
|
NULL);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (v_queue, "sink");
|
Updated seek example.
Original commit message from CVS:
* docs/libs/tmpl/gstringbuffer.sgml:
* examples/seeking/seek.c: (make_vorbis_theora_pipeline),
(query_rates), (query_positions_elems), (query_positions_pads),
(update_scale), (do_seek):
Updated seek example.
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_submit_packet),
(gst_ogg_pad_submit_page), (gst_ogg_demux_activate_chain),
(gst_ogg_demux_find_chains), (gst_ogg_demux_send_event),
(gst_ogg_demux_loop):
Push out correct discont values.
* ext/theora/theoradec.c: (theora_dec_src_convert),
(theora_dec_sink_convert), (theora_dec_src_getcaps),
(theora_dec_sink_event), (theora_handle_type_packet),
(theora_handle_header_packet), (theora_dec_push),
(theora_handle_data_packet), (theora_dec_chain),
(theora_dec_change_state):
Better timestamping.
* ext/vorbis/vorbisdec.c: (gst_vorbis_dec_init),
(vorbis_dec_sink_event), (vorbis_dec_push),
(vorbis_handle_data_packet), (vorbis_dec_chain):
* ext/vorbis/vorbisdec.h:
Better timestamping.
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_time), (gst_base_audio_sink_get_times),
(gst_base_audio_sink_event), (gst_base_audio_sink_render):
Handle syncing on timestamps instead of sample offsets. Make
use of DISCONT values as described in design docs.
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_get_time):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_acquire),
(gst_ring_buffer_set_sample), (gst_ring_buffer_commit),
(gst_ring_buffer_read):
* gst-libs/gst/audio/gstringbuffer.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_get_times),
(gst_ximagesink_show_frame):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_times):
Correcly convert buffer timestamp to stream time.
2005-07-16 14:47:27 +00:00
|
|
|
gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
|
2005-08-23 18:30:07 +00:00
|
|
|
gst_object_unref (pad);
|
2005-06-02 13:33:40 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, NULL, gst_element_get_static_pad (video_bin,
|
|
|
|
"sink"), NULL);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (a_decoder, "src");
|
2005-03-31 09:43:49 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
|
|
|
rate_pads =
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
|
|
|
|
"sink"));
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GstElement *
|
|
|
|
make_avi_msmpeg4v3_mp3_pipeline (const gchar * location)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *audio_bin, *video_bin;
|
|
|
|
GstElement *src, *demux, *a_decoder, *a_convert, *v_decoder, *v_convert;
|
|
|
|
GstElement *audiosink, *videosink;
|
|
|
|
GstElement *a_queue, *v_queue;
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
GstPad *seekable, *pad;
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
demux = gst_element_factory_make_or_warn ("avidemux", "demux");
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
|
|
|
gst_element_link (src, demux);
|
|
|
|
|
|
|
|
audio_bin = gst_bin_new ("a_decoder_bin");
|
|
|
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
|
|
|
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
|
|
|
a_convert = gst_element_factory_make_or_warn ("audioconvert", "a_convert");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "a_sink");
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_queue);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_decoder);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_convert);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), audiosink);
|
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
gst_element_link (a_queue, a_decoder);
|
|
|
|
gst_element_link (a_decoder, a_convert);
|
|
|
|
gst_element_link (a_convert, audiosink);
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), audio_bin);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (a_queue, "sink");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, NULL, gst_element_get_static_pad (audio_bin,
|
|
|
|
"sink"), NULL);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
video_bin = gst_bin_new ("v_decoder_bin");
|
|
|
|
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
|
|
|
v_decoder = gst_element_factory_make_or_warn ("ffdec_msmpeg4", "v_dec");
|
|
|
|
v_convert =
|
|
|
|
gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_convert");
|
2005-05-09 10:56:13 +00:00
|
|
|
videosink = gst_element_factory_make_or_warn (VSINK, "v_sink");
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_queue);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_decoder);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_convert);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), videosink);
|
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
gst_element_link_many (v_queue, v_decoder, v_convert, videosink, NULL);
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), video_bin);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (v_queue, "sink");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, NULL, gst_element_get_static_pad (video_bin,
|
|
|
|
"sink"), NULL);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (a_decoder, "src");
|
2005-03-31 09:43:49 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
|
|
|
rate_pads =
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
|
|
|
|
"sink"));
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_mp3_pipeline (const gchar * location)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
2009-04-21 19:54:19 +00:00
|
|
|
GstElement *src, *parser, *decoder, *audiosink, *queue;
|
2002-05-28 20:30:11 +00:00
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
2009-04-21 19:54:19 +00:00
|
|
|
parser = gst_element_factory_make_or_warn ("mp3parse", "parse");
|
2002-06-13 13:16:52 +00:00
|
|
|
decoder = gst_element_factory_make_or_warn ("mad", "dec");
|
|
|
|
queue = gst_element_factory_make_or_warn ("queue", "queue");
|
2009-04-21 19:54:19 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "sink");
|
2002-06-06 20:26:52 +00:00
|
|
|
|
2009-04-21 19:54:19 +00:00
|
|
|
seekable_elements = g_list_prepend (seekable_elements, audiosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
2009-04-21 19:54:19 +00:00
|
|
|
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2002-06-06 20:26:52 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
2009-04-21 19:54:19 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), parser);
|
2002-06-06 20:26:52 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), decoder);
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), queue);
|
2009-04-21 19:54:19 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), audiosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2009-04-21 19:54:19 +00:00
|
|
|
gst_element_link (src, parser);
|
|
|
|
gst_element_link (parser, decoder);
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (decoder, queue);
|
2009-04-21 19:54:19 +00:00
|
|
|
gst_element_link (queue, audiosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (queue, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
2002-05-28 20:30:11 +00:00
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
rate_pads =
|
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_avi_pipeline (const gchar * location)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline, *audio_bin, *video_bin;
|
|
|
|
GstElement *src, *demux, *a_decoder, *v_decoder, *audiosink, *videosink;
|
2005-03-31 09:43:49 +00:00
|
|
|
GstElement *a_queue = NULL, *v_queue = NULL;
|
2002-05-28 20:30:11 +00:00
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
2002-05-28 20:30:11 +00:00
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
demux = gst_element_factory_make_or_warn ("avidemux", "demux");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_elements = g_list_prepend (seekable_elements, demux);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, demux);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
audio_bin = gst_bin_new ("a_decoder_bin");
|
2002-06-13 13:16:52 +00:00
|
|
|
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "a_sink");
|
2002-06-13 13:16:52 +00:00
|
|
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (a_decoder, a_queue);
|
|
|
|
gst_element_link (a_queue, audiosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_decoder);
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_queue);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), audiosink);
|
2002-07-24 21:34:23 +00:00
|
|
|
gst_element_set_state (audio_bin, GST_STATE_PAUSED);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, "audio_00", gst_element_get_static_pad (a_decoder,
|
2004-03-15 19:32:28 +00:00
|
|
|
"sink"), audio_bin);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (a_queue, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
2002-05-28 20:30:11 +00:00
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
2004-03-14 22:34:34 +00:00
|
|
|
rate_pads =
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
|
|
|
|
"sink"));
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
video_bin = gst_bin_new ("v_decoder_bin");
|
2003-02-02 19:25:58 +00:00
|
|
|
v_decoder = gst_element_factory_make_or_warn ("ffmpegdecall", "v_dec");
|
2005-11-17 12:36:36 +00:00
|
|
|
videosink = gst_element_factory_make_or_warn (VSINK, "v_sink");
|
2002-06-13 13:16:52 +00:00
|
|
|
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (v_decoder, v_queue);
|
|
|
|
gst_element_link (v_queue, videosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
gst_bin_add (GST_BIN (video_bin), v_decoder);
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (video_bin), v_queue);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), videosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2002-07-24 21:34:23 +00:00
|
|
|
gst_element_set_state (video_bin, GST_STATE_PAUSED);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, "video_00", gst_element_get_static_pad (v_decoder,
|
2004-03-15 19:32:28 +00:00
|
|
|
"sink"), video_bin);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (v_queue, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
2002-05-28 20:30:11 +00:00
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
2004-03-14 22:34:34 +00:00
|
|
|
rate_pads =
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (v_decoder,
|
|
|
|
"sink"));
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_mpeg_pipeline (const gchar * location)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline, *audio_bin, *video_bin;
|
2002-06-13 13:16:52 +00:00
|
|
|
GstElement *src, *demux, *a_decoder, *v_decoder, *v_filter;
|
|
|
|
GstElement *audiosink, *videosink;
|
2005-03-31 09:43:49 +00:00
|
|
|
GstElement *a_queue, *v_queue;
|
2002-05-28 20:30:11 +00:00
|
|
|
GstPad *seekable;
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
GstPad *pad;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
2002-06-13 13:16:52 +00:00
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
2002-05-28 20:30:11 +00:00
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
//demux = gst_element_factory_make_or_warn ("mpegdemux", "demux");
|
|
|
|
demux = gst_element_factory_make_or_warn ("flupsdemux", "demux");
|
2002-06-06 20:26:52 +00:00
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, demux);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
audio_bin = gst_bin_new ("a_decoder_bin");
|
2002-06-13 13:16:52 +00:00
|
|
|
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
|
|
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "a_sink");
|
2002-05-28 20:30:11 +00:00
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_decoder);
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_queue);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), audiosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
gst_element_link (a_decoder, a_queue);
|
|
|
|
gst_element_link (a_queue, audiosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), audio_bin);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (a_decoder, "sink");
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, "audio_c0", gst_element_get_static_pad (audio_bin,
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
"sink"), NULL);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
video_bin = gst_bin_new ("v_decoder_bin");
|
2002-06-13 13:16:52 +00:00
|
|
|
v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec");
|
|
|
|
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter");
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
videosink = gst_element_factory_make_or_warn (VSINK, "v_sink");
|
2004-03-14 22:34:34 +00:00
|
|
|
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
gst_bin_add (GST_BIN (video_bin), v_decoder);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_queue);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), v_filter);
|
|
|
|
gst_bin_add (GST_BIN (video_bin), videosink);
|
|
|
|
|
|
|
|
gst_element_link (v_decoder, v_queue);
|
|
|
|
gst_element_link (v_queue, v_filter);
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (v_filter, videosink);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
gst_bin_add (GST_BIN (pipeline), video_bin);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
pad = gst_element_get_static_pad (v_decoder, "sink");
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
|
|
|
|
gst_object_unref (pad);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, "video_e0", gst_element_get_static_pad (video_bin,
|
examples/seeking/: Added app for playback speed testing.
Original commit message from CVS:
* examples/seeking/Makefile.am:
* examples/seeking/scrubby.c: (gst_element_factory_make_or_warn),
(dynamic_link), (setup_dynamic_link), (make_wav_pipeline),
(make_playerbin_pipeline), (format_value), (update_scale),
(speed_cb), (seek_cb), (do_seek), (start_seek), (stop_seek),
(play_cb), (pause_cb), (stop_cb), (print_message), (bus_message),
(print_usage), (main):
Added app for playback speed testing.
* examples/seeking/seek.c: (dynamic_link),
(make_avi_msmpeg4v3_mp3_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (do_seek), (set_update_scale),
(message_received), (main):
Updated seek example.
2005-11-04 10:49:55 +00:00
|
|
|
"sink"), NULL);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (v_filter, "src");
|
2002-06-06 20:26:52 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
2002-05-28 20:30:11 +00:00
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
2004-03-14 22:34:34 +00:00
|
|
|
rate_pads =
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (v_decoder,
|
|
|
|
"sink"));
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
|
|
|
make_mpegnt_pipeline (const gchar * location)
|
2002-07-24 21:34:23 +00:00
|
|
|
{
|
|
|
|
GstElement *pipeline, *audio_bin, *video_bin;
|
|
|
|
GstElement *src, *demux, *a_decoder, *v_decoder, *v_filter;
|
|
|
|
GstElement *audiosink, *videosink;
|
2005-03-31 09:43:49 +00:00
|
|
|
GstElement *a_queue;
|
2002-07-24 21:34:23 +00:00
|
|
|
GstPad *seekable;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-07-24 21:34:23 +00:00
|
|
|
pipeline = gst_pipeline_new ("app");
|
|
|
|
|
|
|
|
src = gst_element_factory_make_or_warn (SOURCE, "src");
|
|
|
|
g_object_set (G_OBJECT (src), "location", location, NULL);
|
|
|
|
|
|
|
|
demux = gst_element_factory_make_or_warn ("mpegdemux", "demux");
|
|
|
|
//g_object_set (G_OBJECT (demux), "sync", TRUE, NULL);
|
|
|
|
|
|
|
|
seekable_elements = g_list_prepend (seekable_elements, demux);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), demux);
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (src, demux);
|
2002-07-24 21:34:23 +00:00
|
|
|
|
|
|
|
audio_bin = gst_bin_new ("a_decoder_bin");
|
|
|
|
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
|
|
|
|
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
|
examples/seeking/seek.c: Make audio sink configurable, use alsasink as default.
Original commit message from CVS:
* examples/seeking/seek.c: (make_mod_pipeline), (make_dv_pipeline),
(make_wav_pipeline), (make_flac_pipeline), (make_sid_pipeline),
(make_vorbis_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline):
Make audio sink configurable, use alsasink as default.
2005-04-28 16:24:23 +00:00
|
|
|
audiosink = gst_element_factory_make_or_warn (ASINK, "a_sink");
|
2002-07-24 21:34:23 +00:00
|
|
|
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
|
|
|
|
g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link (a_decoder, a_queue);
|
|
|
|
gst_element_link (a_queue, audiosink);
|
2002-07-24 21:34:23 +00:00
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_decoder);
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_bin_add (GST_BIN (audio_bin), a_queue);
|
|
|
|
gst_bin_add (GST_BIN (audio_bin), audiosink);
|
2002-07-24 21:34:23 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, "audio_00", gst_element_get_static_pad (a_decoder,
|
2004-03-15 19:32:28 +00:00
|
|
|
"sink"), audio_bin);
|
2002-07-24 21:34:23 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (a_queue, "src");
|
2002-07-24 21:34:23 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
2004-03-14 22:34:34 +00:00
|
|
|
rate_pads =
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
|
|
|
|
"sink"));
|
2002-07-24 21:34:23 +00:00
|
|
|
|
|
|
|
video_bin = gst_bin_new ("v_decoder_bin");
|
|
|
|
v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec");
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
v_filter = gst_element_factory_make_or_warn ("ffmpegcolorspace", "v_filter");
|
2005-11-17 12:36:36 +00:00
|
|
|
videosink = gst_element_factory_make_or_warn (VSINK, "v_sink");
|
2003-01-10 10:22:25 +00:00
|
|
|
gst_element_link_many (v_decoder, v_filter, videosink, NULL);
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2002-07-24 21:34:23 +00:00
|
|
|
gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL);
|
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
setup_dynamic_link (demux, "video_00", gst_element_get_static_pad (v_decoder,
|
2004-03-15 19:32:28 +00:00
|
|
|
"sink"), video_bin);
|
2002-07-24 21:34:23 +00:00
|
|
|
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
seekable = gst_element_get_static_pad (v_decoder, "src");
|
2002-07-24 21:34:23 +00:00
|
|
|
seekable_pads = g_list_prepend (seekable_pads, seekable);
|
|
|
|
rate_pads = g_list_prepend (rate_pads, seekable);
|
2004-03-14 22:34:34 +00:00
|
|
|
rate_pads =
|
Don't use bad gst_element_get_pad().
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().
2008-05-21 16:36:50 +00:00
|
|
|
g_list_prepend (rate_pads, gst_element_get_static_pad (v_decoder,
|
|
|
|
"sink"));
|
2002-07-24 21:34:23 +00:00
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
static void
|
|
|
|
playerbin_set_uri (GstElement * player, const gchar * location)
|
|
|
|
{
|
|
|
|
gchar *uri;
|
|
|
|
|
|
|
|
/* Add "file://" prefix for convenience */
|
|
|
|
if (g_str_has_prefix (location, "/")) {
|
|
|
|
uri = g_strconcat ("file://", location, NULL);
|
|
|
|
g_object_set (G_OBJECT (player), "uri", uri, NULL);
|
|
|
|
g_free (uri);
|
|
|
|
} else {
|
|
|
|
g_object_set (G_OBJECT (player), "uri", location, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static GstElement *
|
2008-06-24 16:05:06 +00:00
|
|
|
construct_playerbin (const gchar * name, const gchar * location)
|
2003-02-02 19:25:58 +00:00
|
|
|
{
|
2005-03-31 09:43:49 +00:00
|
|
|
GstElement *player;
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
player = gst_element_factory_make (name, "player");
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
g_assert (player);
|
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
playerbin_set_uri (player, location);
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
|
|
|
|
seekable_elements = g_list_prepend (seekable_elements, player);
|
|
|
|
|
|
|
|
/* force element seeking on this pipeline */
|
|
|
|
elem_seek = TRUE;
|
|
|
|
|
|
|
|
return player;
|
2003-02-02 19:25:58 +00:00
|
|
|
}
|
|
|
|
|
2007-11-16 16:02:45 +00:00
|
|
|
static GstElement *
|
2008-06-24 16:05:06 +00:00
|
|
|
make_playerbin_pipeline (const gchar * location)
|
2007-11-16 16:02:45 +00:00
|
|
|
{
|
2008-06-24 16:05:06 +00:00
|
|
|
return construct_playerbin ("playbin", location);
|
|
|
|
}
|
2007-11-16 16:02:45 +00:00
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
static GstElement *
|
|
|
|
make_playerbin2_pipeline (const gchar * location)
|
|
|
|
{
|
2009-05-27 14:37:38 +00:00
|
|
|
GstElement *pipeline = construct_playerbin ("playbin2", location);
|
|
|
|
|
|
|
|
/* FIXME: this is not triggered, playbin2 is not forwarding it from the sink */
|
|
|
|
g_signal_connect (pipeline, "notify::volume", G_CALLBACK (volume_notify_cb),
|
|
|
|
NULL);
|
|
|
|
return pipeline;
|
2007-11-16 16:02:45 +00:00
|
|
|
}
|
|
|
|
|
2006-05-09 11:21:24 +00:00
|
|
|
#ifndef GST_DISABLE_PARSE
|
2005-11-11 19:16:35 +00:00
|
|
|
static GstElement *
|
|
|
|
make_parselaunch_pipeline (const gchar * description)
|
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
2008-05-28 11:31:44 +00:00
|
|
|
GError *error = NULL;
|
2005-11-11 19:16:35 +00:00
|
|
|
|
|
|
|
pipeline = gst_parse_launch (description, &error);
|
|
|
|
|
|
|
|
seekable_elements = g_list_prepend (seekable_elements, pipeline);
|
|
|
|
|
|
|
|
elem_seek = TRUE;
|
|
|
|
|
|
|
|
return pipeline;
|
|
|
|
}
|
2006-05-09 11:21:24 +00:00
|
|
|
#endif
|
2005-11-11 19:16:35 +00:00
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
gchar *name;
|
|
|
|
GstElement *(*func) (const gchar * location);
|
|
|
|
}
|
|
|
|
Pipeline;
|
|
|
|
|
|
|
|
static Pipeline pipelines[] = {
|
|
|
|
{"mp3", make_mp3_pipeline},
|
|
|
|
{"avi", make_avi_pipeline},
|
|
|
|
{"mpeg1", make_mpeg_pipeline},
|
|
|
|
{"mpegparse", make_parse_pipeline},
|
|
|
|
{"vorbis", make_vorbis_pipeline},
|
|
|
|
{"theora", make_theora_pipeline},
|
|
|
|
{"ogg/v/t", make_vorbis_theora_pipeline},
|
|
|
|
{"avi/msmpeg4v3/mp3", make_avi_msmpeg4v3_mp3_pipeline},
|
|
|
|
{"sid", make_sid_pipeline},
|
|
|
|
{"flac", make_flac_pipeline},
|
|
|
|
{"wav", make_wav_pipeline},
|
|
|
|
{"mod", make_mod_pipeline},
|
|
|
|
{"dv", make_dv_pipeline},
|
|
|
|
{"mpeg1nothreads", make_mpegnt_pipeline},
|
|
|
|
{"playerbin", make_playerbin_pipeline},
|
|
|
|
#ifndef GST_DISABLE_PARSE
|
|
|
|
{"parse-launch", make_parselaunch_pipeline},
|
|
|
|
#endif
|
2007-11-16 16:02:45 +00:00
|
|
|
{"playerbin2", make_playerbin2_pipeline},
|
2007-06-21 08:34:46 +00:00
|
|
|
{NULL, NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NUM_TYPES ((sizeof (pipelines) / sizeof (Pipeline)) - 1)
|
|
|
|
|
|
|
|
/* ui callbacks and helpers */
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static gchar *
|
|
|
|
format_value (GtkScale * scale, gdouble value)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
2002-06-06 20:26:52 +00:00
|
|
|
gint64 real;
|
|
|
|
gint64 seconds;
|
|
|
|
gint64 subseconds;
|
|
|
|
|
|
|
|
real = value * duration / 100;
|
|
|
|
seconds = (gint64) real / GST_SECOND;
|
|
|
|
subseconds = (gint64) real / (GST_SECOND / 100);
|
2002-05-28 20:30:11 +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
|
|
|
return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
|
|
|
|
G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
2009-06-12 11:55:33 +00:00
|
|
|
|
|
|
|
static gchar *
|
|
|
|
shuttle_format_value (GtkScale * scale, gdouble value)
|
|
|
|
{
|
|
|
|
return g_strdup_printf ("%0.*g", gtk_scale_get_digits (scale), value);
|
|
|
|
}
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const gchar *name;
|
|
|
|
const GstFormat format;
|
2004-03-15 19:32:28 +00:00
|
|
|
}
|
|
|
|
seek_format;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
static seek_format seek_formats[] = {
|
|
|
|
{"tim", GST_FORMAT_TIME},
|
|
|
|
{"byt", GST_FORMAT_BYTES},
|
|
|
|
{"buf", GST_FORMAT_BUFFERS},
|
|
|
|
{"def", GST_FORMAT_DEFAULT},
|
|
|
|
{NULL, 0},
|
2002-05-28 20:30:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_UNUSED static void
|
|
|
|
query_rates (void)
|
|
|
|
{
|
|
|
|
GList *walk = rate_pads;
|
|
|
|
|
|
|
|
while (walk) {
|
|
|
|
GstPad *pad = GST_PAD (walk->data);
|
|
|
|
gint i = 0;
|
|
|
|
|
|
|
|
g_print ("rate/sec %8.8s: ", GST_PAD_NAME (pad));
|
|
|
|
while (seek_formats[i].name) {
|
|
|
|
gint64 value;
|
|
|
|
GstFormat format;
|
|
|
|
|
|
|
|
format = seek_formats[i].format;
|
|
|
|
|
2005-05-09 10:56:13 +00:00
|
|
|
if (gst_pad_query_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format,
|
|
|
|
&value)) {
|
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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
|
2004-03-14 22:34:34 +00:00
|
|
|
} else {
|
2004-03-15 19:32:28 +00:00
|
|
|
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
g_print (" %s:%s\n", GST_DEBUG_PAD_NAME (pad));
|
|
|
|
|
|
|
|
walk = g_list_next (walk);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
G_GNUC_UNUSED static void
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_get_type):
* ext/alsa/gstalsasink.c: (set_hwparams):
* ext/alsa/gstalsasrc.c: (set_hwparams):
* ext/gio/gstgio.c: (gst_gio_uri_handler_get_uri):
* ext/ogg/gstoggmux.h:
* ext/ogg/gstogmparse.c:
* gst-libs/gst/audio/audio.c:
* gst-libs/gst/fft/kiss_fft_f64.c: (kiss_fft_f64_alloc):
* gst-libs/gst/pbutils/missing-plugins.c:
(gst_missing_uri_sink_message_new),
(gst_missing_element_message_new),
(gst_missing_decoder_message_new),
(gst_missing_encoder_message_new):
* gst-libs/gst/rtp/gstbasertppayload.c:
* gst-libs/gst/rtp/gstrtcpbuffer.c:
(gst_rtcp_packet_bye_get_reason):
* gst/audioconvert/gstaudioconvert.c:
* gst/audioresample/gstaudioresample.c:
* gst/ffmpegcolorspace/imgconvert.c:
* gst/playback/test.c: (gen_video_element), (gen_audio_element):
* gst/typefind/gsttypefindfunctions.c:
* gst/videoscale/vs_4tap.c:
* gst/videoscale/vs_4tap.h:
* sys/v4l/gstv4lelement.c:
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get_any_caps):
* sys/v4l/v4l_calls.c:
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_capture_init),
(gst_v4lsrc_try_capture):
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new):
* tests/check/elements/audioconvert.c:
* tests/check/elements/audioresample.c:
(fail_unless_perfect_stream):
* tests/check/elements/audiotestsrc.c: (setup_audiotestsrc):
* tests/check/elements/decodebin.c:
* tests/check/elements/gdpdepay.c: (setup_gdpdepay),
(setup_gdpdepay_streamheader):
* tests/check/elements/gdppay.c: (setup_gdppay), (GST_START_TEST),
(setup_gdppay_streamheader):
* tests/check/elements/gnomevfssink.c: (setup_gnomevfssink):
* tests/check/elements/multifdsink.c: (setup_multifdsink):
* tests/check/elements/textoverlay.c:
* tests/check/elements/videorate.c: (setup_videorate):
* tests/check/elements/videotestsrc.c: (setup_videotestsrc):
* tests/check/elements/volume.c: (setup_volume):
* tests/check/elements/vorbisdec.c: (setup_vorbisdec):
* tests/check/elements/vorbistag.c:
* tests/check/generic/clock-selection.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/libs/cddabasesrc.c:
* tests/check/libs/video.c:
* tests/check/pipelines/gio.c:
* tests/check/pipelines/oggmux.c:
* tests/check/pipelines/simple-launch-lines.c:
(simple_launch_lines_suite):
* tests/check/pipelines/streamheader.c:
* tests/check/pipelines/theoraenc.c:
* tests/check/pipelines/vorbisdec.c:
* tests/check/pipelines/vorbisenc.c:
* tests/examples/seek/scrubby.c:
* tests/examples/seek/seek.c: (query_positions_elems),
(query_positions_pads):
* tests/icles/stress-xoverlay.c: (myclock):
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers and using "foo (void)" instead
of "foo ()" for declarations.
* win32/common/libgstrtp.def:
Add gst_rtp_buffer_set_extension_data to the symbol definition file.
2008-03-03 06:04:31 +00:00
|
|
|
query_positions_elems (void)
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
{
|
|
|
|
GList *walk = seekable_elements;
|
|
|
|
|
|
|
|
while (walk) {
|
|
|
|
GstElement *element = GST_ELEMENT (walk->data);
|
|
|
|
gint i = 0;
|
|
|
|
|
|
|
|
g_print ("positions %8.8s: ", GST_ELEMENT_NAME (element));
|
|
|
|
while (seek_formats[i].name) {
|
2005-05-09 10:56:13 +00:00
|
|
|
gint64 position, total;
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
GstFormat format;
|
|
|
|
|
|
|
|
format = seek_formats[i].format;
|
2005-05-09 10:56:13 +00:00
|
|
|
|
Query API update.
Original commit message from CVS:
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(query_positions_elems), (query_positions_pads), (update_scale),
(do_seek), (set_update_scale), (message_received), (main):
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query),
(gst_ogg_demux_perform_seek), (gst_ogg_demux_find_chains),
(gst_ogg_demux_loop):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_sink_query):
* ext/theora/theoradec.c: (theora_dec_src_query),
(theora_dec_sink_event):
* ext/vorbis/vorbisdec.c: (vorbis_dec_src_query),
(vorbis_dec_sink_event), (vorbis_handle_data_packet):
* gst/adder/gstadder.c: (gst_adder_query):
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audiotestsrc_src_query):
* gst/playback/test3.c: (update_scale):
* gst/playback/test5.c: (new_pad), (no_more_pads), (start_finding),
(dump_element_stats), (main):
* gst/playback/test6.c: (main):
* gst/sine/gstsinesrc.c: (gst_sinesrc_src_query):
Query API update.
2005-10-19 15:55:33 +00:00
|
|
|
if (gst_element_query_position (element, &format, &position) &&
|
|
|
|
gst_element_query_duration (element, &format, &total)) {
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("%s %13" G_GINT64_FORMAT " / %13" G_GINT64_FORMAT " | ",
|
|
|
|
seek_formats[i].name, position, total);
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
} else {
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("%s %13.13s / %13.13s | ", seek_formats[i].name, "*NA*",
|
|
|
|
"*NA*");
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
g_print (" %s\n", GST_ELEMENT_NAME (element));
|
|
|
|
|
|
|
|
walk = g_list_next (walk);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
G_GNUC_UNUSED static void
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_get_type):
* ext/alsa/gstalsasink.c: (set_hwparams):
* ext/alsa/gstalsasrc.c: (set_hwparams):
* ext/gio/gstgio.c: (gst_gio_uri_handler_get_uri):
* ext/ogg/gstoggmux.h:
* ext/ogg/gstogmparse.c:
* gst-libs/gst/audio/audio.c:
* gst-libs/gst/fft/kiss_fft_f64.c: (kiss_fft_f64_alloc):
* gst-libs/gst/pbutils/missing-plugins.c:
(gst_missing_uri_sink_message_new),
(gst_missing_element_message_new),
(gst_missing_decoder_message_new),
(gst_missing_encoder_message_new):
* gst-libs/gst/rtp/gstbasertppayload.c:
* gst-libs/gst/rtp/gstrtcpbuffer.c:
(gst_rtcp_packet_bye_get_reason):
* gst/audioconvert/gstaudioconvert.c:
* gst/audioresample/gstaudioresample.c:
* gst/ffmpegcolorspace/imgconvert.c:
* gst/playback/test.c: (gen_video_element), (gen_audio_element):
* gst/typefind/gsttypefindfunctions.c:
* gst/videoscale/vs_4tap.c:
* gst/videoscale/vs_4tap.h:
* sys/v4l/gstv4lelement.c:
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get_any_caps):
* sys/v4l/v4l_calls.c:
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_capture_init),
(gst_v4lsrc_try_capture):
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new):
* tests/check/elements/audioconvert.c:
* tests/check/elements/audioresample.c:
(fail_unless_perfect_stream):
* tests/check/elements/audiotestsrc.c: (setup_audiotestsrc):
* tests/check/elements/decodebin.c:
* tests/check/elements/gdpdepay.c: (setup_gdpdepay),
(setup_gdpdepay_streamheader):
* tests/check/elements/gdppay.c: (setup_gdppay), (GST_START_TEST),
(setup_gdppay_streamheader):
* tests/check/elements/gnomevfssink.c: (setup_gnomevfssink):
* tests/check/elements/multifdsink.c: (setup_multifdsink):
* tests/check/elements/textoverlay.c:
* tests/check/elements/videorate.c: (setup_videorate):
* tests/check/elements/videotestsrc.c: (setup_videotestsrc):
* tests/check/elements/volume.c: (setup_volume):
* tests/check/elements/vorbisdec.c: (setup_vorbisdec):
* tests/check/elements/vorbistag.c:
* tests/check/generic/clock-selection.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/libs/cddabasesrc.c:
* tests/check/libs/video.c:
* tests/check/pipelines/gio.c:
* tests/check/pipelines/oggmux.c:
* tests/check/pipelines/simple-launch-lines.c:
(simple_launch_lines_suite):
* tests/check/pipelines/streamheader.c:
* tests/check/pipelines/theoraenc.c:
* tests/check/pipelines/vorbisdec.c:
* tests/check/pipelines/vorbisenc.c:
* tests/examples/seek/scrubby.c:
* tests/examples/seek/seek.c: (query_positions_elems),
(query_positions_pads):
* tests/icles/stress-xoverlay.c: (myclock):
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers and using "foo (void)" instead
of "foo ()" for declarations.
* win32/common/libgstrtp.def:
Add gst_rtp_buffer_set_extension_data to the symbol definition file.
2008-03-03 06:04:31 +00:00
|
|
|
query_positions_pads (void)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
2002-06-11 19:20:52 +00:00
|
|
|
GList *walk = seekable_pads;
|
|
|
|
|
|
|
|
while (walk) {
|
|
|
|
GstPad *pad = GST_PAD (walk->data);
|
|
|
|
gint i = 0;
|
|
|
|
|
|
|
|
g_print ("positions %8.8s: ", GST_PAD_NAME (pad));
|
|
|
|
while (seek_formats[i].name) {
|
|
|
|
GstFormat format;
|
2005-05-09 10:56:13 +00:00
|
|
|
gint64 position, total;
|
2002-06-11 19:20:52 +00:00
|
|
|
|
|
|
|
format = seek_formats[i].format;
|
2005-05-09 10:56:13 +00:00
|
|
|
|
Query API update.
Original commit message from CVS:
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(query_positions_elems), (query_positions_pads), (update_scale),
(do_seek), (set_update_scale), (message_received), (main):
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query),
(gst_ogg_demux_perform_seek), (gst_ogg_demux_find_chains),
(gst_ogg_demux_loop):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_sink_query):
* ext/theora/theoradec.c: (theora_dec_src_query),
(theora_dec_sink_event):
* ext/vorbis/vorbisdec.c: (vorbis_dec_src_query),
(vorbis_dec_sink_event), (vorbis_handle_data_packet):
* gst/adder/gstadder.c: (gst_adder_query):
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audiotestsrc_src_query):
* gst/playback/test3.c: (update_scale):
* gst/playback/test5.c: (new_pad), (no_more_pads), (start_finding),
(dump_element_stats), (main):
* gst/playback/test6.c: (main):
* gst/sine/gstsinesrc.c: (gst_sinesrc_src_query):
Query API update.
2005-10-19 15:55:33 +00:00
|
|
|
if (gst_pad_query_position (pad, &format, &position) &&
|
|
|
|
gst_pad_query_duration (pad, &format, &total)) {
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("%s %13" G_GINT64_FORMAT " / %13" G_GINT64_FORMAT " | ",
|
|
|
|
seek_formats[i].name, position, total);
|
2004-03-14 22:34:34 +00:00
|
|
|
} else {
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("%s %13.13s / %13.13s | ", seek_formats[i].name, "*NA*",
|
|
|
|
"*NA*");
|
2002-06-11 19:20:52 +00:00
|
|
|
}
|
2005-05-09 10:56:13 +00:00
|
|
|
|
2002-06-11 19:20:52 +00:00
|
|
|
i++;
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
2002-06-11 19:20:52 +00:00
|
|
|
g_print (" %s:%s\n", GST_DEBUG_PAD_NAME (pad));
|
|
|
|
|
|
|
|
walk = g_list_next (walk);
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
static gboolean start_seek (GtkWidget * widget, GdkEventButton * event,
|
|
|
|
gpointer user_data);
|
|
|
|
static gboolean stop_seek (GtkWidget * widget, GdkEventButton * event,
|
|
|
|
gpointer user_data);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
static void seek_cb (GtkWidget * widget);
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
set_scale (gdouble value)
|
|
|
|
{
|
2007-09-17 17:24:55 +00:00
|
|
|
g_signal_handlers_block_by_func (hscale, (void *) start_seek,
|
|
|
|
(void *) pipeline);
|
|
|
|
g_signal_handlers_block_by_func (hscale, (void *) stop_seek,
|
|
|
|
(void *) pipeline);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
g_signal_handlers_block_by_func (hscale, (void *) seek_cb, (void *) pipeline);
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
gtk_adjustment_set_value (adjustment, value);
|
2007-09-17 17:24:55 +00:00
|
|
|
g_signal_handlers_unblock_by_func (hscale, (void *) start_seek,
|
|
|
|
(void *) pipeline);
|
|
|
|
g_signal_handlers_unblock_by_func (hscale, (void *) stop_seek,
|
|
|
|
(void *) pipeline);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
g_signal_handlers_unblock_by_func (hscale, (void *) seek_cb,
|
|
|
|
(void *) pipeline);
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
gtk_widget_queue_draw (hscale);
|
|
|
|
}
|
|
|
|
|
2008-04-09 21:42:24 +00:00
|
|
|
static gboolean
|
|
|
|
update_fill (gpointer data)
|
|
|
|
{
|
|
|
|
if (elem_seek) {
|
|
|
|
if (seekable_elements) {
|
|
|
|
GstElement *element = GST_ELEMENT (seekable_elements->data);
|
|
|
|
GstQuery *query;
|
|
|
|
|
|
|
|
query = gst_query_new_buffering (GST_FORMAT_PERCENT);
|
|
|
|
if (gst_element_query (element, query)) {
|
|
|
|
gint64 start, stop;
|
|
|
|
GstFormat format;
|
|
|
|
gdouble fill;
|
2008-04-11 01:25:01 +00:00
|
|
|
gboolean busy;
|
|
|
|
gint percent;
|
|
|
|
|
|
|
|
gst_query_parse_buffering_percent (query, &busy, &percent);
|
2008-04-09 21:42:24 +00:00
|
|
|
gst_query_parse_buffering_range (query, &format, &start, &stop, NULL);
|
|
|
|
|
|
|
|
GST_DEBUG ("start %" G_GINT64_FORMAT ", stop %" G_GINT64_FORMAT,
|
|
|
|
start, stop);
|
|
|
|
|
|
|
|
if (stop != -1)
|
|
|
|
fill = 100.0 * stop / GST_FORMAT_PERCENT_MAX;
|
|
|
|
else
|
|
|
|
fill = 100.0;
|
|
|
|
|
|
|
|
gtk_range_set_fill_level (GTK_RANGE (hscale), fill);
|
|
|
|
}
|
|
|
|
gst_query_unref (query);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
static gboolean
|
2004-03-14 22:34:34 +00:00
|
|
|
update_scale (gpointer data)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
GstFormat format = GST_FORMAT_TIME;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
//position = 0;
|
|
|
|
//duration = 0;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
if (elem_seek) {
|
|
|
|
if (seekable_elements) {
|
|
|
|
GstElement *element = GST_ELEMENT (seekable_elements->data);
|
2004-03-14 22:34:34 +00:00
|
|
|
|
Query API update.
Original commit message from CVS:
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(query_positions_elems), (query_positions_pads), (update_scale),
(do_seek), (set_update_scale), (message_received), (main):
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query),
(gst_ogg_demux_perform_seek), (gst_ogg_demux_find_chains),
(gst_ogg_demux_loop):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_sink_query):
* ext/theora/theoradec.c: (theora_dec_src_query),
(theora_dec_sink_event):
* ext/vorbis/vorbisdec.c: (vorbis_dec_src_query),
(vorbis_dec_sink_event), (vorbis_handle_data_packet):
* gst/adder/gstadder.c: (gst_adder_query):
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audiotestsrc_src_query):
* gst/playback/test3.c: (update_scale):
* gst/playback/test5.c: (new_pad), (no_more_pads), (start_finding),
(dump_element_stats), (main):
* gst/playback/test6.c: (main):
* gst/sine/gstsinesrc.c: (gst_sinesrc_src_query):
Query API update.
2005-10-19 15:55:33 +00:00
|
|
|
gst_element_query_position (element, &format, &position);
|
|
|
|
gst_element_query_duration (element, &format, &duration);
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (seekable_pads) {
|
|
|
|
GstPad *pad = GST_PAD (seekable_pads->data);
|
|
|
|
|
Query API update.
Original commit message from CVS:
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(query_positions_elems), (query_positions_pads), (update_scale),
(do_seek), (set_update_scale), (message_received), (main):
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query),
(gst_ogg_demux_perform_seek), (gst_ogg_demux_find_chains),
(gst_ogg_demux_loop):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_sink_query):
* ext/theora/theoradec.c: (theora_dec_src_query),
(theora_dec_sink_event):
* ext/vorbis/vorbisdec.c: (vorbis_dec_src_query),
(vorbis_dec_sink_event), (vorbis_handle_data_packet):
* gst/adder/gstadder.c: (gst_adder_query):
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audiotestsrc_src_query):
* gst/playback/test3.c: (update_scale):
* gst/playback/test5.c: (new_pad), (no_more_pads), (start_finding),
(dump_element_stats), (main):
* gst/playback/test6.c: (main):
* gst/sine/gstsinesrc.c: (gst_sinesrc_src_query):
Query API update.
2005-10-19 15:55:33 +00:00
|
|
|
gst_pad_query_position (pad, &format, &position);
|
|
|
|
gst_pad_query_duration (pad, &format, &duration);
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
}
|
2002-06-11 19:20:52 +00:00
|
|
|
}
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2002-06-11 19:20:52 +00:00
|
|
|
if (stats) {
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
if (elem_seek) {
|
|
|
|
query_positions_elems ();
|
|
|
|
} else {
|
|
|
|
query_positions_pads ();
|
|
|
|
}
|
2002-06-11 19:20:52 +00:00
|
|
|
query_rates ();
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
2009-06-01 09:31:49 +00:00
|
|
|
|
2004-07-16 11:05:53 +00:00
|
|
|
if (position >= duration)
|
|
|
|
duration = position;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
if (duration > 0) {
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
set_scale (position * 100.0 / duration);
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
2009-05-27 14:37:38 +00:00
|
|
|
/* FIXME: see make_playerbin2_pipeline() and volume_notify_cb() */
|
|
|
|
if (pipeline_type == 16) {
|
|
|
|
g_object_notify (G_OBJECT (pipeline), "volume");
|
|
|
|
}
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
static void do_seek (GtkWidget * widget);
|
2008-02-08 14:34:41 +00:00
|
|
|
static void connect_bus_signals (GstElement * pipeline);
|
2007-02-27 18:45:37 +00:00
|
|
|
static void set_update_scale (gboolean active);
|
2008-04-09 21:42:24 +00:00
|
|
|
static void set_update_fill (gboolean active);
|
2007-02-27 18:45:37 +00:00
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
static gboolean
|
2005-03-31 09:43:49 +00:00
|
|
|
end_scrub (GtkWidget * widget)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
2006-03-29 13:54:24 +00:00
|
|
|
GST_DEBUG ("end scrub, PAUSE");
|
2002-05-28 20:30:11 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
2005-03-31 09:43:49 +00:00
|
|
|
seek_timeout_id = 0;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2005-11-16 10:54:45 +00:00
|
|
|
static gboolean
|
|
|
|
send_event (GstEvent * event)
|
2002-05-28 20:30:11 +00:00
|
|
|
{
|
2005-06-02 13:33:40 +00:00
|
|
|
gboolean res = FALSE;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
if (!elem_seek) {
|
|
|
|
GList *walk = seekable_pads;
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
while (walk) {
|
|
|
|
GstPad *seekable = GST_PAD (walk->data);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2005-11-16 10:54:45 +00:00
|
|
|
GST_DEBUG ("send event on pad %s:%s", GST_DEBUG_PAD_NAME (seekable));
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2005-11-16 10:54:45 +00:00
|
|
|
gst_event_ref (event);
|
|
|
|
res = gst_pad_send_event (seekable, event);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
walk = g_list_next (walk);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
GList *walk = seekable_elements;
|
2002-06-06 20:26:52 +00:00
|
|
|
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
while (walk) {
|
|
|
|
GstElement *seekable = GST_ELEMENT (walk->data);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
2005-11-16 10:54:45 +00:00
|
|
|
GST_DEBUG ("send event on element %s", GST_ELEMENT_NAME (seekable));
|
2005-06-02 13:33:40 +00:00
|
|
|
|
2005-11-16 10:54:45 +00:00
|
|
|
gst_event_ref (event);
|
|
|
|
res = gst_element_send_event (seekable, event);
|
2002-06-06 20:26:52 +00:00
|
|
|
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
walk = g_list_next (walk);
|
|
|
|
}
|
2002-06-06 20:26:52 +00:00
|
|
|
}
|
2005-11-16 10:54:45 +00:00
|
|
|
gst_event_unref (event);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
do_seek (GtkWidget * widget)
|
|
|
|
{
|
|
|
|
gint64 real;
|
|
|
|
gboolean res = FALSE;
|
|
|
|
GstEvent *s_event;
|
|
|
|
GstSeekFlags flags;
|
|
|
|
|
|
|
|
real = gtk_range_get_value (GTK_RANGE (widget)) * duration / 100;
|
|
|
|
|
2005-12-12 13:03:50 +00:00
|
|
|
flags = 0;
|
|
|
|
if (flush_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_FLUSH;
|
2005-11-16 10:54:45 +00:00
|
|
|
if (accurate_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_ACCURATE;
|
|
|
|
if (keyframe_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_KEY_UNIT;
|
|
|
|
if (loop_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_SEGMENT;
|
2008-12-11 10:28:43 +00:00
|
|
|
if (skip_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_SKIP;
|
2005-11-16 10:54:45 +00:00
|
|
|
|
2006-10-10 18:56:01 +00:00
|
|
|
if (rate >= 0) {
|
|
|
|
s_event = gst_event_new_seek (rate,
|
2008-07-24 13:19:26 +00:00
|
|
|
GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, real, GST_SEEK_TYPE_SET,
|
|
|
|
GST_CLOCK_TIME_NONE);
|
2007-02-27 18:45:37 +00:00
|
|
|
GST_DEBUG ("seek with rate %lf to %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT,
|
|
|
|
rate, GST_TIME_ARGS (real), GST_TIME_ARGS (duration));
|
2006-10-10 18:56:01 +00:00
|
|
|
} else {
|
|
|
|
s_event = gst_event_new_seek (rate,
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0),
|
|
|
|
GST_SEEK_TYPE_SET, real);
|
2007-02-27 18:45:37 +00:00
|
|
|
GST_DEBUG ("seek with rate %lf to %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT,
|
|
|
|
rate, GST_TIME_ARGS (0), GST_TIME_ARGS (real));
|
2006-10-10 18:56:01 +00:00
|
|
|
}
|
2005-11-16 10:54:45 +00:00
|
|
|
|
|
|
|
res = send_event (s_event);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
if (res) {
|
2005-12-12 13:03:50 +00:00
|
|
|
if (flush_seek) {
|
2006-03-22 12:28:36 +00:00
|
|
|
gst_element_get_state (GST_ELEMENT (pipeline), NULL, NULL, SEEK_TIMEOUT);
|
2007-02-27 18:45:37 +00:00
|
|
|
} else {
|
|
|
|
set_update_scale (TRUE);
|
2005-12-12 13:03:50 +00:00
|
|
|
}
|
2007-05-09 11:25:34 +00:00
|
|
|
} else {
|
2005-06-02 13:33:40 +00:00
|
|
|
g_print ("seek failed\n");
|
2007-05-09 11:25:34 +00:00
|
|
|
set_update_scale (TRUE);
|
|
|
|
}
|
2005-03-31 09:43:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
seek_cb (GtkWidget * widget)
|
|
|
|
{
|
|
|
|
/* If the timer hasn't expired yet, then the pipeline is running */
|
2006-08-24 11:18:56 +00:00
|
|
|
if (play_scrub && seek_timeout_id != 0) {
|
2006-03-29 13:54:24 +00:00
|
|
|
GST_DEBUG ("do scrub seek, PAUSED");
|
2005-03-31 09:43:49 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
|
|
|
}
|
|
|
|
|
2006-03-29 13:54:24 +00:00
|
|
|
GST_DEBUG ("do seek");
|
2005-03-31 09:43:49 +00:00
|
|
|
do_seek (widget);
|
|
|
|
|
2006-08-24 11:18:56 +00:00
|
|
|
if (play_scrub) {
|
2006-03-29 13:54:24 +00:00
|
|
|
GST_DEBUG ("do scrub seek, PLAYING");
|
2006-03-22 12:28:36 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
2005-03-31 09:43:49 +00:00
|
|
|
|
2006-03-22 12:28:36 +00:00
|
|
|
if (seek_timeout_id == 0) {
|
|
|
|
seek_timeout_id =
|
|
|
|
g_timeout_add (SCRUB_TIME, (GSourceFunc) end_scrub, widget);
|
|
|
|
}
|
2005-03-31 09:43:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-09 21:42:24 +00:00
|
|
|
static void
|
|
|
|
set_update_fill (gboolean active)
|
|
|
|
{
|
|
|
|
GST_DEBUG ("fill scale is %d", active);
|
|
|
|
|
|
|
|
if (active) {
|
|
|
|
if (fill_id == 0) {
|
|
|
|
fill_id =
|
|
|
|
g_timeout_add (FILL_INTERVAL, (GtkFunction) update_fill, pipeline);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (fill_id) {
|
|
|
|
g_source_remove (fill_id);
|
|
|
|
fill_id = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
static void
|
|
|
|
set_update_scale (gboolean active)
|
|
|
|
{
|
2007-02-27 18:45:37 +00:00
|
|
|
|
|
|
|
GST_DEBUG ("update scale is %d", active);
|
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
if (active) {
|
|
|
|
if (update_id == 0) {
|
|
|
|
update_id =
|
|
|
|
g_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (update_id) {
|
|
|
|
g_source_remove (update_id);
|
|
|
|
update_id = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
static gboolean
|
|
|
|
start_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
|
|
|
|
{
|
2006-03-29 13:54:24 +00:00
|
|
|
if (event->type != GDK_BUTTON_PRESS)
|
|
|
|
return FALSE;
|
|
|
|
|
2006-10-13 11:25:10 +00:00
|
|
|
set_update_scale (FALSE);
|
|
|
|
|
2006-08-24 11:18:56 +00:00
|
|
|
if (state == GST_STATE_PLAYING && flush_seek && scrub) {
|
2006-03-29 13:54:24 +00:00
|
|
|
GST_DEBUG ("start scrub seek, PAUSE");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
2006-03-29 13:54:24 +00:00
|
|
|
}
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
|
2006-08-24 11:18:56 +00:00
|
|
|
if (changed_id == 0 && flush_seek && scrub) {
|
2009-06-14 18:30:59 +00:00
|
|
|
changed_id = g_signal_connect (GTK_OBJECT (hscale),
|
2005-03-31 09:43:49 +00:00
|
|
|
"value_changed", G_CALLBACK (seek_cb), pipeline);
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
|
2005-03-31 09:43:49 +00:00
|
|
|
{
|
2005-12-12 13:03:50 +00:00
|
|
|
if (changed_id) {
|
|
|
|
g_signal_handler_disconnect (GTK_OBJECT (hscale), changed_id);
|
|
|
|
changed_id = 0;
|
|
|
|
}
|
|
|
|
|
2006-08-24 11:18:56 +00:00
|
|
|
if (!flush_seek || !scrub) {
|
2006-03-29 13:54:24 +00:00
|
|
|
GST_DEBUG ("do final seek");
|
2005-12-12 13:03:50 +00:00
|
|
|
do_seek (widget);
|
|
|
|
}
|
|
|
|
|
2005-03-31 09:43:49 +00:00
|
|
|
if (seek_timeout_id != 0) {
|
2005-08-30 18:26:07 +00:00
|
|
|
g_source_remove (seek_timeout_id);
|
2005-03-31 09:43:49 +00:00
|
|
|
seek_timeout_id = 0;
|
2007-02-26 11:48:49 +00:00
|
|
|
/* Still scrubbing, so the pipeline is playing, see if we need PAUSED
|
|
|
|
* instead. */
|
|
|
|
if (state == GST_STATE_PAUSED) {
|
|
|
|
GST_DEBUG ("stop scrub seek, PAUSED");
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
|
|
|
}
|
examples/seeking/seek.c: Updated seek example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_vorbis_theora_pipeline),
(query_rates), (query_positions_elems), (query_positions_pads),
(do_seek), (seek_cb), (stop_seek):
Updated seek example.
* gst/playback/gstdecodebin.c: (remove_element_chain), (unlinked):
* gst/playback/gstplaybasebin.c: (queue_threshold_reached),
(queue_out_of_data), (gen_preroll_element), (new_decoded_pad):
* gst/playback/gstplaybin.c: (add_sink):
* gst/playback/gststreaminfo.c: (gst_stream_info_dispose),
(gst_stream_info_set_mute):
Some refcount leak fixes.
2005-07-18 10:53:03 +00:00
|
|
|
} else {
|
2006-03-22 12:28:36 +00:00
|
|
|
if (state == GST_STATE_PLAYING) {
|
2006-03-29 13:54:24 +00:00
|
|
|
GST_DEBUG ("stop scrub seek, PLAYING");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
2006-03-22 12:28:36 +00:00
|
|
|
}
|
examples/seeking/seek.c: Updated seek example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_vorbis_theora_pipeline),
(query_rates), (query_positions_elems), (query_positions_pads),
(do_seek), (seek_cb), (stop_seek):
Updated seek example.
* gst/playback/gstdecodebin.c: (remove_element_chain), (unlinked):
* gst/playback/gstplaybasebin.c: (queue_threshold_reached),
(queue_out_of_data), (gen_preroll_element), (new_decoded_pad):
* gst/playback/gstplaybin.c: (add_sink):
* gst/playback/gststreaminfo.c: (gst_stream_info_dispose),
(gst_stream_info_set_mute):
Some refcount leak fixes.
2005-07-18 10:53:03 +00:00
|
|
|
}
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
play_cb (GtkButton * button, gpointer data)
|
|
|
|
{
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
GstStateChangeReturn ret;
|
2005-03-31 09:43:49 +00:00
|
|
|
|
|
|
|
if (state != GST_STATE_PLAYING) {
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("PLAY pipeline\n");
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_pop (GTK_STATUSBAR (statusbar), status_id);
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
|
2008-04-03 16:10:53 +00:00
|
|
|
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
switch (ret) {
|
|
|
|
case GST_STATE_CHANGE_FAILURE:
|
|
|
|
goto failed;
|
|
|
|
case GST_STATE_CHANGE_NO_PREROLL:
|
|
|
|
is_live = TRUE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
state = GST_STATE_PLAYING;
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Playing");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
}
|
2009-06-12 11:55:33 +00:00
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
failed:
|
|
|
|
{
|
|
|
|
g_print ("PLAY failed\n");
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Play failed");
|
2002-06-06 20:26:52 +00:00
|
|
|
}
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
pause_cb (GtkButton * button, gpointer data)
|
|
|
|
{
|
2009-06-12 11:55:33 +00:00
|
|
|
g_static_mutex_lock (&state_mutex);
|
2005-03-31 09:43:49 +00:00
|
|
|
if (state != GST_STATE_PAUSED) {
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
GstStateChangeReturn ret;
|
|
|
|
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_pop (GTK_STATUSBAR (statusbar), status_id);
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("PAUSE pipeline\n");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
2008-04-03 16:10:53 +00:00
|
|
|
switch (ret) {
|
|
|
|
case GST_STATE_CHANGE_FAILURE:
|
|
|
|
goto failed;
|
|
|
|
case GST_STATE_CHANGE_NO_PREROLL:
|
|
|
|
is_live = TRUE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
|
|
|
|
state = GST_STATE_PAUSED;
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Paused");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
}
|
2009-06-12 11:55:33 +00:00
|
|
|
g_static_mutex_unlock (&state_mutex);
|
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
failed:
|
|
|
|
{
|
2009-06-12 11:55:33 +00:00
|
|
|
g_static_mutex_unlock (&state_mutex);
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
g_print ("PAUSE failed\n");
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Pause failed");
|
2002-06-06 20:26:52 +00:00
|
|
|
}
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
stop_cb (GtkButton * button, gpointer data)
|
|
|
|
{
|
2005-03-31 09:43:49 +00:00
|
|
|
if (state != GST_STATE_READY) {
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
GstStateChangeReturn ret;
|
|
|
|
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("READY pipeline\n");
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_pop (GTK_STATUSBAR (statusbar), status_id);
|
|
|
|
|
2009-06-12 11:55:33 +00:00
|
|
|
g_static_mutex_lock (&state_mutex);
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
ret = gst_element_set_state (pipeline, GST_STATE_READY);
|
|
|
|
if (ret == GST_STATE_CHANGE_FAILURE)
|
|
|
|
goto failed;
|
|
|
|
|
|
|
|
state = GST_STATE_READY;
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Stopped");
|
2007-06-21 08:34:46 +00:00
|
|
|
|
2008-04-03 16:10:53 +00:00
|
|
|
is_live = FALSE;
|
|
|
|
buffering = FALSE;
|
2007-12-31 13:17:29 +00:00
|
|
|
set_update_scale (FALSE);
|
|
|
|
set_scale (0.0);
|
2008-04-09 21:42:24 +00:00
|
|
|
set_update_fill (FALSE);
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
|
2008-02-08 18:17:51 +00:00
|
|
|
if (pipeline_type == 16)
|
|
|
|
clear_streams (pipeline);
|
2009-06-12 11:55:33 +00:00
|
|
|
g_static_mutex_unlock (&state_mutex);
|
2007-12-31 13:17:29 +00:00
|
|
|
|
2008-12-11 10:28:43 +00:00
|
|
|
#if 0
|
2007-06-21 08:34:46 +00:00
|
|
|
/* if one uses parse_launch, play, stop and play again it fails as all the
|
|
|
|
* pads after the demuxer can't be reconnected
|
|
|
|
*/
|
|
|
|
if (!strcmp (pipelines[pipeline_type].name, "parse-launch")) {
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
gst_object_unref (pipeline);
|
|
|
|
|
2008-06-20 09:14:26 +00:00
|
|
|
g_list_free (seekable_elements);
|
|
|
|
seekable_elements = NULL;
|
2008-06-22 18:35:27 +00:00
|
|
|
g_list_free (seekable_pads);
|
|
|
|
seekable_pads = NULL;
|
|
|
|
g_list_free (rate_pads);
|
|
|
|
rate_pads = NULL;
|
2008-06-20 09:14:26 +00:00
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
pipeline = pipelines[pipeline_type].func (pipeline_spec);
|
|
|
|
g_assert (pipeline);
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_READY);
|
2008-02-08 14:34:41 +00:00
|
|
|
connect_bus_signals (pipeline);
|
2007-06-21 08:34:46 +00:00
|
|
|
}
|
2008-12-11 10:28:43 +00:00
|
|
|
#endif
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
failed:
|
|
|
|
{
|
2009-06-12 11:55:33 +00:00
|
|
|
g_static_mutex_unlock (&state_mutex);
|
2007-06-21 08:34:46 +00:00
|
|
|
g_print ("STOP failed\n");
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Stop failed");
|
2002-06-06 20:26:52 +00:00
|
|
|
}
|
2002-05-28 20:30:11 +00:00
|
|
|
}
|
|
|
|
|
2005-11-13 13:53:26 +00:00
|
|
|
static void
|
|
|
|
accurate_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
accurate_seek = gtk_toggle_button_get_active (button);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
key_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
keyframe_seek = gtk_toggle_button_get_active (button);
|
|
|
|
}
|
|
|
|
|
2005-11-16 10:54:45 +00:00
|
|
|
static void
|
|
|
|
loop_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
loop_seek = gtk_toggle_button_get_active (button);
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
if (state == GST_STATE_PLAYING) {
|
|
|
|
do_seek (hscale);
|
|
|
|
}
|
2005-11-16 10:54:45 +00:00
|
|
|
}
|
|
|
|
|
2005-12-12 13:03:50 +00:00
|
|
|
static void
|
|
|
|
flush_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
flush_seek = gtk_toggle_button_get_active (button);
|
|
|
|
}
|
|
|
|
|
2006-03-22 12:28:36 +00:00
|
|
|
static void
|
|
|
|
scrub_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
scrub = gtk_toggle_button_get_active (button);
|
|
|
|
}
|
|
|
|
|
2006-08-24 11:18:56 +00:00
|
|
|
static void
|
|
|
|
play_scrub_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
play_scrub = gtk_toggle_button_get_active (button);
|
|
|
|
}
|
2006-10-12 19:39:07 +00:00
|
|
|
|
2008-12-11 10:28:43 +00:00
|
|
|
static void
|
|
|
|
skip_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
skip_seek = gtk_toggle_button_get_active (button);
|
|
|
|
if (state == GST_STATE_PLAYING) {
|
|
|
|
do_seek (hscale);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-10-07 18:35:39 +00:00
|
|
|
static void
|
|
|
|
rate_spinbutton_changed_cb (GtkSpinButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
2006-10-10 18:56:01 +00:00
|
|
|
gboolean res = FALSE;
|
|
|
|
GstEvent *s_event;
|
|
|
|
GstSeekFlags flags;
|
|
|
|
|
2006-10-07 18:35:39 +00:00
|
|
|
rate = gtk_spin_button_get_value (button);
|
2006-10-10 18:56:01 +00:00
|
|
|
|
2009-06-12 11:55:33 +00:00
|
|
|
GST_DEBUG ("rate changed to %lf", rate);
|
|
|
|
|
2006-10-10 18:56:01 +00:00
|
|
|
flags = 0;
|
|
|
|
if (flush_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_FLUSH;
|
|
|
|
if (loop_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_SEGMENT;
|
2008-02-12 19:50:36 +00:00
|
|
|
if (accurate_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_ACCURATE;
|
|
|
|
if (keyframe_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_KEY_UNIT;
|
2008-12-11 10:28:43 +00:00
|
|
|
if (skip_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_SKIP;
|
2006-10-10 18:56:01 +00:00
|
|
|
|
2009-06-12 11:55:33 +00:00
|
|
|
if (rate >= 0.0) {
|
2006-10-12 19:39:07 +00:00
|
|
|
s_event = gst_event_new_seek (rate,
|
|
|
|
GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, position,
|
2008-07-24 13:19:26 +00:00
|
|
|
GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
|
2006-10-12 19:39:07 +00:00
|
|
|
} else {
|
|
|
|
s_event = gst_event_new_seek (rate,
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0),
|
|
|
|
GST_SEEK_TYPE_SET, position);
|
2006-10-12 19:39:07 +00:00
|
|
|
}
|
2006-10-10 18:56:01 +00:00
|
|
|
|
|
|
|
res = send_event (s_event);
|
|
|
|
|
|
|
|
if (res) {
|
|
|
|
if (flush_seek) {
|
|
|
|
gst_element_get_state (GST_ELEMENT (pipeline), NULL, NULL, SEEK_TIMEOUT);
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
g_print ("seek failed\n");
|
2006-10-07 18:35:39 +00:00
|
|
|
}
|
2006-10-12 19:39:07 +00:00
|
|
|
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
static void
|
|
|
|
update_flag (GstPipeline * pipeline, gint num, gboolean state)
|
|
|
|
{
|
|
|
|
gint flags;
|
|
|
|
|
|
|
|
g_object_get (pipeline, "flags", &flags, NULL);
|
|
|
|
if (state)
|
|
|
|
flags |= (1 << num);
|
|
|
|
else
|
|
|
|
flags &= ~(1 << num);
|
|
|
|
g_object_set (pipeline, "flags", flags, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
vis_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
2008-02-27 12:19:31 +00:00
|
|
|
gboolean state;
|
|
|
|
|
|
|
|
state = gtk_toggle_button_get_active (button);
|
|
|
|
update_flag (pipeline, 3, state);
|
|
|
|
gtk_widget_set_sensitive (vis_combo, state);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
audio_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
2008-03-24 11:46:15 +00:00
|
|
|
gboolean state;
|
|
|
|
|
|
|
|
state = gtk_toggle_button_get_active (button);
|
|
|
|
update_flag (pipeline, 1, state);
|
|
|
|
gtk_widget_set_sensitive (audio_combo, state);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
video_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
2008-03-24 11:46:15 +00:00
|
|
|
gboolean state;
|
|
|
|
|
|
|
|
state = gtk_toggle_button_get_active (button);
|
|
|
|
update_flag (pipeline, 0, state);
|
|
|
|
gtk_widget_set_sensitive (video_combo, state);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
text_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
2008-03-24 11:46:15 +00:00
|
|
|
gboolean state;
|
|
|
|
|
|
|
|
state = gtk_toggle_button_get_active (button);
|
|
|
|
update_flag (pipeline, 2, state);
|
|
|
|
gtk_widget_set_sensitive (text_combo, state);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
static void
|
|
|
|
mute_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
gboolean mute;
|
|
|
|
|
|
|
|
mute = gtk_toggle_button_get_active (button);
|
|
|
|
g_object_set (pipeline, "mute", mute, NULL);
|
|
|
|
}
|
|
|
|
|
2009-07-10 19:25:43 +00:00
|
|
|
static void
|
|
|
|
download_toggle_cb (GtkToggleButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
gboolean state;
|
|
|
|
|
|
|
|
state = gtk_toggle_button_get_active (button);
|
|
|
|
update_flag (pipeline, 7, state);
|
|
|
|
}
|
|
|
|
|
2008-02-08 18:17:51 +00:00
|
|
|
static void
|
|
|
|
clear_streams (GstElement * pipeline)
|
|
|
|
{
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
/* remove previous info */
|
|
|
|
for (i = 0; i < n_video; i++)
|
|
|
|
gtk_combo_box_remove_text (GTK_COMBO_BOX (video_combo), 0);
|
|
|
|
for (i = 0; i < n_audio; i++)
|
|
|
|
gtk_combo_box_remove_text (GTK_COMBO_BOX (audio_combo), 0);
|
|
|
|
for (i = 0; i < n_text; i++)
|
|
|
|
gtk_combo_box_remove_text (GTK_COMBO_BOX (text_combo), 0);
|
|
|
|
|
|
|
|
n_audio = n_video = n_text = 0;
|
|
|
|
gtk_widget_set_sensitive (video_combo, FALSE);
|
|
|
|
gtk_widget_set_sensitive (audio_combo, FALSE);
|
|
|
|
gtk_widget_set_sensitive (text_combo, FALSE);
|
2008-02-18 11:54:15 +00:00
|
|
|
|
|
|
|
need_streams = TRUE;
|
2008-02-08 18:17:51 +00:00
|
|
|
}
|
|
|
|
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
static void
|
|
|
|
update_streams (GstPipeline * pipeline)
|
|
|
|
{
|
2008-02-08 18:17:51 +00:00
|
|
|
gint i;
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
|
2008-02-18 11:54:15 +00:00
|
|
|
if (pipeline_type == 16 && need_streams) {
|
2008-02-08 18:17:51 +00:00
|
|
|
GstTagList *tags;
|
2009-03-24 14:26:57 +00:00
|
|
|
gchar *name, *str;
|
2008-02-08 18:17:51 +00:00
|
|
|
gint active_idx;
|
2008-03-24 11:46:15 +00:00
|
|
|
gboolean state;
|
2008-02-08 18:17:51 +00:00
|
|
|
|
|
|
|
/* remove previous info */
|
|
|
|
clear_streams (GST_ELEMENT_CAST (pipeline));
|
|
|
|
|
2008-02-04 11:51:31 +00:00
|
|
|
/* here we get and update the different streams detected by playbin2 */
|
|
|
|
g_object_get (pipeline, "n-video", &n_video, NULL);
|
|
|
|
g_object_get (pipeline, "n-audio", &n_audio, NULL);
|
|
|
|
g_object_get (pipeline, "n-text", &n_text, NULL);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
|
2008-02-04 11:51:31 +00:00
|
|
|
g_print ("video %d, audio %d, text %d\n", n_video, n_audio, n_text);
|
2008-02-08 18:17:51 +00:00
|
|
|
|
|
|
|
active_idx = 0;
|
|
|
|
for (i = 0; i < n_video; i++) {
|
|
|
|
g_signal_emit_by_name (pipeline, "get-video-tags", i, &tags);
|
2009-03-24 14:26:57 +00:00
|
|
|
if (tags) {
|
|
|
|
str = gst_structure_to_string ((GstStructure *) tags);
|
|
|
|
g_print ("video %d: %s\n", i, str);
|
|
|
|
g_free (str);
|
|
|
|
}
|
2008-02-08 18:17:51 +00:00
|
|
|
/* find good name for the label */
|
|
|
|
name = g_strdup_printf ("video %d", i + 1);
|
|
|
|
gtk_combo_box_append_text (GTK_COMBO_BOX (video_combo), name);
|
|
|
|
g_free (name);
|
|
|
|
}
|
2008-03-24 11:46:15 +00:00
|
|
|
state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (video_checkbox));
|
|
|
|
gtk_widget_set_sensitive (video_combo, state && n_video > 0);
|
2008-02-08 18:17:51 +00:00
|
|
|
gtk_combo_box_set_active (GTK_COMBO_BOX (video_combo), active_idx);
|
|
|
|
|
|
|
|
active_idx = 0;
|
|
|
|
for (i = 0; i < n_audio; i++) {
|
|
|
|
g_signal_emit_by_name (pipeline, "get-audio-tags", i, &tags);
|
2009-03-24 14:26:57 +00:00
|
|
|
if (tags) {
|
|
|
|
str = gst_structure_to_string ((GstStructure *) tags);
|
|
|
|
g_print ("audio %d: %s\n", i, str);
|
|
|
|
g_free (str);
|
|
|
|
}
|
2008-02-08 18:17:51 +00:00
|
|
|
/* find good name for the label */
|
|
|
|
name = g_strdup_printf ("audio %d", i + 1);
|
|
|
|
gtk_combo_box_append_text (GTK_COMBO_BOX (audio_combo), name);
|
|
|
|
g_free (name);
|
|
|
|
}
|
2008-03-24 11:46:15 +00:00
|
|
|
state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (audio_checkbox));
|
|
|
|
gtk_widget_set_sensitive (audio_combo, state && n_audio > 0);
|
2008-02-08 18:17:51 +00:00
|
|
|
gtk_combo_box_set_active (GTK_COMBO_BOX (audio_combo), active_idx);
|
|
|
|
|
|
|
|
active_idx = 0;
|
|
|
|
for (i = 0; i < n_text; i++) {
|
|
|
|
g_signal_emit_by_name (pipeline, "get-text-tags", i, &tags);
|
2009-03-24 14:26:57 +00:00
|
|
|
|
2008-03-24 11:46:15 +00:00
|
|
|
name = NULL;
|
|
|
|
if (tags) {
|
|
|
|
const GValue *value;
|
|
|
|
|
2009-03-24 14:26:57 +00:00
|
|
|
str = gst_structure_to_string ((GstStructure *) tags);
|
|
|
|
g_print ("text %d: %s\n", i, str);
|
|
|
|
g_free (str);
|
|
|
|
|
2008-03-24 11:46:15 +00:00
|
|
|
/* get the language code if we can */
|
|
|
|
value = gst_tag_list_get_value_index (tags, GST_TAG_LANGUAGE_CODE, 0);
|
|
|
|
if (value && G_VALUE_HOLDS_STRING (value)) {
|
|
|
|
name = g_strdup_printf ("text %s", g_value_get_string (value));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* find good name for the label if we didn't use a tag */
|
|
|
|
if (name == NULL)
|
|
|
|
name = g_strdup_printf ("text %d", i + 1);
|
|
|
|
|
2008-02-08 18:17:51 +00:00
|
|
|
gtk_combo_box_append_text (GTK_COMBO_BOX (text_combo), name);
|
|
|
|
g_free (name);
|
|
|
|
}
|
2008-03-24 11:46:15 +00:00
|
|
|
state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (text_checkbox));
|
|
|
|
gtk_widget_set_sensitive (text_combo, state && n_text > 0);
|
2008-02-08 18:17:51 +00:00
|
|
|
gtk_combo_box_set_active (GTK_COMBO_BOX (text_combo), active_idx);
|
2008-02-18 11:54:15 +00:00
|
|
|
|
|
|
|
need_streams = FALSE;
|
2008-02-04 11:51:31 +00:00
|
|
|
}
|
2008-02-08 18:17:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
video_combo_cb (GtkComboBox * combo, GstPipeline * pipeline)
|
|
|
|
{
|
2009-03-20 15:13:06 +00:00
|
|
|
gint active;
|
|
|
|
|
|
|
|
active = gtk_combo_box_get_active (combo);
|
|
|
|
|
|
|
|
g_print ("setting current video track %d\n", active);
|
|
|
|
g_object_set (pipeline, "current-video", active, NULL);
|
2008-02-08 18:17:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
audio_combo_cb (GtkComboBox * combo, GstPipeline * pipeline)
|
|
|
|
{
|
2009-03-20 15:13:06 +00:00
|
|
|
gint active;
|
|
|
|
|
|
|
|
active = gtk_combo_box_get_active (combo);
|
|
|
|
|
|
|
|
g_print ("setting current audio track %d\n", active);
|
|
|
|
g_object_set (pipeline, "current-audio", active, NULL);
|
2008-02-08 18:17:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
text_combo_cb (GtkComboBox * combo, GstPipeline * pipeline)
|
|
|
|
{
|
2009-03-20 15:13:06 +00:00
|
|
|
gint active;
|
|
|
|
|
|
|
|
active = gtk_combo_box_get_active (combo);
|
|
|
|
|
|
|
|
g_print ("setting current text track %d\n", active);
|
|
|
|
g_object_set (pipeline, "current-text", active, NULL);
|
2008-02-08 18:17:51 +00:00
|
|
|
}
|
|
|
|
|
2008-02-27 12:19:31 +00:00
|
|
|
static gboolean
|
|
|
|
filter_features (GstPluginFeature * feature, gpointer data)
|
|
|
|
{
|
|
|
|
GstElementFactory *f;
|
|
|
|
|
|
|
|
if (!GST_IS_ELEMENT_FACTORY (feature))
|
|
|
|
return FALSE;
|
|
|
|
f = GST_ELEMENT_FACTORY (feature);
|
|
|
|
if (!g_strrstr (gst_element_factory_get_klass (f), "Visualization"))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
init_visualization_features (void)
|
|
|
|
{
|
|
|
|
GList *list, *walk;
|
|
|
|
|
|
|
|
vis_entries = g_array_new (FALSE, FALSE, sizeof (VisEntry));
|
|
|
|
|
|
|
|
list = gst_registry_feature_filter (gst_registry_get_default (),
|
|
|
|
filter_features, FALSE, NULL);
|
|
|
|
|
|
|
|
for (walk = list; walk; walk = g_list_next (walk)) {
|
|
|
|
VisEntry entry;
|
|
|
|
const gchar *name;
|
|
|
|
|
|
|
|
entry.factory = GST_ELEMENT_FACTORY (walk->data);
|
|
|
|
name = gst_element_factory_get_longname (entry.factory);
|
|
|
|
|
|
|
|
g_array_append_val (vis_entries, entry);
|
|
|
|
gtk_combo_box_append_text (GTK_COMBO_BOX (vis_combo), name);
|
|
|
|
}
|
|
|
|
gtk_combo_box_set_active (GTK_COMBO_BOX (vis_combo), 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
vis_combo_cb (GtkComboBox * combo, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
guint index;
|
|
|
|
VisEntry *entry;
|
|
|
|
GstElement *element;
|
|
|
|
|
|
|
|
/* get the selected index and get the factory for this index */
|
|
|
|
index = gtk_combo_box_get_active (GTK_COMBO_BOX (vis_combo));
|
2008-08-21 11:20:36 +00:00
|
|
|
if (vis_entries->len > 0) {
|
|
|
|
entry = &g_array_index (vis_entries, VisEntry, index);
|
|
|
|
|
|
|
|
/* create an instance of the element from the factory */
|
|
|
|
element = gst_element_factory_create (entry->factory, NULL);
|
|
|
|
if (!element)
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* set vis plugin for playbin2 */
|
|
|
|
g_object_set (pipeline, "vis-plugin", element, NULL);
|
|
|
|
}
|
2008-02-27 12:19:31 +00:00
|
|
|
}
|
|
|
|
|
2008-02-08 18:17:51 +00:00
|
|
|
static void
|
|
|
|
volume_spinbutton_changed_cb (GtkSpinButton * button, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
gdouble volume;
|
|
|
|
|
|
|
|
volume = gtk_spin_button_get_value (button);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
|
2008-02-08 18:17:51 +00:00
|
|
|
g_object_set (pipeline, "volume", volume, NULL);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
}
|
|
|
|
|
2009-05-27 14:37:38 +00:00
|
|
|
static void
|
|
|
|
volume_notify_cb (GstElement * pipeline, GParamSpec * arg, gpointer user_dat)
|
|
|
|
{
|
|
|
|
gdouble cur_volume, new_volume;
|
|
|
|
|
|
|
|
g_object_get (pipeline, "volume", &new_volume, NULL);
|
|
|
|
cur_volume = gtk_spin_button_get_value (GTK_SPIN_BUTTON (volume_spinbutton));
|
|
|
|
if (fabs (cur_volume - new_volume) > 0.001) {
|
|
|
|
g_signal_handlers_block_by_func (volume_spinbutton,
|
|
|
|
volume_spinbutton_changed_cb, pipeline);
|
|
|
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (volume_spinbutton), new_volume);
|
|
|
|
g_signal_handlers_unblock_by_func (volume_spinbutton,
|
|
|
|
volume_spinbutton_changed_cb, pipeline);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
static void
|
|
|
|
shot_cb (GtkButton * button, gpointer data)
|
|
|
|
{
|
|
|
|
GstBuffer *buffer;
|
|
|
|
GstCaps *caps;
|
|
|
|
|
|
|
|
/* convert to our desired format (RGB24) */
|
|
|
|
caps = gst_caps_new_simple ("video/x-raw-rgb",
|
|
|
|
"bpp", G_TYPE_INT, 24, "depth", G_TYPE_INT, 24,
|
|
|
|
/* Note: we don't ask for a specific width/height here, so that
|
|
|
|
* videoscale can adjust dimensions from a non-1/1 pixel aspect
|
|
|
|
* ratio to a 1/1 pixel-aspect-ratio */
|
|
|
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
|
|
|
|
"endianness", G_TYPE_INT, G_BIG_ENDIAN,
|
|
|
|
"red_mask", G_TYPE_INT, 0xff0000,
|
|
|
|
"green_mask", G_TYPE_INT, 0x00ff00,
|
|
|
|
"blue_mask", G_TYPE_INT, 0x0000ff, NULL);
|
|
|
|
|
2008-02-27 12:19:31 +00:00
|
|
|
/* convert the latest frame to the requested format */
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
g_signal_emit_by_name (pipeline, "convert-frame", caps, &buffer);
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
|
|
|
|
if (buffer) {
|
|
|
|
GstCaps *caps;
|
|
|
|
GstStructure *s;
|
|
|
|
gboolean res;
|
|
|
|
gint width, height;
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
GError *error = NULL;
|
|
|
|
|
|
|
|
/* get the snapshot buffer format now. We set the caps on the appsink so
|
|
|
|
* that it can only be an rgb buffer. The only thing we have not specified
|
|
|
|
* on the caps is the height, which is dependant on the pixel-aspect-ratio
|
|
|
|
* of the source material */
|
|
|
|
caps = GST_BUFFER_CAPS (buffer);
|
|
|
|
if (!caps) {
|
|
|
|
g_warning ("could not get snapshot format\n");
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
s = gst_caps_get_structure (caps, 0);
|
|
|
|
|
|
|
|
/* we need to get the final caps on the buffer to get the size */
|
|
|
|
res = gst_structure_get_int (s, "width", &width);
|
|
|
|
res |= gst_structure_get_int (s, "height", &height);
|
|
|
|
if (!res) {
|
|
|
|
g_warning ("could not get snapshot dimension\n");
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* create pixmap from buffer and save, gstreamer video buffers have a stride
|
|
|
|
* that is rounded up to the nearest multiple of 4 */
|
|
|
|
pixbuf = gdk_pixbuf_new_from_data (GST_BUFFER_DATA (buffer),
|
|
|
|
GDK_COLORSPACE_RGB, FALSE, 8, width, height,
|
|
|
|
GST_ROUND_UP_4 (width * 3), NULL, NULL);
|
|
|
|
|
|
|
|
/* save the pixbuf */
|
|
|
|
gdk_pixbuf_save (pixbuf, "snapshot.png", "png", &error, NULL);
|
|
|
|
|
|
|
|
done:
|
|
|
|
gst_buffer_unref (buffer);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
/* called when the Step button is pressed */
|
|
|
|
static void
|
|
|
|
step_cb (GtkButton * button, gpointer data)
|
|
|
|
{
|
|
|
|
GstEvent *event;
|
|
|
|
GstFormat format;
|
|
|
|
guint64 amount;
|
|
|
|
gdouble rate;
|
|
|
|
gboolean flush, res;
|
|
|
|
gint active;
|
|
|
|
|
|
|
|
active = gtk_combo_box_get_active (GTK_COMBO_BOX (format_combo));
|
|
|
|
amount =
|
|
|
|
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON
|
|
|
|
(step_amount_spinbutton));
|
|
|
|
rate = gtk_spin_button_get_value (GTK_SPIN_BUTTON (step_rate_spinbutton));
|
2009-06-12 11:55:33 +00:00
|
|
|
flush = TRUE;
|
2009-06-01 09:31:49 +00:00
|
|
|
|
|
|
|
switch (active) {
|
|
|
|
case 0:
|
|
|
|
format = GST_FORMAT_BUFFERS;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
format = GST_FORMAT_TIME;
|
|
|
|
amount *= GST_MSECOND;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
format = GST_FORMAT_UNDEFINED;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
event = gst_event_new_step (format, amount, rate, flush, FALSE);
|
|
|
|
|
|
|
|
res = send_event (event);
|
|
|
|
}
|
|
|
|
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
static void
|
|
|
|
message_received (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
const GstStructure *s;
|
|
|
|
|
|
|
|
s = gst_message_get_structure (message);
|
|
|
|
g_print ("message from \"%s\" (%s): ",
|
|
|
|
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))),
|
|
|
|
gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
|
|
|
|
if (s) {
|
|
|
|
gchar *sstr;
|
|
|
|
|
|
|
|
sstr = gst_structure_to_string (s);
|
|
|
|
g_print ("%s\n", sstr);
|
|
|
|
g_free (sstr);
|
|
|
|
} else {
|
|
|
|
g_print ("no message details\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-06-12 11:55:33 +00:00
|
|
|
static gboolean shuttling = FALSE;
|
|
|
|
static gdouble shuttle_rate = 0.0;
|
|
|
|
static gdouble play_rate = 1.0;
|
|
|
|
|
|
|
|
static void
|
|
|
|
do_shuttle (GstElement * element)
|
|
|
|
{
|
|
|
|
guint64 duration;
|
|
|
|
|
|
|
|
if (shuttling)
|
|
|
|
duration = 40 * GST_MSECOND;
|
|
|
|
else
|
|
|
|
duration = -1;
|
|
|
|
|
|
|
|
gst_element_send_event (element,
|
|
|
|
gst_event_new_step (GST_FORMAT_TIME, duration, shuttle_rate, FALSE,
|
|
|
|
FALSE));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
msg_sync_step_done (GstBus * bus, GstMessage * message, GstElement * element)
|
|
|
|
{
|
|
|
|
GstFormat format;
|
|
|
|
guint64 amount;
|
|
|
|
gdouble rate;
|
|
|
|
gboolean flush;
|
|
|
|
gboolean intermediate;
|
|
|
|
guint64 duration;
|
|
|
|
gboolean eos;
|
|
|
|
|
|
|
|
gst_message_parse_step_done (message, &format, &amount, &rate, &flush,
|
|
|
|
&intermediate, &duration, &eos);
|
|
|
|
|
|
|
|
if (eos) {
|
|
|
|
g_print ("stepped till EOS\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (g_static_mutex_trylock (&state_mutex)) {
|
|
|
|
if (shuttling)
|
|
|
|
do_shuttle (element);
|
|
|
|
g_static_mutex_unlock (&state_mutex);
|
|
|
|
} else {
|
|
|
|
/* ignore step messages that come while we are doing a state change */
|
|
|
|
g_print ("state change is busy\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
shuttle_toggled (GtkToggleButton * button, GstElement * element)
|
|
|
|
{
|
|
|
|
gboolean active;
|
|
|
|
|
|
|
|
active = gtk_toggle_button_get_active (button);
|
|
|
|
|
|
|
|
if (active != shuttling) {
|
|
|
|
shuttling = active;
|
|
|
|
g_print ("shuttling %s\n", shuttling ? "active" : "inactive");
|
|
|
|
if (active) {
|
|
|
|
shuttle_rate = 0.0;
|
|
|
|
play_rate = 1.0;
|
|
|
|
pause_cb (NULL, NULL);
|
|
|
|
gst_element_get_state (element, NULL, NULL, -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
shuttle_rate_switch (GstElement * element)
|
|
|
|
{
|
|
|
|
GstSeekFlags flags;
|
|
|
|
GstEvent *s_event;
|
|
|
|
gboolean res;
|
|
|
|
|
|
|
|
if (state == GST_STATE_PLAYING) {
|
|
|
|
/* pause when we need to */
|
|
|
|
pause_cb (NULL, NULL);
|
|
|
|
gst_element_get_state (element, NULL, NULL, -1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (play_rate == 1.0)
|
|
|
|
play_rate = -1.0;
|
|
|
|
else
|
|
|
|
play_rate = 1.0;
|
|
|
|
|
|
|
|
g_print ("rate changed to %lf %" GST_TIME_FORMAT "\n", play_rate,
|
|
|
|
GST_TIME_ARGS (position));
|
|
|
|
|
|
|
|
flags = GST_SEEK_FLAG_FLUSH;
|
|
|
|
flags |= GST_SEEK_FLAG_ACCURATE;
|
|
|
|
|
|
|
|
if (play_rate >= 0.0) {
|
|
|
|
s_event = gst_event_new_seek (play_rate,
|
|
|
|
GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, position,
|
|
|
|
GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
|
|
|
|
} else {
|
|
|
|
s_event = gst_event_new_seek (play_rate,
|
|
|
|
GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0),
|
|
|
|
GST_SEEK_TYPE_SET, position);
|
|
|
|
}
|
|
|
|
res = send_event (s_event);
|
|
|
|
if (res) {
|
|
|
|
gst_element_get_state (element, NULL, NULL, SEEK_TIMEOUT);
|
|
|
|
} else {
|
|
|
|
g_print ("seek failed\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
shuttle_value_changed (GtkRange * range, GstElement * element)
|
|
|
|
{
|
|
|
|
gdouble rate;
|
|
|
|
|
|
|
|
rate = gtk_adjustment_get_value (shuttle_adjustment);
|
|
|
|
|
|
|
|
if (rate == 0.0) {
|
|
|
|
g_print ("rate 0.0, pause\n");
|
|
|
|
pause_cb (NULL, NULL);
|
|
|
|
gst_element_get_state (element, NULL, NULL, -1);
|
|
|
|
} else {
|
|
|
|
g_print ("rate changed %0.3g\n", rate);
|
|
|
|
|
|
|
|
if ((rate < 0.0 && play_rate > 0.0) || (rate > 0.0 && play_rate < 0.0)) {
|
|
|
|
shuttle_rate_switch (element);
|
|
|
|
}
|
|
|
|
|
|
|
|
shuttle_rate = ABS (rate);
|
|
|
|
if (state != GST_STATE_PLAYING) {
|
|
|
|
do_shuttle (element);
|
|
|
|
play_cb (NULL, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
static void
|
|
|
|
msg_async_done (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
GST_DEBUG ("async done");
|
|
|
|
/* when we get ASYNC_DONE we can query position, duration and other
|
|
|
|
* properties */
|
|
|
|
update_scale (pipeline);
|
|
|
|
|
|
|
|
/* update the available streams */
|
|
|
|
update_streams (pipeline);
|
|
|
|
}
|
|
|
|
|
2006-10-12 19:39:07 +00:00
|
|
|
static void
|
|
|
|
msg_state_changed (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
const GstStructure *s;
|
|
|
|
|
|
|
|
s = gst_message_get_structure (message);
|
|
|
|
|
|
|
|
/* We only care about state changed on the pipeline */
|
|
|
|
if (s && GST_MESSAGE_SRC (message) == GST_OBJECT_CAST (pipeline)) {
|
|
|
|
GstState old, new, pending;
|
|
|
|
|
|
|
|
gst_message_parse_state_changed (message, &old, &new, &pending);
|
|
|
|
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
/* When state of the pipeline changes to paused or playing we start updating scale */
|
2006-10-12 19:39:07 +00:00
|
|
|
if (new == GST_STATE_PLAYING) {
|
|
|
|
set_update_scale (TRUE);
|
|
|
|
} else {
|
|
|
|
set_update_scale (FALSE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
static void
|
|
|
|
msg_segment_done (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
|
|
|
|
{
|
|
|
|
GstEvent *s_event;
|
|
|
|
GstSeekFlags flags;
|
|
|
|
gboolean res;
|
|
|
|
GstFormat format;
|
|
|
|
|
|
|
|
GST_DEBUG ("position is %" GST_TIME_FORMAT, GST_TIME_ARGS (position));
|
|
|
|
gst_message_parse_segment_done (message, &format, &position);
|
|
|
|
GST_DEBUG ("end of segment at %" GST_TIME_FORMAT, GST_TIME_ARGS (position));
|
|
|
|
|
2007-12-14 19:06:24 +00:00
|
|
|
flags = 0;
|
|
|
|
/* in the segment-done callback we never flush as this would not make sense
|
|
|
|
* for seamless playback. */
|
|
|
|
if (loop_seek)
|
2008-12-11 10:28:43 +00:00
|
|
|
flags |= GST_SEEK_FLAG_SEGMENT;
|
|
|
|
if (skip_seek)
|
|
|
|
flags |= GST_SEEK_FLAG_SKIP;
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
|
2007-02-27 18:45:37 +00:00
|
|
|
s_event = gst_event_new_seek (rate,
|
|
|
|
GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0),
|
|
|
|
GST_SEEK_TYPE_SET, duration);
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
|
|
|
|
GST_DEBUG ("restart loop with rate %lf to 0 / %" GST_TIME_FORMAT,
|
|
|
|
rate, GST_TIME_ARGS (duration));
|
|
|
|
|
|
|
|
res = send_event (s_event);
|
2007-12-14 19:06:24 +00:00
|
|
|
if (!res)
|
tests/examples/seek/seek.c: Allow to toggle looping while it plays. Fix callback prototype. Clean up code a bit more....
Original commit message from CVS:
* tests/examples/seek/seek.c: (set_scale), (update_scale),
(do_seek), (stop_seek), (pause_cb), (stop_cb), (loop_toggle_cb),
(rate_spinbutton_changed_cb), (msg_eos), (msg_segment_done),
(main):
Allow to toggle looping while it plays. Fix callback prototype. Clean
up code a bit more. Add copyright header.
2007-01-16 12:17:06 +00:00
|
|
|
g_print ("segment seek failed\n");
|
|
|
|
}
|
|
|
|
|
2008-04-11 01:25:01 +00:00
|
|
|
/* in stream buffering mode we PAUSE the pipeline until we receive a 100%
|
|
|
|
* message */
|
2008-04-03 16:10:53 +00:00
|
|
|
static void
|
2008-04-11 01:25:01 +00:00
|
|
|
do_stream_buffering (gint percent)
|
2008-04-03 16:10:53 +00:00
|
|
|
{
|
|
|
|
gchar *bufstr;
|
|
|
|
|
|
|
|
gtk_statusbar_pop (GTK_STATUSBAR (statusbar), status_id);
|
|
|
|
bufstr = g_strdup_printf ("Buffering...%d", percent);
|
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, bufstr);
|
|
|
|
g_free (bufstr);
|
|
|
|
|
|
|
|
if (percent == 100) {
|
|
|
|
/* a 100% message means buffering is done */
|
|
|
|
buffering = FALSE;
|
|
|
|
/* if the desired state is playing, go back */
|
|
|
|
if (state == GST_STATE_PLAYING) {
|
2008-04-11 01:25:01 +00:00
|
|
|
/* no state management needed for live pipelines */
|
|
|
|
if (!is_live) {
|
|
|
|
fprintf (stderr, "Done buffering, setting pipeline to PLAYING ...\n");
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
}
|
2008-04-03 16:10:53 +00:00
|
|
|
gtk_statusbar_pop (GTK_STATUSBAR (statusbar), status_id);
|
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Playing");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/* buffering busy */
|
|
|
|
if (buffering == FALSE && state == GST_STATE_PLAYING) {
|
|
|
|
/* we were not buffering but PLAYING, PAUSE the pipeline. */
|
2008-04-11 01:25:01 +00:00
|
|
|
if (!is_live) {
|
|
|
|
fprintf (stderr, "Buffering, setting pipeline to PAUSED ...\n");
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
|
|
|
}
|
2008-04-03 16:10:53 +00:00
|
|
|
}
|
|
|
|
buffering = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-11 01:25:01 +00:00
|
|
|
static void
|
|
|
|
do_download_buffering (gint percent)
|
|
|
|
{
|
|
|
|
if (!buffering && percent < 100) {
|
|
|
|
gchar *bufstr;
|
|
|
|
|
|
|
|
buffering = TRUE;
|
|
|
|
|
|
|
|
bufstr = g_strdup_printf ("Downloading...");
|
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, bufstr);
|
|
|
|
g_free (bufstr);
|
|
|
|
|
|
|
|
/* once we get a buffering message, we'll do the fill update */
|
|
|
|
set_update_fill (TRUE);
|
|
|
|
|
|
|
|
if (state == GST_STATE_PLAYING && !is_live) {
|
|
|
|
fprintf (stderr, "Downloading, setting pipeline to PAUSED ...\n");
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
2009-07-10 20:29:51 +00:00
|
|
|
/* user has to manually start the playback */
|
|
|
|
state = GST_STATE_PAUSED;
|
2008-04-11 01:25:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
msg_buffering (GstBus * bus, GstMessage * message, GstPipeline * data)
|
|
|
|
{
|
|
|
|
gint percent;
|
|
|
|
|
|
|
|
gst_message_parse_buffering (message, &percent);
|
|
|
|
|
|
|
|
/* get more stats */
|
|
|
|
gst_message_parse_buffering_stats (message, &mode, NULL, NULL,
|
|
|
|
&buffering_left);
|
|
|
|
|
|
|
|
switch (mode) {
|
|
|
|
case GST_BUFFERING_DOWNLOAD:
|
|
|
|
do_download_buffering (percent);
|
|
|
|
break;
|
|
|
|
case GST_BUFFERING_LIVE:
|
|
|
|
case GST_BUFFERING_TIMESHIFT:
|
|
|
|
case GST_BUFFERING_STREAM:
|
|
|
|
do_stream_buffering (percent);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-04-10 12:12:53 +00:00
|
|
|
static void
|
|
|
|
msg_clock_lost (GstBus * bus, GstMessage * message, GstPipeline * data)
|
|
|
|
{
|
|
|
|
g_print ("clock lost! PAUSE and PLAY to select a new clock\n");
|
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
}
|
|
|
|
|
2008-06-27 07:42:07 +00:00
|
|
|
#ifdef HAVE_X
|
2008-06-27 07:55:40 +00:00
|
|
|
|
|
|
|
static guint embed_xid = 0;
|
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
static GstBusSyncReply
|
|
|
|
bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data)
|
|
|
|
{
|
|
|
|
if ((GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT) &&
|
|
|
|
gst_structure_has_name (message->structure, "prepare-xwindow-id")) {
|
|
|
|
GstElement *element = GST_ELEMENT (GST_MESSAGE_SRC (message));
|
|
|
|
|
|
|
|
g_print ("got prepare-xwindow-id\n");
|
|
|
|
if (!embed_xid) {
|
|
|
|
embed_xid = GDK_WINDOW_XID (GDK_WINDOW (video_window->window));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (g_object_class_find_property (G_OBJECT_GET_CLASS (element),
|
|
|
|
"force-aspect-ratio")) {
|
|
|
|
g_object_set (element, "force-aspect-ratio", TRUE, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (GST_MESSAGE_SRC (message)),
|
|
|
|
embed_xid);
|
|
|
|
}
|
|
|
|
return GST_BUS_PASS;
|
|
|
|
}
|
2008-06-27 07:42:07 +00:00
|
|
|
#endif
|
2008-06-24 16:05:06 +00:00
|
|
|
|
2009-05-19 13:02:44 +00:00
|
|
|
static gboolean
|
|
|
|
handle_expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
|
|
|
|
{
|
|
|
|
if (state < GST_STATE_PAUSED) {
|
|
|
|
gdk_draw_rectangle (widget->window, widget->style->black_gc, TRUE,
|
|
|
|
0, 0, widget->allocation.width, widget->allocation.height);
|
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
static void
|
|
|
|
msg_eos (GstBus * bus, GstMessage * message, GstPipeline * data)
|
|
|
|
{
|
|
|
|
message_received (bus, message, data);
|
|
|
|
|
|
|
|
/* Set new uri for playerbins and continue playback */
|
|
|
|
if (l && (pipeline_type == 14 || pipeline_type == 16)) {
|
|
|
|
stop_cb (NULL, NULL);
|
|
|
|
l = g_list_next (l);
|
|
|
|
if (l) {
|
|
|
|
playerbin_set_uri (GST_ELEMENT (data), l->data);
|
|
|
|
play_cb (NULL, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
static void
|
|
|
|
msg_step_done (GstBus * bus, GstMessage * message, GstPipeline * data)
|
|
|
|
{
|
2009-06-12 11:55:33 +00:00
|
|
|
if (!shuttling)
|
|
|
|
message_received (bus, message, data);
|
2009-06-01 09:31:49 +00:00
|
|
|
}
|
|
|
|
|
2008-02-08 14:34:41 +00:00
|
|
|
static void
|
|
|
|
connect_bus_signals (GstElement * pipeline)
|
|
|
|
{
|
|
|
|
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
|
|
|
|
2008-06-27 07:42:07 +00:00
|
|
|
#ifdef HAVE_X
|
2008-06-24 16:05:06 +00:00
|
|
|
/* handle prepare-xwindow-id element message synchronously */
|
|
|
|
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler,
|
|
|
|
pipeline);
|
2008-06-27 07:42:07 +00:00
|
|
|
#endif
|
2008-06-24 16:05:06 +00:00
|
|
|
|
2008-02-08 14:34:41 +00:00
|
|
|
gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
|
2009-06-12 11:55:33 +00:00
|
|
|
gst_bus_enable_sync_message_emission (bus);
|
2008-02-08 14:34:41 +00:00
|
|
|
|
|
|
|
g_signal_connect (bus, "message::state-changed",
|
|
|
|
(GCallback) msg_state_changed, pipeline);
|
|
|
|
g_signal_connect (bus, "message::segment-done", (GCallback) msg_segment_done,
|
|
|
|
pipeline);
|
|
|
|
g_signal_connect (bus, "message::async-done", (GCallback) msg_async_done,
|
|
|
|
pipeline);
|
|
|
|
|
|
|
|
g_signal_connect (bus, "message::new-clock", (GCallback) message_received,
|
|
|
|
pipeline);
|
2009-04-10 12:12:53 +00:00
|
|
|
g_signal_connect (bus, "message::clock-lost", (GCallback) msg_clock_lost,
|
|
|
|
pipeline);
|
2008-02-08 14:34:41 +00:00
|
|
|
g_signal_connect (bus, "message::error", (GCallback) message_received,
|
|
|
|
pipeline);
|
|
|
|
g_signal_connect (bus, "message::warning", (GCallback) message_received,
|
|
|
|
pipeline);
|
2008-06-24 16:05:06 +00:00
|
|
|
g_signal_connect (bus, "message::eos", (GCallback) msg_eos, pipeline);
|
2008-02-08 14:34:41 +00:00
|
|
|
g_signal_connect (bus, "message::tag", (GCallback) message_received,
|
|
|
|
pipeline);
|
|
|
|
g_signal_connect (bus, "message::element", (GCallback) message_received,
|
|
|
|
pipeline);
|
|
|
|
g_signal_connect (bus, "message::segment-done", (GCallback) message_received,
|
|
|
|
pipeline);
|
2008-04-03 16:10:53 +00:00
|
|
|
g_signal_connect (bus, "message::buffering", (GCallback) msg_buffering,
|
|
|
|
pipeline);
|
2009-06-12 11:55:33 +00:00
|
|
|
// g_signal_connect (bus, "message::step-done", (GCallback) msg_step_done,
|
|
|
|
// pipeline);
|
|
|
|
g_signal_connect (bus, "message::step-start", (GCallback) msg_step_done,
|
2009-06-01 09:31:49 +00:00
|
|
|
pipeline);
|
2009-06-12 11:55:33 +00:00
|
|
|
g_signal_connect (bus, "sync-message::step-done",
|
|
|
|
(GCallback) msg_sync_step_done, pipeline);
|
2008-02-08 14:34:41 +00:00
|
|
|
|
|
|
|
gst_object_unref (bus);
|
|
|
|
}
|
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
/* Return GList of paths described in location string */
|
|
|
|
static GList *
|
|
|
|
handle_wildcards (const gchar * location)
|
|
|
|
{
|
|
|
|
GList *res = NULL;
|
|
|
|
gchar *path = g_path_get_dirname (location);
|
|
|
|
gchar *pattern = g_path_get_basename (location);
|
|
|
|
GPatternSpec *pspec = g_pattern_spec_new (pattern);
|
|
|
|
GDir *dir = g_dir_open (path, 0, NULL);
|
|
|
|
const gchar *name;
|
|
|
|
|
|
|
|
g_print ("matching %s from %s\n", pattern, path);
|
|
|
|
|
|
|
|
if (!dir) {
|
|
|
|
g_print ("opening directory %s failed\n", path);
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
while ((name = g_dir_read_name (dir)) != NULL) {
|
|
|
|
if (g_pattern_match_string (pspec, name)) {
|
|
|
|
res = g_list_append (res, g_strjoin ("/", path, name, NULL));
|
|
|
|
g_print (" found clip %s\n", name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_dir_close (dir);
|
|
|
|
out:
|
|
|
|
g_pattern_spec_free (pspec);
|
|
|
|
g_free (pattern);
|
|
|
|
g_free (path);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
delete_event_cb (void)
|
|
|
|
{
|
|
|
|
stop_cb (NULL, NULL);
|
|
|
|
gtk_main_quit ();
|
|
|
|
}
|
|
|
|
|
2003-02-02 19:25:58 +00:00
|
|
|
static void
|
|
|
|
print_usage (int argc, char **argv)
|
|
|
|
{
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
g_print ("usage: %s <type> <filename>\n", argv[0]);
|
|
|
|
g_print (" possible types:\n");
|
|
|
|
|
|
|
|
for (i = 0; i < NUM_TYPES; i++) {
|
|
|
|
g_print (" %d = %s\n", i, pipelines[i].name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
2009-05-18 09:08:56 +00:00
|
|
|
GtkWidget *window, *hbox, *vbox, *panel, *expander, *pb2vbox, *boxes,
|
2009-06-01 09:31:49 +00:00
|
|
|
*flagtable, *boxes2, *step;
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
GtkWidget *play_button, *pause_button, *stop_button, *shot_button;
|
2005-12-12 13:03:50 +00:00
|
|
|
GtkWidget *accurate_checkbox, *key_checkbox, *loop_checkbox, *flush_checkbox;
|
2009-06-12 11:55:33 +00:00
|
|
|
GtkWidget *scrub_checkbox, *play_scrub_checkbox;
|
2009-05-27 14:37:38 +00:00
|
|
|
GtkWidget *rate_label, *volume_label;
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
GOptionEntry options[] = {
|
|
|
|
{"stats", 's', 0, G_OPTION_ARG_NONE, &stats,
|
2004-03-15 19:32:28 +00:00
|
|
|
"Show pad stats", NULL},
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
{"elem", 'e', 0, G_OPTION_ARG_NONE, &elem_seek,
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
"Seek on elements instead of pads", NULL},
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
"Verbose properties", NULL},
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
{NULL}
|
2002-06-11 19:20:52 +00:00
|
|
|
};
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
GOptionContext *ctx;
|
|
|
|
GError *err = NULL;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2007-01-05 16:02:50 +00:00
|
|
|
if (!g_thread_supported ())
|
|
|
|
g_thread_init (NULL);
|
|
|
|
|
2006-09-18 11:40:14 +00:00
|
|
|
ctx = g_option_context_new ("- test seeking in gsteamer");
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
g_option_context_add_main_entries (ctx, options, NULL);
|
|
|
|
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
2008-06-25 13:15:50 +00:00
|
|
|
g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
|
|
|
|
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
|
|
|
|
g_print ("Error initializing: %s\n", err->message);
|
|
|
|
exit (1);
|
|
|
|
}
|
2005-09-19 16:09:41 +00:00
|
|
|
|
|
|
|
GST_DEBUG_CATEGORY_INIT (seek_debug, "seek", 0, "seek example");
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
if (argc != 3) {
|
2003-02-02 19:25:58 +00:00
|
|
|
print_usage (argc, argv);
|
|
|
|
exit (-1);
|
|
|
|
}
|
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
pipeline_type = atoi (argv[1]);
|
2003-02-02 19:25:58 +00:00
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
if (pipeline_type < 0 || pipeline_type >= NUM_TYPES) {
|
2003-02-02 19:25:58 +00:00
|
|
|
print_usage (argc, argv);
|
2002-05-28 20:30:11 +00:00
|
|
|
exit (-1);
|
|
|
|
}
|
|
|
|
|
2007-06-21 08:34:46 +00:00
|
|
|
pipeline_spec = argv[2];
|
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
if (g_strrstr (pipeline_spec, "*") != NULL ||
|
|
|
|
g_strrstr (pipeline_spec, "?") != NULL) {
|
|
|
|
paths = handle_wildcards (pipeline_spec);
|
|
|
|
} else {
|
|
|
|
paths = g_list_prepend (paths, g_strdup (pipeline_spec));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!paths) {
|
|
|
|
g_print ("opening %s failed\n", pipeline_spec);
|
|
|
|
exit (-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
l = paths;
|
|
|
|
|
|
|
|
pipeline = pipelines[pipeline_type].func ((gchar *) l->data);
|
2003-02-02 19:25:58 +00:00
|
|
|
g_assert (pipeline);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
/* initialize gui elements ... */
|
|
|
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
2008-06-24 16:05:06 +00:00
|
|
|
video_window = gtk_drawing_area_new ();
|
2009-05-19 13:02:44 +00:00
|
|
|
g_signal_connect (G_OBJECT (video_window), "expose-event",
|
|
|
|
G_CALLBACK (handle_expose_cb), NULL);
|
2008-06-24 16:05:06 +00:00
|
|
|
gtk_widget_set_double_buffered (video_window, FALSE);
|
2008-04-03 16:10:53 +00:00
|
|
|
statusbar = gtk_statusbar_new ();
|
|
|
|
status_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "seek");
|
|
|
|
gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Stopped");
|
2002-05-28 20:30:11 +00:00
|
|
|
hbox = gtk_hbox_new (FALSE, 0);
|
|
|
|
vbox = gtk_vbox_new (FALSE, 0);
|
2006-10-07 18:35:39 +00:00
|
|
|
flagtable = gtk_table_new (4, 2, FALSE);
|
2006-09-18 11:40:14 +00:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2006-09-18 11:40:14 +00:00
|
|
|
/* media controls */
|
|
|
|
play_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
|
|
|
|
pause_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PAUSE);
|
|
|
|
stop_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_STOP);
|
|
|
|
|
|
|
|
/* seek flags */
|
2005-11-13 13:53:26 +00:00
|
|
|
accurate_checkbox = gtk_check_button_new_with_label ("Accurate Seek");
|
2006-09-18 11:40:14 +00:00
|
|
|
key_checkbox = gtk_check_button_new_with_label ("Key-unit Seek");
|
2005-11-16 10:54:45 +00:00
|
|
|
loop_checkbox = gtk_check_button_new_with_label ("Loop");
|
2005-12-12 13:03:50 +00:00
|
|
|
flush_checkbox = gtk_check_button_new_with_label ("Flush");
|
2006-03-22 12:28:36 +00:00
|
|
|
scrub_checkbox = gtk_check_button_new_with_label ("Scrub");
|
2006-08-24 11:18:56 +00:00
|
|
|
play_scrub_checkbox = gtk_check_button_new_with_label ("Play Scrub");
|
2008-12-11 10:28:43 +00:00
|
|
|
skip_checkbox = gtk_check_button_new_with_label ("Play Skip");
|
2007-11-24 15:02:01 +00:00
|
|
|
rate_spinbutton = gtk_spin_button_new_with_range (-100, 100, 0.1);
|
2008-02-04 11:51:31 +00:00
|
|
|
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (rate_spinbutton), 3);
|
2006-10-07 18:35:39 +00:00
|
|
|
rate_label = gtk_label_new ("Rate");
|
2006-03-22 12:28:36 +00:00
|
|
|
|
2009-06-14 18:30:59 +00:00
|
|
|
gtk_widget_set_tooltip_text (accurate_checkbox,
|
|
|
|
"accurate position is requested, this might be considerably slower for some formats");
|
|
|
|
gtk_widget_set_tooltip_text (key_checkbox,
|
|
|
|
"seek to the nearest keyframe. This might be faster but less accurate");
|
|
|
|
gtk_widget_set_tooltip_text (loop_checkbox, "loop playback");
|
|
|
|
gtk_widget_set_tooltip_text (flush_checkbox, "flush pipeline after seeking");
|
|
|
|
gtk_widget_set_tooltip_text (rate_spinbutton, "define the playback rate, "
|
|
|
|
"negative value trigger reverse playback");
|
|
|
|
gtk_widget_set_tooltip_text (scrub_checkbox, "show images while seeking");
|
|
|
|
gtk_widget_set_tooltip_text (play_scrub_checkbox, "play video while seeking");
|
|
|
|
gtk_widget_set_tooltip_text (skip_checkbox,
|
|
|
|
"Skip frames while playing at high frame rates");
|
2006-09-18 11:40:14 +00:00
|
|
|
|
2005-12-12 13:03:50 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (flush_checkbox), TRUE);
|
2006-08-24 11:18:56 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scrub_checkbox), TRUE);
|
2005-11-13 13:53:26 +00:00
|
|
|
|
2006-10-07 18:35:39 +00:00
|
|
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (rate_spinbutton), rate);
|
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
/* step expander */
|
|
|
|
{
|
|
|
|
GtkWidget *hbox;
|
|
|
|
|
|
|
|
step = gtk_expander_new ("step options");
|
|
|
|
hbox = gtk_hbox_new (FALSE, 0);
|
|
|
|
|
|
|
|
format_combo = gtk_combo_box_new_text ();
|
|
|
|
gtk_combo_box_append_text (GTK_COMBO_BOX (format_combo), "frames");
|
|
|
|
gtk_combo_box_append_text (GTK_COMBO_BOX (format_combo), "time (ms)");
|
|
|
|
gtk_combo_box_set_active (GTK_COMBO_BOX (format_combo), 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), format_combo, FALSE, FALSE, 2);
|
|
|
|
|
|
|
|
step_amount_spinbutton = gtk_spin_button_new_with_range (1, 1000, 1);
|
|
|
|
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (step_amount_spinbutton), 0);
|
|
|
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (step_amount_spinbutton), 1.0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), step_amount_spinbutton, FALSE, FALSE,
|
|
|
|
2);
|
|
|
|
|
|
|
|
step_rate_spinbutton = gtk_spin_button_new_with_range (0.0, 100, 0.1);
|
|
|
|
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (step_rate_spinbutton), 3);
|
|
|
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (step_rate_spinbutton), 1.0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), step_rate_spinbutton, FALSE, FALSE, 2);
|
|
|
|
|
|
|
|
step_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_FORWARD);
|
|
|
|
gtk_button_set_label (GTK_BUTTON (step_button), "Step");
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), step_button, FALSE, FALSE, 2);
|
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT (step_button), "clicked", G_CALLBACK (step_cb),
|
|
|
|
pipeline);
|
|
|
|
|
2009-06-12 11:55:33 +00:00
|
|
|
/* shuttle scale */
|
|
|
|
shuttle_checkbox = gtk_check_button_new_with_label ("Shuttle");
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), shuttle_checkbox, FALSE, FALSE, 2);
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shuttle_checkbox), FALSE);
|
2009-06-15 09:06:25 +00:00
|
|
|
g_signal_connect (GTK_OBJECT (shuttle_checkbox),
|
2009-06-12 11:55:33 +00:00
|
|
|
"toggled", G_CALLBACK (shuttle_toggled), pipeline);
|
|
|
|
|
|
|
|
shuttle_adjustment =
|
|
|
|
GTK_ADJUSTMENT (gtk_adjustment_new (0.0, -3.00, 4.0, 0.1, 1.0, 1.0));
|
|
|
|
shuttle_hscale = gtk_hscale_new (shuttle_adjustment);
|
|
|
|
gtk_scale_set_digits (GTK_SCALE (shuttle_hscale), 2);
|
|
|
|
gtk_scale_set_value_pos (GTK_SCALE (shuttle_hscale), GTK_POS_TOP);
|
|
|
|
gtk_range_set_update_policy (GTK_RANGE (shuttle_hscale),
|
|
|
|
GTK_UPDATE_CONTINUOUS);
|
2009-06-15 09:06:25 +00:00
|
|
|
g_signal_connect (GTK_OBJECT (shuttle_hscale), "value_changed",
|
2009-06-12 11:55:33 +00:00
|
|
|
G_CALLBACK (shuttle_value_changed), pipeline);
|
2009-06-15 09:06:25 +00:00
|
|
|
g_signal_connect (GTK_OBJECT (shuttle_hscale), "format_value",
|
2009-06-12 11:55:33 +00:00
|
|
|
G_CALLBACK (shuttle_format_value), pipeline);
|
|
|
|
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), shuttle_hscale, TRUE, TRUE, 2);
|
|
|
|
|
2009-06-01 09:31:49 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (step), hbox);
|
|
|
|
}
|
|
|
|
|
2006-09-18 11:40:14 +00:00
|
|
|
/* seek bar */
|
2004-03-14 22:34:34 +00:00
|
|
|
adjustment =
|
|
|
|
GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.00, 100.0, 0.1, 1.0, 1.0));
|
2002-05-28 20:30:11 +00:00
|
|
|
hscale = gtk_hscale_new (adjustment);
|
|
|
|
gtk_scale_set_digits (GTK_SCALE (hscale), 2);
|
2009-05-19 13:02:44 +00:00
|
|
|
gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_RIGHT);
|
2007-11-19 12:08:16 +00:00
|
|
|
#if GTK_CHECK_VERSION(2,12,0)
|
2007-11-16 16:02:45 +00:00
|
|
|
gtk_range_set_show_fill_level (GTK_RANGE (hscale), TRUE);
|
|
|
|
gtk_range_set_fill_level (GTK_RANGE (hscale), 100.0);
|
2007-11-19 11:59:20 +00:00
|
|
|
#endif
|
2002-05-28 20:30:11 +00:00
|
|
|
gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS);
|
|
|
|
|
2009-06-14 18:30:59 +00:00
|
|
|
g_signal_connect (GTK_OBJECT (hscale),
|
2004-03-14 22:34:34 +00:00
|
|
|
"button_press_event", G_CALLBACK (start_seek), pipeline);
|
2009-06-14 18:30:59 +00:00
|
|
|
g_signal_connect (GTK_OBJECT (hscale),
|
2004-03-14 22:34:34 +00:00
|
|
|
"button_release_event", G_CALLBACK (stop_seek), pipeline);
|
2009-06-14 18:30:59 +00:00
|
|
|
g_signal_connect (GTK_OBJECT (hscale),
|
2004-03-14 22:34:34 +00:00
|
|
|
"format_value", G_CALLBACK (format_value), pipeline);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
if (pipeline_type == 16) {
|
|
|
|
/* the playbin2 panel controls for the video/audio/subtitle tracks */
|
|
|
|
panel = gtk_hbox_new (FALSE, 0);
|
|
|
|
video_combo = gtk_combo_box_new_text ();
|
|
|
|
audio_combo = gtk_combo_box_new_text ();
|
|
|
|
text_combo = gtk_combo_box_new_text ();
|
2008-02-08 18:17:51 +00:00
|
|
|
gtk_widget_set_sensitive (video_combo, FALSE);
|
|
|
|
gtk_widget_set_sensitive (audio_combo, FALSE);
|
|
|
|
gtk_widget_set_sensitive (text_combo, FALSE);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (panel), video_combo, TRUE, TRUE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (panel), audio_combo, TRUE, TRUE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (panel), text_combo, TRUE, TRUE, 2);
|
2008-02-08 18:17:51 +00:00
|
|
|
g_signal_connect (G_OBJECT (video_combo), "changed",
|
|
|
|
G_CALLBACK (video_combo_cb), pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (audio_combo), "changed",
|
|
|
|
G_CALLBACK (audio_combo_cb), pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (text_combo), "changed",
|
|
|
|
G_CALLBACK (text_combo_cb), pipeline);
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
/* playbin2 panel for flag checkboxes and volume/mute */
|
|
|
|
boxes = gtk_hbox_new (FALSE, 0);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
vis_checkbox = gtk_check_button_new_with_label ("Vis");
|
|
|
|
video_checkbox = gtk_check_button_new_with_label ("Video");
|
|
|
|
audio_checkbox = gtk_check_button_new_with_label ("Audio");
|
|
|
|
text_checkbox = gtk_check_button_new_with_label ("Text");
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
mute_checkbox = gtk_check_button_new_with_label ("Mute");
|
2009-07-10 19:25:43 +00:00
|
|
|
download_checkbox = gtk_check_button_new_with_label ("Download");
|
2009-05-27 14:37:38 +00:00
|
|
|
volume_label = gtk_label_new ("Volume");
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
volume_spinbutton = gtk_spin_button_new_with_range (0, 10.0, 0.1);
|
2008-02-08 18:17:51 +00:00
|
|
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (volume_spinbutton), 1.0);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), video_checkbox, TRUE, TRUE, 2);
|
2008-03-24 11:46:15 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), audio_checkbox, TRUE, TRUE, 2);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), text_checkbox, TRUE, TRUE, 2);
|
2008-03-24 11:46:15 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), vis_checkbox, TRUE, TRUE, 2);
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), mute_checkbox, TRUE, TRUE, 2);
|
2009-07-10 19:25:43 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), download_checkbox, TRUE, TRUE, 2);
|
2009-05-27 14:37:38 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), volume_label, TRUE, TRUE, 2);
|
2008-02-08 18:17:51 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (boxes), volume_spinbutton, TRUE, TRUE, 2);
|
2008-02-15 18:38:52 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (vis_checkbox), FALSE);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (audio_checkbox), TRUE);
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (video_checkbox), TRUE);
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (text_checkbox), TRUE);
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mute_checkbox), FALSE);
|
2009-07-10 19:25:43 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (download_checkbox), FALSE);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
g_signal_connect (G_OBJECT (vis_checkbox), "toggled",
|
|
|
|
G_CALLBACK (vis_toggle_cb), pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (audio_checkbox), "toggled",
|
|
|
|
G_CALLBACK (audio_toggle_cb), pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (video_checkbox), "toggled",
|
|
|
|
G_CALLBACK (video_toggle_cb), pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (text_checkbox), "toggled",
|
|
|
|
G_CALLBACK (text_toggle_cb), pipeline);
|
gst/playback/: Add mute property.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(gst_play_bin_set_property), (gst_play_bin_get_property),
(pad_added_cb), (pad_removed_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_set_mute),
(gst_play_sink_get_mute), (gen_audio_chain):
* gst/playback/gstplaysink.h:
Add mute property.
* gst/playback/gststreamselector.c: (gst_selector_pad_event),
(gst_selector_pad_chain):
* gst/playback/gststreamselector.h:
Make sure we forward the event only once.
* tests/examples/seek/seek.c: (stop_cb), (mute_toggle_cb), (main):
Add and implement the mute button for playbin2.
2008-02-14 18:24:42 +00:00
|
|
|
g_signal_connect (G_OBJECT (mute_checkbox), "toggled",
|
|
|
|
G_CALLBACK (mute_toggle_cb), pipeline);
|
2009-07-10 19:25:43 +00:00
|
|
|
g_signal_connect (G_OBJECT (download_checkbox), "toggled",
|
|
|
|
G_CALLBACK (download_toggle_cb), pipeline);
|
2008-02-08 18:17:51 +00:00
|
|
|
g_signal_connect (G_OBJECT (volume_spinbutton), "value_changed",
|
|
|
|
G_CALLBACK (volume_spinbutton_changed_cb), pipeline);
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
/* playbin2 panel for snapshot */
|
|
|
|
boxes2 = gtk_hbox_new (FALSE, 0);
|
|
|
|
shot_button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
|
2009-06-14 18:30:59 +00:00
|
|
|
gtk_widget_set_tooltip_text (shot_button,
|
|
|
|
"save a screenshot .png in the current directory");
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
g_signal_connect (G_OBJECT (shot_button), "clicked", G_CALLBACK (shot_cb),
|
|
|
|
pipeline);
|
2008-02-27 12:19:31 +00:00
|
|
|
vis_combo = gtk_combo_box_new_text ();
|
|
|
|
g_signal_connect (G_OBJECT (vis_combo), "changed",
|
|
|
|
G_CALLBACK (vis_combo_cb), pipeline);
|
|
|
|
gtk_widget_set_sensitive (vis_combo, FALSE);
|
|
|
|
gtk_box_pack_start (GTK_BOX (boxes2), shot_button, TRUE, TRUE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (boxes2), vis_combo, TRUE, TRUE, 2);
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
|
2008-02-27 12:19:31 +00:00
|
|
|
/* fill the vis combo box and the array of factories */
|
|
|
|
init_visualization_features ();
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
} else {
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
panel = boxes = boxes2 = NULL;
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
}
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
/* do the packing stuff ... */
|
check/pipelines/simple_launch_lines.c: Small update, use API as stated in design docs.
Original commit message from CVS:
* check/pipelines/simple_launch_lines.c: (run_pipeline):
Small update, use API as stated in design docs.
* examples/seeking/seek.c: (make_avi_msmpeg4v3_mp3_pipeline),
(update_scale), (do_seek), (seek_cb), (set_update_scale),
(start_seek), (stop_seek), (play_cb), (pause_cb), (stop_cb),
(message_received), (main):
Updated seek example for GOption. Some usability improvements.
2005-10-10 16:26:40 +00:00
|
|
|
gtk_window_set_default_size (GTK_WINDOW (window), 250, 96);
|
2008-06-24 16:05:06 +00:00
|
|
|
/* FIXME: can we avoid this for audio only? */
|
|
|
|
gtk_widget_set_size_request (GTK_WIDGET (video_window), -1,
|
|
|
|
DEFAULT_VIDEO_HEIGHT);
|
2002-05-28 20:30:11 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
2008-06-24 16:05:06 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), video_window, TRUE, TRUE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
|
2002-05-28 20:30:11 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), play_button, FALSE, FALSE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), pause_button, FALSE, FALSE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), stop_button, FALSE, FALSE, 2);
|
2006-09-18 11:40:14 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), flagtable, FALSE, FALSE, 2);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), accurate_checkbox, 0, 1, 0,
|
|
|
|
1);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), flush_checkbox, 1, 2, 0, 1);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), loop_checkbox, 2, 3, 0, 1);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), key_checkbox, 0, 1, 1, 2);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), scrub_checkbox, 1, 2, 1, 2);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), play_scrub_checkbox, 2, 3,
|
|
|
|
1, 2);
|
2008-12-11 10:28:43 +00:00
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), skip_checkbox, 3, 4, 0, 1);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), rate_label, 4, 5, 0, 1);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (flagtable), rate_spinbutton, 4, 5, 1,
|
2006-10-07 18:35:39 +00:00
|
|
|
2);
|
gst/playback/: Add screenshot conversion code from totem.
Original commit message from CVS:
* gst/playback/Makefile.am:
* gst/playback/gstscreenshot.c: (feed_fakesrc), (save_result),
(create_element), (gst_play_frame_conv_convert):
* gst/playback/gstscreenshot.h:
Add screenshot conversion code from totem.
* gst/playback/gstplay-marshal.list:
* gst/playback/gstplaybin2.c: (gst_play_marshal_BUFFER__BOXED),
(gst_play_bin_class_init), (gst_play_bin_convert_frame),
(gst_play_bin_get_property), (no_more_pads_cb), (activate_group):
Implement frame property to get a color-unconverted snapshot.
Implement convert-frame action signal to get a converted snapshot image.
Configure connection speed in uridecodebin.
Document some more properties.
* gst/playback/gstplaysink.c: (gst_play_sink_class_init),
(gen_video_chain), (gen_audio_chain), (gst_play_sink_reconfigure),
(gst_play_sink_get_last_frame):
* gst/playback/gstplaysink.h:
Use last-buffer property of the video sink to get a video snapshot.
* tests/examples/seek/seek.c: (shot_cb), (main):
Add snapshot button for playbin2 and use the frame property to save the
frame as a png in the current directory.
2008-02-19 15:02:33 +00:00
|
|
|
if (panel && boxes && boxes2) {
|
2009-05-18 09:08:56 +00:00
|
|
|
expander = gtk_expander_new ("playbin2 options");
|
|
|
|
pb2vbox = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (pb2vbox), panel, FALSE, FALSE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (pb2vbox), boxes, FALSE, FALSE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (pb2vbox), boxes2, FALSE, FALSE, 2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (expander), pb2vbox);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), expander, FALSE, FALSE, 2);
|
gst/playback/gstplaybin2.c: Remove stream-info, we going for something easier.
Original commit message from CVS:
* gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
(get_group), (get_n_pads), (gst_play_bin_get_property),
(pad_added_cb), (no_more_pads_cb), (perform_eos),
(autoplug_select_cb), (deactivate_group):
Remove stream-info, we going for something easier.
Refactor getting the current group.
Implement getting the number of audio/video/text streams.
* gst/playback/gststreamselector.c:
(gst_stream_selector_class_init), (gst_stream_selector_init),
(gst_stream_selector_get_property),
(gst_stream_selector_request_new_pad),
(gst_stream_selector_release_pad):
* gst/playback/gststreamselector.h:
Add property for number of pads.
* tests/examples/seek/seek.c: (set_scale), (update_flag),
(vis_toggle_cb), (audio_toggle_cb), (video_toggle_cb),
(text_toggle_cb), (update_streams), (msg_async_done),
(msg_state_changed), (main):
Block slider callback when updating the slider position.
Add gui elements for controlling playbin2.
Add callback for async_done that updates position/duration.
2008-02-01 16:44:21 +00:00
|
|
|
}
|
2009-06-01 09:31:49 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), step, FALSE, FALSE, 2);
|
2008-06-24 16:05:06 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hscale, FALSE, FALSE, 2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), statusbar, FALSE, FALSE, 2);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
/* connect things ... */
|
2004-03-14 22:34:34 +00:00
|
|
|
g_signal_connect (G_OBJECT (play_button), "clicked", G_CALLBACK (play_cb),
|
|
|
|
pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (pause_button), "clicked", G_CALLBACK (pause_cb),
|
|
|
|
pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (stop_button), "clicked", G_CALLBACK (stop_cb),
|
|
|
|
pipeline);
|
2005-11-13 13:53:26 +00:00
|
|
|
g_signal_connect (G_OBJECT (accurate_checkbox), "toggled",
|
|
|
|
G_CALLBACK (accurate_toggle_cb), pipeline);
|
|
|
|
g_signal_connect (G_OBJECT (key_checkbox), "toggled",
|
|
|
|
G_CALLBACK (key_toggle_cb), pipeline);
|
2005-11-16 10:54:45 +00:00
|
|
|
g_signal_connect (G_OBJECT (loop_checkbox), "toggled",
|
|
|
|
G_CALLBACK (loop_toggle_cb), pipeline);
|
2005-12-12 13:03:50 +00:00
|
|
|
g_signal_connect (G_OBJECT (flush_checkbox), "toggled",
|
|
|
|
G_CALLBACK (flush_toggle_cb), pipeline);
|
2006-03-22 12:28:36 +00:00
|
|
|
g_signal_connect (G_OBJECT (scrub_checkbox), "toggled",
|
|
|
|
G_CALLBACK (scrub_toggle_cb), pipeline);
|
2006-08-24 11:18:56 +00:00
|
|
|
g_signal_connect (G_OBJECT (play_scrub_checkbox), "toggled",
|
|
|
|
G_CALLBACK (play_scrub_toggle_cb), pipeline);
|
2008-12-11 10:28:43 +00:00
|
|
|
g_signal_connect (G_OBJECT (skip_checkbox), "toggled",
|
|
|
|
G_CALLBACK (skip_toggle_cb), pipeline);
|
2006-10-07 18:35:39 +00:00
|
|
|
g_signal_connect (G_OBJECT (rate_spinbutton), "value_changed",
|
|
|
|
G_CALLBACK (rate_spinbutton_changed_cb), pipeline);
|
2005-11-13 13:53:26 +00:00
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
g_signal_connect (G_OBJECT (window), "delete-event", delete_event_cb, NULL);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
|
|
|
/* show the gui. */
|
|
|
|
gtk_widget_show_all (window);
|
|
|
|
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
if (verbose) {
|
|
|
|
g_signal_connect (pipeline, "deep_notify",
|
2005-03-31 09:43:49 +00:00
|
|
|
G_CALLBACK (gst_object_default_deep_notify), NULL);
|
examples/seeking/seek.c: Added playbin seeking example.
Original commit message from CVS:
* examples/seeking/seek.c: (make_dv_pipeline), (make_avi_pipeline),
(make_mpeg_pipeline), (make_mpegnt_pipeline),
(make_playerbin_pipeline), (query_durations_elems),
(query_durations_pads), (query_positions_elems),
(query_positions_pads), (update_scale), (iterate), (stop_seek),
(main):
Added playbin seeking example.
2004-07-08 15:43:24 +00:00
|
|
|
}
|
2008-02-08 14:34:41 +00:00
|
|
|
|
|
|
|
connect_bus_signals (pipeline);
|
2002-05-28 20:30:11 +00:00
|
|
|
gtk_main ();
|
|
|
|
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("NULL pipeline\n");
|
2002-12-26 22:53:36 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
|
2005-05-09 10:56:13 +00:00
|
|
|
g_print ("free pipeline\n");
|
2005-06-28 10:16:13 +00:00
|
|
|
gst_object_unref (pipeline);
|
2002-05-28 20:30:11 +00:00
|
|
|
|
2008-06-24 16:05:06 +00:00
|
|
|
g_list_foreach (paths, (GFunc) g_free, NULL);
|
|
|
|
g_list_free (paths);
|
|
|
|
|
2002-05-28 20:30:11 +00:00
|
|
|
return 0;
|
|
|
|
}
|