don't mix tabs and spaces

Original commit message from CVS:
don't mix tabs and spaces
parent d07ec45f
2004-03-15 Thomas Vander Stichele <thomas at apestaart dot org>
* *.c, *.cc: don't mix tabs and spaces
2004-03-15 Thomas Vander Stichele <thomas at apestaart dot org> 2004-03-15 Thomas Vander Stichele <thomas at apestaart dot org>
* gst-libs/gst/play/play.c: (gst_play_pipeline_setup): * gst-libs/gst/play/play.c: (gst_play_pipeline_setup):
......
...@@ -72,7 +72,7 @@ main (gint argc, gchar * argv[]) ...@@ -72,7 +72,7 @@ main (gint argc, gchar * argv[])
/* force RGB data passing between colorspace and xvideosink */ /* force RGB data passing between colorspace and xvideosink */
res = gst_element_link_filtered (colorspace, "src", xvideosink, "sink", res = gst_element_link_filtered (colorspace, "src", xvideosink, "sink",
GST_CAPS_NEW ("filtercaps", GST_CAPS_NEW ("filtercaps",
"video/raw", "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB ")) "video/raw", "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB "))
)); ));
if (!res) { if (!res) {
g_print ("could not connect colorspace and xvideosink\n"); g_print ("could not connect colorspace and xvideosink\n");
......
...@@ -15,17 +15,17 @@ ...@@ -15,17 +15,17 @@
/* filter UI data */ /* filter UI data */
struct _filter_ui struct _filter_ui
{ {
GtkWidget *window; /* top-level interface window */ GtkWidget *window; /* top-level interface window */
GtkWidget *buttons; /* all of the control buttons */ GtkWidget *buttons; /* all of the control buttons */
GtkWidget *parse, *play, *stop; /* control buttons */ GtkWidget *parse, *play, *stop; /* control buttons */
GtkWidget *feedback; /* here's where we'll tell you stuff */ GtkWidget *feedback; /* here's where we'll tell you stuff */
GtkTextBuffer *fb_buffer; /* feedback buffer */ GtkTextBuffer *fb_buffer; /* feedback buffer */
GtkWidget *selection; /* the place to input element stuff */ GtkWidget *selection; /* the place to input element stuff */
GtkWidget *input, *filter, *output; /* the selection widgets */ GtkWidget *input, *filter, *output; /* the selection widgets */
GtkWidget *control; /* the dynamically generated control UI */ GtkWidget *control; /* the dynamically generated control UI */
}; };
typedef struct _filter_ui _filter_ui_t; typedef struct _filter_ui _filter_ui_t;
...@@ -33,13 +33,13 @@ typedef struct _filter_ui _filter_ui_t; ...@@ -33,13 +33,13 @@ typedef struct _filter_ui _filter_ui_t;
/* back-end data */ /* back-end data */
struct _filter_data struct _filter_data
{ {
_filter_ui_t *ui; /* the UI data */ _filter_ui_t *ui; /* the UI data */
gchar *input_pipe, *output_pipe, *filter_element; gchar *input_pipe, *output_pipe, *filter_element;
gchar *pipe_string; gchar *pipe_string;
GList *filter_choices; GList *filter_choices;
gboolean playing; gboolean playing;
GstElement *input, *output; /* these are in and out bins */ GstElement *input, *output; /* these are in and out bins */
GstElement *pipeline; GstElement *pipeline;
GstElement *filter; GstElement *filter;
}; };
...@@ -75,21 +75,21 @@ gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction, ...@@ -75,21 +75,21 @@ gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction,
while (pads) { while (pads) {
/* check if the direction matches */ /* check if the direction matches */
if (GST_PAD_DIRECTION (GST_PAD (pads->data)) == direction) { if (GST_PAD_DIRECTION (GST_PAD (pads->data)) == direction) {
if (GST_PAD_PEER (GST_PAD (pads->data)) == NULL) { if (GST_PAD_PEER (GST_PAD (pads->data)) == NULL) {
/* found it ! */ /* found it ! */
g_print ("DEBUG: found an unconnected pad !\n"); g_print ("DEBUG: found an unconnected pad !\n");
pad = GST_PAD (pads->data); pad = GST_PAD (pads->data);
} }
} }
if (pad) if (pad)
break; /* found one already */ break; /* found one already */
pads = g_list_next (pads); pads = g_list_next (pads);
} }
elements = g_list_next (elements); elements = g_list_next (elements);
} }
g_print ("DEBUG: find_unconnected stop\n"); g_print ("DEBUG: find_unconnected stop\n");
if (pad == NULL) /* we didn't find it at all */ if (pad == NULL) /* we didn't find it at all */
return NULL; return NULL;
pad = gst_ghost_pad_new (name, pad); pad = gst_ghost_pad_new (name, pad);
...@@ -157,37 +157,37 @@ ui_control_create (GstElement * element, GtkWidget * control, _filter_ui_t * ui) ...@@ -157,37 +157,37 @@ ui_control_create (GstElement * element, GtkWidget * control, _filter_ui_t * ui)
gtk_container_add (GTK_CONTAINER (hbox), widget); gtk_container_add (GTK_CONTAINER (hbox), widget);
gtk_widget_show (widget); gtk_widget_show (widget);
switch (G_PARAM_SPEC_VALUE_TYPE (specs[i])) { switch (G_PARAM_SPEC_VALUE_TYPE (specs[i])) {
case G_TYPE_INT64: case G_TYPE_INT64:
widget = gtk_hscale_new_with_range ( widget = gtk_hscale_new_with_range (
(gdouble) (((GParamSpecInt64 *) specs[i])->minimum), (gdouble) (((GParamSpecInt64 *) specs[i])->minimum),
(gdouble) (((GParamSpecInt64 *) specs[i])->maximum), 1.0); (gdouble) (((GParamSpecInt64 *) specs[i])->maximum), 1.0);
gtk_range_set_value (GTK_RANGE (widget), gtk_range_set_value (GTK_RANGE (widget),
(gdouble) ((GParamSpecInt64 *) specs[i])->default_value); (gdouble) ((GParamSpecInt64 *) specs[i])->default_value);
break; break;
case G_TYPE_INT: case G_TYPE_INT:
widget = gtk_hscale_new_with_range ( widget = gtk_hscale_new_with_range (
(gdouble) (((GParamSpecInt *) specs[i])->minimum), (gdouble) (((GParamSpecInt *) specs[i])->minimum),
(gdouble) (((GParamSpecInt *) specs[i])->maximum), 1.0); (gdouble) (((GParamSpecInt *) specs[i])->maximum), 1.0);
gtk_range_set_value (GTK_RANGE (widget), gtk_range_set_value (GTK_RANGE (widget),
(gdouble) ((GParamSpecInt *) specs[i])->default_value); (gdouble) ((GParamSpecInt *) specs[i])->default_value);
break; break;
case G_TYPE_FLOAT: case G_TYPE_FLOAT:
widget = gtk_hscale_new_with_range ( widget = gtk_hscale_new_with_range (
(gdouble) (((GParamSpecFloat *) specs[i])->minimum), (gdouble) (((GParamSpecFloat *) specs[i])->minimum),
(gdouble) (((GParamSpecFloat *) specs[i])->maximum), 0.00001); (gdouble) (((GParamSpecFloat *) specs[i])->maximum), 0.00001);
gtk_range_set_value (GTK_RANGE (widget), gtk_range_set_value (GTK_RANGE (widget),
(gdouble) ((GParamSpecFloat *) specs[i])->default_value); (gdouble) ((GParamSpecFloat *) specs[i])->default_value);
break; break;
} }
/* create the dparam object */ /* create the dparam object */
dparam = gst_dpsmooth_new (G_PARAM_SPEC_VALUE_TYPE (specs[i])); dparam = gst_dpsmooth_new (G_PARAM_SPEC_VALUE_TYPE (specs[i]));
g_object_set (G_OBJECT (dparam), "update_period", 2000000LL, NULL); g_object_set (G_OBJECT (dparam), "update_period", 2000000LL, NULL);
g_assert (gst_dpman_attach_dparam (dpman, g_assert (gst_dpman_attach_dparam (dpman,
(gchar *) g_param_spec_get_name (specs[i]), dparam)); (gchar *) g_param_spec_get_name (specs[i]), dparam));
gst_dpman_set_mode (dpman, "asynchronous"); gst_dpman_set_mode (dpman, "asynchronous");
g_signal_connect (widget, "value-changed", g_signal_connect (widget, "value-changed",
G_CALLBACK (cb_dynparm_value_changed), dparam); G_CALLBACK (cb_dynparm_value_changed), dparam);
cb_dynparm_value_changed (GTK_RANGE (widget), dparam); cb_dynparm_value_changed (GTK_RANGE (widget), dparam);
gtk_container_add (GTK_CONTAINER (hbox), widget); gtk_container_add (GTK_CONTAINER (hbox), widget);
...@@ -315,7 +315,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data) ...@@ -315,7 +315,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
fd->input = GST_ELEMENT (gst_parse_launch (fd->input_pipe, &error)); fd->input = GST_ELEMENT (gst_parse_launch (fd->input_pipe, &error));
if (error) { if (error) {
ui_feedback_add (fd->ui, "Error : parsing input pipeline : %s\n", ui_feedback_add (fd->ui, "Error : parsing input pipeline : %s\n",
error->message); error->message);
g_error_free (error); g_error_free (error);
return; return;
} }
...@@ -329,7 +329,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data) ...@@ -329,7 +329,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
fd->output = GST_ELEMENT (gst_parse_launch (fd->output_pipe, &error)); fd->output = GST_ELEMENT (gst_parse_launch (fd->output_pipe, &error));
if (error) { if (error) {
ui_feedback_add (fd->ui, "Error : parsing output pipeline : %s\n", ui_feedback_add (fd->ui, "Error : parsing output pipeline : %s\n",
error->message); error->message);
g_error_free (error); g_error_free (error);
return; return;
} }
...@@ -340,7 +340,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data) ...@@ -340,7 +340,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
fd->filter = gst_element_factory_make (fd->filter_element, "filter"); fd->filter = gst_element_factory_make (fd->filter_element, "filter");
if (fd->filter == NULL) { if (fd->filter == NULL) {
ui_feedback_add (fd->ui, "Error : could not create element %s\n", ui_feedback_add (fd->ui, "Error : could not create element %s\n",
fd->filter_element); fd->filter_element);
return; return;
} }
...@@ -359,14 +359,14 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data) ...@@ -359,14 +359,14 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
"source"); "source");
if (src_pad == NULL) { if (src_pad == NULL) {
ui_feedback_add (fd->ui, ui_feedback_add (fd->ui,
"Error : could not find an unconnected source pad !\n"); "Error : could not find an unconnected source pad !\n");
return; return;
} }
sink_pad = gst_bin_find_unconnected_pad (GST_BIN (fd->output), GST_PAD_SINK, sink_pad = gst_bin_find_unconnected_pad (GST_BIN (fd->output), GST_PAD_SINK,
"sink"); "sink");
if (sink_pad == NULL) { if (sink_pad == NULL) {
ui_feedback_add (fd->ui, ui_feedback_add (fd->ui,
"Error : could not find an unconnected sink pad !\n"); "Error : could not find an unconnected sink pad !\n");
return; return;
} }
gst_element_add_pad (fd->input, src_pad); gst_element_add_pad (fd->input, src_pad);
...@@ -417,8 +417,8 @@ init_data (_filter_data_t * fd) ...@@ -417,8 +417,8 @@ init_data (_filter_data_t * fd)
void void
create_ui (_filter_ui_t * fui, _filter_data_t * fd) create_ui (_filter_ui_t * fui, _filter_data_t * fd)
{ {
GtkWidget *widget; /* temporary widget */ GtkWidget *widget; /* temporary widget */
GtkWidget *vbox; /* temporary vbox */ GtkWidget *vbox; /* temporary vbox */
g_print ("DEBUG: creating top-level window\n"); g_print ("DEBUG: creating top-level window\n");
fui->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); fui->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
...@@ -480,7 +480,7 @@ create_ui (_filter_ui_t * fui, _filter_data_t * fd) ...@@ -480,7 +480,7 @@ create_ui (_filter_ui_t * fui, _filter_data_t * fd)
widget = gtk_label_new ("Output Pipe"); widget = gtk_label_new ("Output Pipe");
gtk_container_add (GTK_CONTAINER (vbox), widget); gtk_container_add (GTK_CONTAINER (vbox), widget);
fui->output = gtk_entry_new (); fui->output = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (fui->output), "osssink fragment=1572872"); /* fixme: gconf default ? */ gtk_entry_set_text (GTK_ENTRY (fui->output), "osssink fragment=1572872"); /* fixme: gconf default ? */
gtk_container_add (GTK_CONTAINER (vbox), fui->output); gtk_container_add (GTK_CONTAINER (vbox), fui->output);
gtk_container_add (GTK_CONTAINER (fui->selection), vbox); gtk_container_add (GTK_CONTAINER (fui->selection), vbox);
g_signal_connect (G_OBJECT (fui->output), "activate", g_signal_connect (G_OBJECT (fui->output), "activate",
......
...@@ -36,7 +36,7 @@ print_tag (const GstTagList * list, const gchar * tag, gpointer unused) ...@@ -36,7 +36,7 @@ print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
g_assert (gst_tag_list_get_string_index (list, tag, i, &str)); g_assert (gst_tag_list_get_string_index (list, tag, i, &str));
} else { } else {
str = str =
g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i)); g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));
} }
if (i == 0) { if (i == 0) {
......
...@@ -29,21 +29,21 @@ entry_added (GstIndex * index, GstIndexEntry * entry) ...@@ -29,21 +29,21 @@ entry_added (GstIndex * index, GstIndexEntry * entry)
switch (entry->type) { switch (entry->type) {
case GST_INDEX_ENTRY_ID: case GST_INDEX_ENTRY_ID:
g_print ("id %d describes writer %s\n", entry->id, g_print ("id %d describes writer %s\n", entry->id,
GST_INDEX_ID_DESCRIPTION (entry)); GST_INDEX_ID_DESCRIPTION (entry));
break; break;
case GST_INDEX_ENTRY_FORMAT: case GST_INDEX_ENTRY_FORMAT:
g_print ("%d: registered format %d for %s\n", entry->id, g_print ("%d: registered format %d for %s\n", entry->id,
GST_INDEX_FORMAT_FORMAT (entry), GST_INDEX_FORMAT_KEY (entry)); GST_INDEX_FORMAT_FORMAT (entry), GST_INDEX_FORMAT_KEY (entry));
break; break;
case GST_INDEX_ENTRY_ASSOCIATION: case GST_INDEX_ENTRY_ASSOCIATION:
{ {
gint i; gint i;
g_print ("%p, %d: %08x ", entry, entry->id, g_print ("%p, %d: %08x ", entry, entry->id,
GST_INDEX_ASSOC_FLAGS (entry)); GST_INDEX_ASSOC_FLAGS (entry));
for (i = 0; i < GST_INDEX_NASSOCS (entry); i++) { for (i = 0; i < GST_INDEX_NASSOCS (entry); i++) {
g_print ("%d %lld ", GST_INDEX_ASSOC_FORMAT (entry, i), g_print ("%d %lld ", GST_INDEX_ASSOC_FORMAT (entry, i),
GST_INDEX_ASSOC_VALUE (entry, i)); GST_INDEX_ASSOC_VALUE (entry, i));
} }
g_print ("\n"); g_print ("\n");
break; break;
...@@ -60,7 +60,8 @@ typedef struct ...@@ -60,7 +60,8 @@ typedef struct
GstElement *bin; GstElement *bin;
GstElement *pipeline; GstElement *pipeline;
GstIndex *index; GstIndex *index;
} dyn_link; }
dyn_link;
static void static void
dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer data) dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer data)
...@@ -205,18 +206,18 @@ main (gint argc, gchar * argv[]) ...@@ -205,18 +206,18 @@ main (gint argc, gchar * argv[])
GstElement *sink; GstElement *sink;
struct poptOption options[] = { struct poptOption options[] = {
{"verbose", 'v', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &verbose, 0, {"verbose", 'v', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &verbose, 0,
"Print index entries", NULL}, "Print index entries", NULL},
{"quiet", 'q', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &quiet, 0, {"quiet", 'q', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &quiet, 0,
"don't print progress bar", NULL}, "don't print progress bar", NULL},
POPT_TABLEEND POPT_TABLEEND
}; };
if (!gst_init_check_with_popt_table (&argc, &argv, options) || argc < 3) { if (!gst_init_check_with_popt_table (&argc, &argv, options) || argc < 3) {
g_print ("usage: %s [-v] <type> <filename> \n" g_print ("usage: %s [-v] <type> <filename> \n"
" type can be: 0 mpeg_systems\n" " type can be: 0 mpeg_systems\n"
" 1 mpeg_decoder\n" " 1 mpeg_decoder\n"
" -v : report added index entries\n" " -v : report added index entries\n"
" -q : don't print progress\n", argv[0]); " -q : don't print progress\n", argv[0]);
return -1; return -1;
} }
...@@ -225,7 +226,7 @@ main (gint argc, gchar * argv[]) ...@@ -225,7 +226,7 @@ main (gint argc, gchar * argv[])
if (index) { if (index) {
if (verbose) if (verbose)
g_signal_connect (G_OBJECT (index), "entry_added", g_signal_connect (G_OBJECT (index), "entry_added",
G_CALLBACK (entry_added), NULL); G_CALLBACK (entry_added), NULL);
g_object_set (G_OBJECT (index), "resolver", 1, NULL); g_object_set (G_OBJECT (index), "resolver", 1, NULL);
} }
...@@ -284,7 +285,7 @@ main (gint argc, gchar * argv[]) ...@@ -284,7 +285,7 @@ main (gint argc, gchar * argv[])
gst_index_get_writer_id (index, GST_OBJECT (src), &id); gst_index_get_writer_id (index, GST_OBJECT (src), &id);
entry = gst_index_get_assoc_entry (index, id, GST_INDEX_LOOKUP_BEFORE, 0, entry = gst_index_get_assoc_entry (index, id, GST_INDEX_LOOKUP_BEFORE, 0,
GST_FORMAT_TIME, G_MAXINT64); GST_FORMAT_TIME, G_MAXINT64);
g_assert (entry); g_assert (entry);
gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &result); gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &result);
total_tm = result * 60 / GST_SECOND; total_tm = result * 60 / GST_SECOND;
......
...@@ -29,7 +29,7 @@ get_position_info (GstElement * cdparanoia) ...@@ -29,7 +29,7 @@ get_position_info (GstElement * cdparanoia)
if (format == GST_FORMAT_TIME) { if (format == GST_FORMAT_TIME) {
position /= GST_SECOND; position /= GST_SECOND;
g_print ("%s: %lld:%02lld", definition->nick, position / 60, g_print ("%s: %lld:%02lld", definition->nick, position / 60,
position % 60); position % 60);
} else { } else {
g_print ("%s: %lld", definition->nick, position); g_print ("%s: %lld", definition->nick, position);
} }
...@@ -72,16 +72,16 @@ get_track_info (GstElement * cdparanoia) ...@@ -72,16 +72,16 @@ get_track_info (GstElement * cdparanoia)
res = gst_pad_query (pad, GST_QUERY_TOTAL, &format, &total); res = gst_pad_query (pad, GST_QUERY_TOTAL, &format, &total);
if (res) { if (res) {
if (format == GST_FORMAT_TIME) { if (format == GST_FORMAT_TIME) {
total /= GST_SECOND; total /= GST_SECOND;
g_print ("%s total: %lld:%02lld\n", definition->nick, total / 60, g_print ("%s total: %lld:%02lld\n", definition->nick, total / 60,
total % 60); total % 60);
} else } else
g_print ("%s total: %lld\n", definition->nick, total); g_print ("%s total: %lld\n", definition->nick, total);
if (format == track_format) if (format == track_format)
total_tracks = total; total_tracks = total;
else if (format == GST_FORMAT_TIME) else if (format == GST_FORMAT_TIME)
total_time = total; total_time = total;
} else } else
g_print ("failed to get %s total\n", definition->nick); g_print ("failed to get %s total\n", definition->nick);
...@@ -110,12 +110,12 @@ get_track_info (GstElement * cdparanoia) ...@@ -110,12 +110,12 @@ get_track_info (GstElement * cdparanoia)
/* for the first track (i==0) we wait until we have the /* for the first track (i==0) we wait until we have the
* time of the next track */ * time of the next track */
if (i > 0) { if (i > 0) {
gint64 length = time - time_count; gint64 length = time - time_count;
g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n", g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n",
i - 1, i - 1,
time_count / 60, time_count % 60, time_count / 60, time_count % 60,
time / 60, time % 60, length / 60, length % 60); time / 60, time % 60, length / 60, length % 60);
} }
} else { } else {
g_print ("could not get time for track %d\n", i); g_print ("could not get time for track %d\n", i);
......
...@@ -47,7 +47,8 @@ typedef struct ...@@ -47,7 +47,8 @@ typedef struct
{ {
const gchar *name; const gchar *name;
const GstFormat format; const GstFormat format;
} seek_format; }
seek_format;
static seek_format seek_formats[] = { static seek_format seek_formats[] = {
{"tim", GST_FORMAT_TIME}, {"tim", GST_FORMAT_TIME},
...@@ -76,9 +77,9 @@ query_durations () ...@@ -76,9 +77,9 @@ query_durations ()
format = seek_formats[i].format; format = seek_formats[i].format;
res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value); res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
if (res) { if (res) {
g_print ("%s %13lld | ", seek_formats[i].name, value); g_print ("%s %13lld | ", seek_formats[i].name, value);
} else { } else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
} }
i++; i++;
} }
...@@ -105,9 +106,9 @@ query_positions () ...@@ -105,9 +106,9 @@ query_positions ()
format = seek_formats[i].format; format = seek_formats[i].format;
res = gst_element_query (element, GST_QUERY_POSITION, &format, &value); res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
if (res) { if (res) {
g_print ("%s %13lld | ", seek_formats[i].name, value); g_print ("%s %13lld | ", seek_formats[i].name, value);
} else { } else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
} }
i++; i++;
} }
...@@ -137,7 +138,7 @@ update_scale (gpointer data) ...@@ -137,7 +138,7 @@ update_scale (gpointer data)
if (stats) { if (stats) {
if (clock) if (clock)
g_print ("clock: %13llu (%s)\n", position, g_print ("clock: %13llu (%s)\n", position,
gst_object_get_name (GST_OBJECT (clock))); gst_object_get_name (GST_OBJECT (clock)));
query_durations (); query_durations ();
query_positions (); query_positions ();
} }
...@@ -184,7 +185,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data) ...@@ -184,7 +185,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable)); g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable));
s_event = gst_event_new_seek (GST_FORMAT_TIME | s_event = gst_event_new_seek (GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, real); GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, real);
res = gst_element_send_event (seekable, s_event); res = gst_element_send_event (seekable, s_event);
...@@ -208,7 +209,7 @@ play_cb (GtkButton * button, gpointer data) ...@@ -208,7 +209,7 @@ play_cb (GtkButton * button, gpointer data)
if (!GST_FLAG_IS_SET (pipeline, GST_BIN_SELF_SCHEDULABLE)) if (!GST_FLAG_IS_SET (pipeline, GST_BIN_SELF_SCHEDULABLE))
gtk_idle_add ((GtkFunction) iterate, pipeline); gtk_idle_add ((GtkFunction) iterate, pipeline);
update_id = update_id =
gtk_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); gtk_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline);
} }
} }
...@@ -237,7 +238,7 @@ main (int argc, char **argv) ...@@ -237,7 +238,7 @@ main (int argc, char **argv)
*play_button, *pause_button, *stop_button, *hscale; *play_button, *pause_button, *stop_button, *hscale;
struct poptOption options[] = { struct poptOption options[] = {
{"stats", 's', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &stats, 0, {"stats", 's', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &stats, 0,
"Show element stats", NULL}, "Show element stats", NULL},
POPT_TABLEEND POPT_TABLEEND
}; };
......
...@@ -28,7 +28,8 @@ typedef struct ...@@ -28,7 +28,8 @@ typedef struct
const gchar *padname; const gchar *padname;
GstPad *target; GstPad *target;
GstElement *bin; GstElement *bin;
} dyn_link; }
dyn_link;
static GstElement * static GstElement *
gst_element_factory_make_or_warn (gchar * type, gchar * name) gst_element_factory_make_or_warn (gchar * type, gchar * name)
...@@ -372,7 +373,7 @@ make_avi_pipeline (const gchar * location) ...@@ -372,7 +373,7 @@ make_avi_pipeline (const gchar * location)
gst_element_set_state (audio_bin, GST_STATE_PAUSED); gst_element_set_state (audio_bin, GST_STATE_PAUSED);
setup_dynamic_link (demux, "audio_00", gst_element_get_pad (a_decoder, setup_dynamic_link (demux, "audio_00", gst_element_get_pad (a_decoder,
"sink"), audio_bin); "sink"), audio_bin);
seekable = gst_element_get_pad (a_queue, "src"); seekable = gst_element_get_pad (a_queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable); seekable_pads = g_list_prepend (seekable_pads, seekable);
...@@ -400,7 +401,7 @@ make_avi_pipeline (const gchar * location) ...@@ -400,7 +401,7 @@ make_avi_pipeline (const gchar * location)
gst_element_set_state (video_bin, GST_STATE_PAUSED); gst_element_set_state (video_bin, GST_STATE_PAUSED);
setup_dynamic_link (demux, "video_00", gst_element_get_pad (v_decoder, setup_dynamic_link (demux, "video_00", gst_element_get_pad (v_decoder,
"sink"), video_bin); "sink"), video_bin);
seekable = gst_element_get_pad (v_queue, "src"); seekable = gst_element_get_pad (v_queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable); seekable_pads = g_list_prepend (seekable_pads, seekable);
...@@ -448,7 +449,7 @@ make_mpeg_pipeline (const gchar * location) ...@@ -448,7 +449,7 @@ make_mpeg_pipeline (const gchar * location)
gst_bin_add (GST_BIN (audio_thread), audiosink); gst_bin_add (GST_BIN (audio_thread), audiosink);
setup_dynamic_link (demux, "audio_00", gst_element_get_pad (a_decoder, setup_dynamic_link (demux, "audio_00", gst_element_get_pad (a_decoder,
"sink"), audio_bin); "sink"), audio_bin);