/* GStreamer
*
- * seek.c: seeking sample application
+ * playback-test.c: playback sample application
*
* Copyright (C) 2005 Wim Taymans <wim@fluendo.com>
* 2006 Stefan Kost <ensonic@users.sf.net>
#include <gst/interfaces/navigation.h>
#include <gst/interfaces/colorbalance.h>
-GST_DEBUG_CATEGORY_STATIC (seek_debug);
-#define GST_CAT_DEFAULT (seek_debug)
+GST_DEBUG_CATEGORY_STATIC (playback_debug);
+#define GST_CAT_DEFAULT (playback_debug)
/* Copied from gst-plugins-base/gst/playback/gstplay-enum.h */
typedef enum
const GstFormatDefinition *seek_format;
GList *formats;
-} SeekApp;
+} PlaybackApp;
-static void clear_streams (SeekApp * app);
-static void find_interface_elements (SeekApp * app);
+static void clear_streams (PlaybackApp * app);
+static void find_interface_elements (PlaybackApp * app);
static void volume_notify_cb (GstElement * pipeline, GParamSpec * arg,
- SeekApp * app);
+ PlaybackApp * app);
static void mute_notify_cb (GstElement * pipeline, GParamSpec * arg,
- SeekApp * app);
-
-static void video_sink_activate_cb (GtkEntry * entry, SeekApp * app);
-static void text_sink_activate_cb (GtkEntry * entry, SeekApp * app);
-static void audio_sink_activate_cb (GtkEntry * entry, SeekApp * app);
-static void buffer_size_activate_cb (GtkEntry * entry, SeekApp * app);
-static void buffer_duration_activate_cb (GtkEntry * entry, SeekApp * app);
-static void ringbuffer_maxsize_activate_cb (GtkEntry * entry, SeekApp * app);
-static void connection_speed_activate_cb (GtkEntry * entry, SeekApp * app);
-static void av_offset_activate_cb (GtkEntry * entry, SeekApp * app);
-static void subtitle_encoding_activate_cb (GtkEntry * entry, SeekApp * app);
+ PlaybackApp * app);
+
+static void video_sink_activate_cb (GtkEntry * entry, PlaybackApp * app);
+static void text_sink_activate_cb (GtkEntry * entry, PlaybackApp * app);
+static void audio_sink_activate_cb (GtkEntry * entry, PlaybackApp * app);
+static void buffer_size_activate_cb (GtkEntry * entry, PlaybackApp * app);
+static void buffer_duration_activate_cb (GtkEntry * entry, PlaybackApp * app);
+static void ringbuffer_maxsize_activate_cb (GtkEntry * entry,
+ PlaybackApp * app);
+static void connection_speed_activate_cb (GtkEntry * entry, PlaybackApp * app);
+static void av_offset_activate_cb (GtkEntry * entry, PlaybackApp * app);
+static void subtitle_encoding_activate_cb (GtkEntry * entry, PlaybackApp * app);
/* pipeline construction */
}
static void
-make_playbin2_pipeline (SeekApp * app, const gchar * location)
+make_playbin2_pipeline (PlaybackApp * app, const gchar * location)
{
GstElement *pipeline;
#ifndef GST_DISABLE_PARSE
static void
-make_parselaunch_pipeline (SeekApp * app, const gchar * description)
+make_parselaunch_pipeline (PlaybackApp * app, const gchar * description)
{
app->pipeline = gst_parse_launch (description, NULL);
}
typedef struct
{
const gchar *name;
- void (*func) (SeekApp * app, const gchar * location);
+ void (*func) (PlaybackApp * app, const gchar * location);
}
Pipeline;
/* ui callbacks and helpers */
static gchar *
-format_value (GtkScale * scale, gdouble value, SeekApp * app)
+format_value (GtkScale * scale, gdouble value, PlaybackApp * app)
{
gint64 real;
gint64 seconds;
};
static void
-query_positions (SeekApp * app)
+query_positions (PlaybackApp * app)
{
gint i = 0;
}
static gboolean start_seek (GtkRange * range, GdkEventButton * event,
- SeekApp * app);
+ PlaybackApp * app);
static gboolean stop_seek (GtkRange * range, GdkEventButton * event,
- SeekApp * app);
-static void seek_cb (GtkRange * range, SeekApp * app);
+ PlaybackApp * app);
+static void seek_cb (GtkRange * range, PlaybackApp * app);
static void
-set_scale (SeekApp * app, gdouble value)
+set_scale (PlaybackApp * app, gdouble value)
{
g_signal_handlers_block_by_func (app->seek_scale, start_seek, app);
g_signal_handlers_block_by_func (app->seek_scale, stop_seek, app);
}
static gboolean
-update_fill (SeekApp * app)
+update_fill (PlaybackApp * app)
{
GstQuery *query;
}
static gboolean
-update_scale (SeekApp * app)
+update_scale (PlaybackApp * app)
{
GstFormat format = GST_FORMAT_TIME;
gint64 seek_pos, seek_dur;
return TRUE;
}
-static void set_update_scale (SeekApp * app, gboolean active);
-static void set_update_fill (SeekApp * app, gboolean active);
+static void set_update_scale (PlaybackApp * app, gboolean active);
+static void set_update_fill (PlaybackApp * app, gboolean active);
static gboolean
-end_scrub (SeekApp * app)
+end_scrub (PlaybackApp * app)
{
GST_DEBUG ("end scrub, PAUSE");
gst_element_set_state (app->pipeline, GST_STATE_PAUSED);
}
static gboolean
-send_event (SeekApp * app, GstEvent * event)
+send_event (PlaybackApp * app, GstEvent * event)
{
gboolean res = FALSE;
}
static void
-do_seek (SeekApp * app, GstFormat format, gint64 position)
+do_seek (PlaybackApp * app, GstFormat format, gint64 position)
{
gboolean res = FALSE;
GstEvent *s_event;
}
static void
-seek_cb (GtkRange * range, SeekApp * app)
+seek_cb (GtkRange * range, PlaybackApp * app)
{
gint64 real;
/* If the timer hasn't expired yet, then the pipeline is running */
}
static void
-advanced_seek_button_cb (GtkButton * button, SeekApp * app)
+advanced_seek_button_cb (GtkButton * button, PlaybackApp * app)
{
GstFormat fmt;
gint64 pos;
}
static void
-set_update_fill (SeekApp * app, gboolean active)
+set_update_fill (PlaybackApp * app, gboolean active)
{
GST_DEBUG ("fill scale is %d", active);
}
static void
-set_update_scale (SeekApp * app, gboolean active)
+set_update_scale (PlaybackApp * app, gboolean active)
{
GST_DEBUG ("update scale is %d", active);
}
static gboolean
-start_seek (GtkRange * range, GdkEventButton * event, SeekApp * app)
+start_seek (GtkRange * range, GdkEventButton * event, PlaybackApp * app)
{
if (event->type != GDK_BUTTON_PRESS)
return FALSE;
}
static gboolean
-stop_seek (GtkRange * range, GdkEventButton * event, SeekApp * app)
+stop_seek (GtkRange * range, GdkEventButton * event, PlaybackApp * app)
{
if (app->changed_id) {
g_signal_handler_disconnect (app->seek_scale, app->changed_id);
}
static void
-play_cb (GtkButton * button, SeekApp * app)
+play_cb (GtkButton * button, PlaybackApp * app)
{
GstStateChangeReturn ret;
}
static void
-pause_cb (GtkButton * button, SeekApp * app)
+pause_cb (GtkButton * button, PlaybackApp * app)
{
g_static_mutex_lock (&app->state_mutex);
if (app->state != GST_STATE_PAUSED) {
}
static void
-stop_cb (GtkButton * button, SeekApp * app)
+stop_cb (GtkButton * button, PlaybackApp * app)
{
if (app->state != STOP_STATE) {
GstStateChangeReturn ret;
}
static void
-accurate_toggle_cb (GtkToggleButton * button, SeekApp * app)
+accurate_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
app->accurate_seek = gtk_toggle_button_get_active (button);
}
static void
-key_toggle_cb (GtkToggleButton * button, SeekApp * app)
+key_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
app->keyframe_seek = gtk_toggle_button_get_active (button);
}
static void
-loop_toggle_cb (GtkToggleButton * button, SeekApp * app)
+loop_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
app->loop_seek = gtk_toggle_button_get_active (button);
if (app->state == GST_STATE_PLAYING) {
}
static void
-flush_toggle_cb (GtkToggleButton * button, SeekApp * app)
+flush_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
app->flush_seek = gtk_toggle_button_get_active (button);
}
static void
-scrub_toggle_cb (GtkToggleButton * button, SeekApp * app)
+scrub_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
app->scrub = gtk_toggle_button_get_active (button);
}
static void
-play_scrub_toggle_cb (GtkToggleButton * button, SeekApp * app)
+play_scrub_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
app->play_scrub = gtk_toggle_button_get_active (button);
}
static void
-skip_toggle_cb (GtkToggleButton * button, SeekApp * app)
+skip_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
app->skip_seek = gtk_toggle_button_get_active (button);
if (app->state == GST_STATE_PLAYING) {
}
static void
-rate_spinbutton_changed_cb (GtkSpinButton * button, SeekApp * app)
+rate_spinbutton_changed_cb (GtkSpinButton * button, PlaybackApp * app)
{
gboolean res = FALSE;
GstEvent *s_event;
}
static void
-vis_toggle_cb (GtkToggleButton * button, SeekApp * app)
+vis_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-audio_toggle_cb (GtkToggleButton * button, SeekApp * app)
+audio_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-video_toggle_cb (GtkToggleButton * button, SeekApp * app)
+video_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-text_toggle_cb (GtkToggleButton * button, SeekApp * app)
+text_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-mute_toggle_cb (GtkToggleButton * button, SeekApp * app)
+mute_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean mute;
}
static void
-download_toggle_cb (GtkToggleButton * button, SeekApp * app)
+download_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-buffering_toggle_cb (GtkToggleButton * button, SeekApp * app)
+buffering_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-soft_volume_toggle_cb (GtkToggleButton * button, SeekApp * app)
+soft_volume_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-native_audio_toggle_cb (GtkToggleButton * button, SeekApp * app)
+native_audio_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-native_video_toggle_cb (GtkToggleButton * button, SeekApp * app)
+native_video_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-deinterlace_toggle_cb (GtkToggleButton * button, SeekApp * app)
+deinterlace_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-soft_colorbalance_toggle_cb (GtkToggleButton * button, SeekApp * app)
+soft_colorbalance_toggle_cb (GtkToggleButton * button, PlaybackApp * app)
{
gboolean state;
}
static void
-clear_streams (SeekApp * app)
+clear_streams (PlaybackApp * app)
{
gint i;
}
static void
-update_streams (SeekApp * app)
+update_streams (PlaybackApp * app)
{
gint i;
}
static void
-video_combo_cb (GtkComboBox * combo, SeekApp * app)
+video_combo_cb (GtkComboBox * combo, PlaybackApp * app)
{
gint active;
}
static void
-audio_combo_cb (GtkComboBox * combo, SeekApp * app)
+audio_combo_cb (GtkComboBox * combo, PlaybackApp * app)
{
gint active;
}
static void
-text_combo_cb (GtkComboBox * combo, SeekApp * app)
+text_combo_cb (GtkComboBox * combo, PlaybackApp * app)
{
gint active;
}
static void
-init_visualization_features (SeekApp * app)
+init_visualization_features (PlaybackApp * app)
{
GList *list, *walk;
}
static void
-vis_combo_cb (GtkComboBox * combo, SeekApp * app)
+vis_combo_cb (GtkComboBox * combo, PlaybackApp * app)
{
guint index;
VisEntry *entry;
}
static void
-volume_spinbutton_changed_cb (GtkSpinButton * button, SeekApp * app)
+volume_spinbutton_changed_cb (GtkSpinButton * button, PlaybackApp * app)
{
gdouble volume;
}
static gboolean
-volume_notify_idle_cb (SeekApp * app)
+volume_notify_idle_cb (PlaybackApp * app)
{
gdouble cur_volume, new_volume;
}
static void
-volume_notify_cb (GstElement * pipeline, GParamSpec * arg, SeekApp * app)
+volume_notify_cb (GstElement * pipeline, GParamSpec * arg, PlaybackApp * app)
{
/* Do this from the main thread */
g_idle_add ((GSourceFunc) volume_notify_idle_cb, app);
}
static gboolean
-mute_notify_idle_cb (SeekApp * app)
+mute_notify_idle_cb (PlaybackApp * app)
{
gboolean cur_mute, new_mute;
}
static void
-mute_notify_cb (GstElement * pipeline, GParamSpec * arg, SeekApp * app)
+mute_notify_cb (GstElement * pipeline, GParamSpec * arg, PlaybackApp * app)
{
/* Do this from the main thread */
g_idle_add ((GSourceFunc) mute_notify_idle_cb, app);
}
static void
-shot_cb (GtkButton * button, SeekApp * app)
+shot_cb (GtkButton * button, PlaybackApp * app)
{
GstBuffer *buffer;
GstCaps *caps;
/* called when the Step button is pressed */
static void
-step_cb (GtkButton * button, SeekApp * app)
+step_cb (GtkButton * button, PlaybackApp * app)
{
GstEvent *event;
GstFormat format;
}
static void
-message_received (GstBus * bus, GstMessage * message, SeekApp * app)
+message_received (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
const GstStructure *s;
}
static void
-do_shuttle (SeekApp * app)
+do_shuttle (PlaybackApp * app)
{
guint64 duration;
}
static void
-msg_sync_step_done (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_sync_step_done (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
GstFormat format;
guint64 amount;
}
static void
-shuttle_toggled (GtkToggleButton * button, SeekApp * app)
+shuttle_toggled (GtkToggleButton * button, PlaybackApp * app)
{
gboolean active;
}
static void
-shuttle_rate_switch (SeekApp * app)
+shuttle_rate_switch (PlaybackApp * app)
{
GstSeekFlags flags;
GstEvent *s_event;
}
static void
-shuttle_value_changed (GtkRange * range, SeekApp * app)
+shuttle_value_changed (GtkRange * range, PlaybackApp * app)
{
gdouble rate;
}
static void
-colorbalance_value_changed (GtkRange * range, SeekApp * app)
+colorbalance_value_changed (GtkRange * range, PlaybackApp * app)
{
const gchar *label;
gdouble val;
}
static void
-seek_format_changed_cb (GtkComboBox * box, SeekApp * app)
+seek_format_changed_cb (GtkComboBox * box, PlaybackApp * app)
{
gchar *format_str;
GList *l;
}
static void
-update_formats (SeekApp * app)
+update_formats (PlaybackApp * app)
{
GstIterator *it;
gboolean done;
}
static void
-msg_async_done (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_async_done (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
GST_DEBUG ("async done");
}
static void
-msg_state_changed (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_state_changed (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
const GstStructure *s;
}
static void
-msg_segment_done (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_segment_done (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
GstEvent *s_event;
GstSeekFlags flags;
/* in stream buffering mode we PAUSE the pipeline until we receive a 100%
* message */
static void
-do_stream_buffering (SeekApp * app, gint percent)
+do_stream_buffering (PlaybackApp * app, gint percent)
{
gchar *bufstr;
}
static void
-do_download_buffering (SeekApp * app, gint percent)
+do_download_buffering (PlaybackApp * app, gint percent)
{
if (!app->buffering && percent < 100) {
gchar *bufstr;
}
static void
-msg_buffering (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_buffering (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
gint percent;
}
static void
-msg_clock_lost (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_clock_lost (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
g_print ("clock lost! PAUSE and PLAY to select a new clock\n");
if (app->state == GST_STATE_PLAYING) {
}
static void
-find_interface_elements (SeekApp * app)
+find_interface_elements (PlaybackApp * app)
{
GstIterator *it;
gpointer item;
/* called when Navigation command button is pressed */
static void
-navigation_cmd_cb (GtkButton * button, SeekApp * app)
+navigation_cmd_cb (GtkButton * button, PlaybackApp * app)
{
GstNavigationCommand cmd = GST_NAVIGATION_COMMAND_INVALID;
gint i;
* or gconfvideosink may be used which create the actual videosink only once
* the pipeline is started) */
static GstBusSyncReply
-bus_sync_handler (GstBus * bus, GstMessage * message, SeekApp * app)
+bus_sync_handler (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
if ((GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT) &&
gst_structure_has_name (message->structure, "prepare-xwindow-id")) {
#endif
static gboolean
-draw_cb (GtkWidget * widget, cairo_t * cr, SeekApp * app)
+draw_cb (GtkWidget * widget, cairo_t * cr, PlaybackApp * app)
{
if (app->state < GST_STATE_PAUSED) {
int width, height;
}
static void
-realize_cb (GtkWidget * widget, SeekApp * app)
+realize_cb (GtkWidget * widget, PlaybackApp * app)
{
GdkWindow *window = gtk_widget_get_window (widget);
}
static gboolean
-button_press_cb (GtkWidget * widget, GdkEventButton * event, SeekApp * app)
+button_press_cb (GtkWidget * widget, GdkEventButton * event, PlaybackApp * app)
{
gtk_widget_grab_focus (widget);
}
static gboolean
-button_release_cb (GtkWidget * widget, GdkEventButton * event, SeekApp * app)
+button_release_cb (GtkWidget * widget, GdkEventButton * event,
+ PlaybackApp * app)
{
if (app->navigation_element)
gst_navigation_send_mouse_event (GST_NAVIGATION (app->navigation_element),
}
static gboolean
-key_press_cb (GtkWidget * widget, GdkEventKey * event, SeekApp * app)
+key_press_cb (GtkWidget * widget, GdkEventKey * event, PlaybackApp * app)
{
if (app->navigation_element)
gst_navigation_send_key_event (GST_NAVIGATION (app->navigation_element),
}
static gboolean
-key_release_cb (GtkWidget * widget, GdkEventKey * event, SeekApp * app)
+key_release_cb (GtkWidget * widget, GdkEventKey * event, PlaybackApp * app)
{
if (app->navigation_element)
gst_navigation_send_key_event (GST_NAVIGATION (app->navigation_element),
}
static gboolean
-motion_notify_cb (GtkWidget * widget, GdkEventMotion * event, SeekApp * app)
+motion_notify_cb (GtkWidget * widget, GdkEventMotion * event, PlaybackApp * app)
{
if (app->navigation_element)
gst_navigation_send_mouse_event (GST_NAVIGATION (app->navigation_element),
}
static void
-msg_eos (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_eos (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
message_received (bus, message, app);
}
static void
-msg_step_done (GstBus * bus, GstMessage * message, SeekApp * app)
+msg_step_done (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
if (!app->shuttling)
message_received (bus, message, app);
}
static void
-msg (GstBus * bus, GstMessage * message, SeekApp * app)
+msg (GstBus * bus, GstMessage * message, PlaybackApp * app)
{
GstNavigationMessageType nav_type;
}
static void
-connect_bus_signals (SeekApp * app)
+connect_bus_signals (PlaybackApp * app)
{
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (app->pipeline));
}
static void
-delete_event_cb (GtkWidget * widget, GdkEvent * event, SeekApp * app)
+delete_event_cb (GtkWidget * widget, GdkEvent * event, PlaybackApp * app)
{
stop_cb (NULL, app);
gtk_main_quit ();
}
static void
-video_sink_activate_cb (GtkEntry * entry, SeekApp * app)
+video_sink_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
GstElement *sink = NULL;
const gchar *text;
}
static void
-audio_sink_activate_cb (GtkEntry * entry, SeekApp * app)
+audio_sink_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
GstElement *sink = NULL;
const gchar *text;
}
static void
-text_sink_activate_cb (GtkEntry * entry, SeekApp * app)
+text_sink_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
GstElement *sink = NULL;
const gchar *text;
}
static void
-buffer_size_activate_cb (GtkEntry * entry, SeekApp * app)
+buffer_size_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
const gchar *text;
}
static void
-buffer_duration_activate_cb (GtkEntry * entry, SeekApp * app)
+buffer_duration_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
const gchar *text;
}
static void
-ringbuffer_maxsize_activate_cb (GtkEntry * entry, SeekApp * app)
+ringbuffer_maxsize_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
const gchar *text;
}
static void
-connection_speed_activate_cb (GtkEntry * entry, SeekApp * app)
+connection_speed_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
const gchar *text;
}
static void
-subtitle_encoding_activate_cb (GtkEntry * entry, SeekApp * app)
+subtitle_encoding_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
const gchar *text;
}
static void
-subtitle_fontdesc_cb (GtkFontButton * button, SeekApp * app)
+subtitle_fontdesc_cb (GtkFontButton * button, PlaybackApp * app)
{
const gchar *text;
}
static void
-av_offset_activate_cb (GtkEntry * entry, SeekApp * app)
+av_offset_activate_cb (GtkEntry * entry, PlaybackApp * app)
{
const gchar *text;
}
static void
-create_ui (SeekApp * app)
+create_ui (PlaybackApp * app)
{
GtkWidget *hbox, *vbox, *seek, *playbin, *step, *navigation, *colorbalance;
GtkWidget *play_button, *pause_button, *stop_button;
app->statusbar = gtk_statusbar_new ();
app->status_id =
- gtk_statusbar_get_context_id (GTK_STATUSBAR (app->statusbar), "seek");
+ gtk_statusbar_get_context_id (GTK_STATUSBAR (app->statusbar),
+ "playback-test");
gtk_statusbar_push (GTK_STATUSBAR (app->statusbar), app->status_id,
"Stopped");
hbox = gtk_hbox_new (FALSE, 0);
gtk_grid_set_column_spacing (GTK_GRID (flagtable), 2);
gtk_grid_set_column_homogeneous (GTK_GRID (flagtable), TRUE);
- accurate_checkbox = gtk_check_button_new_with_label ("Accurate Seek");
- key_checkbox = gtk_check_button_new_with_label ("Key-unit Seek");
+ accurate_checkbox = gtk_check_button_new_with_label ("Accurate Playback");
+ key_checkbox = gtk_check_button_new_with_label ("Key-unit Playback");
loop_checkbox = gtk_check_button_new_with_label ("Loop");
flush_checkbox = gtk_check_button_new_with_label ("Flush");
scrub_checkbox = gtk_check_button_new_with_label ("Scrub");
gtk_grid_attach (GTK_GRID (flagtable), rate_label, 4, 0, 1, 1);
gtk_grid_attach (GTK_GRID (flagtable), rate_spinbutton, 4, 1, 1, 1);
- advanced_seek = gtk_frame_new ("Advanced Seek");
+ advanced_seek = gtk_frame_new ("Advanced Playback");
advanced_seek_grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (advanced_seek_grid), 2);
gtk_grid_set_row_homogeneous (GTK_GRID (advanced_seek_grid), FALSE);
gtk_grid_attach (GTK_GRID (advanced_seek_grid), app->seek_entry, 0, 1, 1,
1);
- seek_button = gtk_button_new_with_label ("Seek");
+ seek_button = gtk_button_new_with_label ("Playback");
g_signal_connect (G_OBJECT (seek_button), "clicked",
G_CALLBACK (advanced_seek_button_cb), app);
gtk_grid_attach (GTK_GRID (advanced_seek_grid), seek_button, 1, 0, 1, 1);
}
static void
-set_defaults (SeekApp * app)
+set_defaults (PlaybackApp * app)
{
- memset (app, 0, sizeof (SeekApp));
+ memset (app, 0, sizeof (PlaybackApp));
app->flush_seek = TRUE;
app->scrub = TRUE;
}
static void
-reset_app (SeekApp * app)
+reset_app (PlaybackApp * app)
{
g_free (app->audiosink_str);
g_free (app->videosink_str);
int
main (int argc, char **argv)
{
- SeekApp app;
+ PlaybackApp app;
GOptionEntry options[] = {
{"stats", 's', 0, G_OPTION_ARG_NONE, &app.stats,
"Show pad stats", NULL},
g_thread_init (NULL);
#endif
- ctx = g_option_context_new ("- test seeking in gsteamer");
+ ctx = g_option_context_new ("- playback testing in gsteamer");
g_option_context_add_main_entries (ctx, options, NULL);
g_option_context_add_group (ctx, gst_init_get_option_group ());
g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
exit (1);
}
- GST_DEBUG_CATEGORY_INIT (seek_debug, "seek", 0, "seek example");
+ GST_DEBUG_CATEGORY_INIT (playback_debug, "playback-test", 0,
+ "playback example");
if (argc < 3) {
print_usage (argc, argv);