diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-15 19:32:27 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-15 19:32:27 +0000 |
commit | 4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69 (patch) | |
tree | 8f41b30e571aa6ed88b53f5471d5e38461136e60 /examples/seeking | |
parent | 9f4226fe55f09cf5809376b467aa3f46dbf7b5c2 (diff) | |
download | gst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.tar.gz gst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.tar.bz2 gst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.zip |
don't mix tabs and spaces
Original commit message from CVS:
don't mix tabs and spaces
Diffstat (limited to 'examples/seeking')
-rw-r--r-- | examples/seeking/cdparanoia.c | 24 | ||||
-rw-r--r-- | examples/seeking/cdplayer.c | 19 | ||||
-rw-r--r-- | examples/seeking/seek.c | 51 | ||||
-rw-r--r-- | examples/seeking/spider_seek.c | 25 | ||||
-rw-r--r-- | examples/seeking/vorbisfile.c | 24 |
5 files changed, 74 insertions, 69 deletions
diff --git a/examples/seeking/cdparanoia.c b/examples/seeking/cdparanoia.c index e750f346..c4a58cf8 100644 --- a/examples/seeking/cdparanoia.c +++ b/examples/seeking/cdparanoia.c @@ -29,7 +29,7 @@ get_position_info (GstElement * cdparanoia) if (format == GST_FORMAT_TIME) { position /= GST_SECOND; g_print ("%s: %lld:%02lld", definition->nick, position / 60, - position % 60); + position % 60); } else { g_print ("%s: %lld", definition->nick, position); } @@ -72,16 +72,16 @@ get_track_info (GstElement * cdparanoia) res = gst_pad_query (pad, GST_QUERY_TOTAL, &format, &total); if (res) { if (format == GST_FORMAT_TIME) { - total /= GST_SECOND; - g_print ("%s total: %lld:%02lld\n", definition->nick, total / 60, - total % 60); + total /= GST_SECOND; + g_print ("%s total: %lld:%02lld\n", definition->nick, total / 60, + total % 60); } else - g_print ("%s total: %lld\n", definition->nick, total); + g_print ("%s total: %lld\n", definition->nick, total); if (format == track_format) - total_tracks = total; + total_tracks = total; else if (format == GST_FORMAT_TIME) - total_time = total; + total_time = total; } else g_print ("failed to get %s total\n", definition->nick); @@ -110,12 +110,12 @@ get_track_info (GstElement * cdparanoia) /* for the first track (i==0) we wait until we have the * time of the next track */ 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", - i - 1, - time_count / 60, time_count % 60, - time / 60, time % 60, length / 60, length % 60); + g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n", + i - 1, + time_count / 60, time_count % 60, + time / 60, time % 60, length / 60, length % 60); } } else { g_print ("could not get time for track %d\n", i); diff --git a/examples/seeking/cdplayer.c b/examples/seeking/cdplayer.c index 1e823cc5..d83c78e6 100644 --- a/examples/seeking/cdplayer.c +++ b/examples/seeking/cdplayer.c @@ -47,7 +47,8 @@ typedef struct { const gchar *name; const GstFormat format; -} seek_format; +} +seek_format; static seek_format seek_formats[] = { {"tim", GST_FORMAT_TIME}, @@ -76,9 +77,9 @@ query_durations () format = seek_formats[i].format; res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value); if (res) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; } @@ -105,9 +106,9 @@ query_positions () format = seek_formats[i].format; res = gst_element_query (element, GST_QUERY_POSITION, &format, &value); if (res) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; } @@ -137,7 +138,7 @@ update_scale (gpointer data) if (stats) { if (clock) g_print ("clock: %13llu (%s)\n", position, - gst_object_get_name (GST_OBJECT (clock))); + gst_object_get_name (GST_OBJECT (clock))); query_durations (); query_positions (); } @@ -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)); 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); @@ -208,7 +209,7 @@ play_cb (GtkButton * button, gpointer data) if (!GST_FLAG_IS_SET (pipeline, GST_BIN_SELF_SCHEDULABLE)) gtk_idle_add ((GtkFunction) iterate, pipeline); 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) *play_button, *pause_button, *stop_button, *hscale; struct poptOption options[] = { {"stats", 's', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &stats, 0, - "Show element stats", NULL}, + "Show element stats", NULL}, POPT_TABLEEND }; diff --git a/examples/seeking/seek.c b/examples/seeking/seek.c index 34a6958d..e8d6bc04 100644 --- a/examples/seeking/seek.c +++ b/examples/seeking/seek.c @@ -28,7 +28,8 @@ typedef struct const gchar *padname; GstPad *target; GstElement *bin; -} dyn_link; +} +dyn_link; static GstElement * gst_element_factory_make_or_warn (gchar * type, gchar * name) @@ -372,7 +373,7 @@ make_avi_pipeline (const gchar * location) gst_element_set_state (audio_bin, GST_STATE_PAUSED); 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_pads = g_list_prepend (seekable_pads, seekable); @@ -400,7 +401,7 @@ make_avi_pipeline (const gchar * location) gst_element_set_state (video_bin, GST_STATE_PAUSED); 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_pads = g_list_prepend (seekable_pads, seekable); @@ -448,7 +449,7 @@ make_mpeg_pipeline (const gchar * location) gst_bin_add (GST_BIN (audio_thread), audiosink); 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_pads = g_list_prepend (seekable_pads, seekable); @@ -470,7 +471,7 @@ make_mpeg_pipeline (const gchar * location) gst_bin_add_many (GST_BIN (video_thread), v_queue, v_filter, videosink, NULL); 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_pads = g_list_prepend (seekable_pads, seekable); @@ -519,7 +520,7 @@ make_mpegnt_pipeline (const gchar * location) gst_bin_add (GST_BIN (audio_thread), audiosink); 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_pads = g_list_prepend (seekable_pads, seekable); @@ -536,7 +537,7 @@ make_mpegnt_pipeline (const gchar * location) gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL); setup_dynamic_link (demux, "video_00", gst_element_get_pad (v_decoder, - "sink"), video_bin); + "sink"), video_bin); seekable = gst_element_get_pad (v_decoder, "src"); seekable_pads = g_list_prepend (seekable_pads, seekable); @@ -572,7 +573,8 @@ typedef struct { const gchar *name; const GstFormat format; -} seek_format; +} +seek_format; static seek_format seek_formats[] = { {"tim", GST_FORMAT_TIME}, @@ -599,9 +601,9 @@ query_rates (void) format = seek_formats[i].format; if (gst_pad_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format, &value)) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; @@ -630,9 +632,9 @@ query_durations () format = seek_formats[i].format; res = gst_pad_query (pad, GST_QUERY_TOTAL, &format, &value); if (res) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; } @@ -660,9 +662,9 @@ query_positions () format = seek_formats[i].format; res = gst_pad_query (pad, GST_QUERY_POSITION, &format, &value); if (res) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; } @@ -691,7 +693,7 @@ update_scale (gpointer data) if (stats) { g_print ("clock: %13llu (%s)\n", position, - gst_object_get_name (GST_OBJECT (clock))); + gst_object_get_name (GST_OBJECT (clock))); query_durations (); query_positions (); query_rates (); @@ -740,10 +742,10 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data) GstPad *seekable = GST_PAD (walk->data); g_print ("seek to %lld on pad %s:%s\n", real, - GST_DEBUG_PAD_NAME (seekable)); + GST_DEBUG_PAD_NAME (seekable)); s_event = - gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET | - GST_SEEK_FLAG_FLUSH, real); + gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET | + GST_SEEK_FLAG_FLUSH, real); res = gst_pad_send_event (seekable, s_event); @@ -756,10 +758,10 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data) GstElement *seekable = GST_ELEMENT (walk->data); g_print ("seek to %lld on element %s\n", real, - gst_element_get_name (seekable)); + gst_element_get_name (seekable)); s_event = - gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET | - GST_SEEK_FLAG_FLUSH, real); + gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET | + GST_SEEK_FLAG_FLUSH, real); res = gst_element_send_event (seekable, s_event); @@ -782,7 +784,7 @@ play_cb (GtkButton * button, gpointer data) gst_element_set_state (pipeline, GST_STATE_PLAYING); gtk_idle_add ((GtkFunction) iterate, pipeline); update_id = - gtk_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); + gtk_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); } } @@ -808,7 +810,8 @@ typedef struct { gchar *name; GstElement *(*func) (const gchar * location); -} Pipeline; +} +Pipeline; static Pipeline pipelines[] = { {"mp3", make_mp3_pipeline}, @@ -848,7 +851,7 @@ main (int argc, char **argv) *play_button, *pause_button, *stop_button, *hscale; struct poptOption options[] = { {"stats", 's', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &stats, 0, - "Show pad stats", NULL}, + "Show pad stats", NULL}, POPT_TABLEEND }; gint type; diff --git a/examples/seeking/spider_seek.c b/examples/seeking/spider_seek.c index d2c2c6b2..dc9ddfd6 100644 --- a/examples/seeking/spider_seek.c +++ b/examples/seeking/spider_seek.c @@ -91,7 +91,8 @@ typedef struct { const gchar *name; const GstFormat format; -} seek_format; +} +seek_format; static seek_format seek_formats[] = { {"tim", GST_FORMAT_TIME}, @@ -118,9 +119,9 @@ query_rates (void) format = seek_formats[i].format; if (gst_pad_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format, &value)) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; @@ -149,9 +150,9 @@ query_durations () format = seek_formats[i].format; res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value); if (res) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; } @@ -178,9 +179,9 @@ query_positions () format = seek_formats[i].format; res = gst_element_query (element, GST_QUERY_POSITION, &format, &value); if (res) { - g_print ("%s %13lld | ", seek_formats[i].name, value); + g_print ("%s %13lld | ", seek_formats[i].name, value); } else { - g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); + g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*"); } i++; } @@ -208,7 +209,7 @@ update_scale (gpointer data) if (stats) { g_print ("clock: %13llu (%s)\n", position, - gst_object_get_name (GST_OBJECT (clock))); + gst_object_get_name (GST_OBJECT (clock))); query_durations (); query_positions (); query_rates (); @@ -255,7 +256,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data) g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable)); 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); @@ -279,7 +280,7 @@ play_cb (GtkButton * button, gpointer data) if (!GST_FLAG_IS_SET (pipeline, GST_BIN_SELF_SCHEDULABLE)) gtk_idle_add ((GtkFunction) iterate, pipeline); update_id = - gtk_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); + gtk_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); } } @@ -309,9 +310,9 @@ main (int argc, char **argv) gboolean threaded = FALSE; struct poptOption options[] = { {"threaded", 't', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &threaded, 0, - "Run the pipeline in a toplevel thread", NULL}, + "Run the pipeline in a toplevel thread", NULL}, {"stats", 's', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &stats, 0, - "Show element stats", NULL}, + "Show element stats", NULL}, POPT_TABLEEND }; diff --git a/examples/seeking/vorbisfile.c b/examples/seeking/vorbisfile.c index ec6844a0..afb4ecc4 100644 --- a/examples/seeking/vorbisfile.c +++ b/examples/seeking/vorbisfile.c @@ -65,20 +65,20 @@ print_lbs_info (struct probe_context *context, gint stream) /* get start and end position of this stream */ res = gst_pad_convert (context->pad, - context->ls_format, stream, &format, &value_start); + context->ls_format, stream, &format, &value_start); res &= gst_pad_convert (context->pad, - context->ls_format, stream + 1, &format, &value_end); + context->ls_format, stream + 1, &format, &value_end); if (res) { /* substract to get the length */ value_end -= value_start; if (format == GST_FORMAT_TIME) { - value_end /= (GST_SECOND / 100); - g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, - value_end / 6000, (value_end / 100) % 60, (value_end % 100)); + value_end /= (GST_SECOND / 100); + g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, + value_end / 6000, (value_end / 100) % 60, (value_end % 100)); } else { - g_print (" %s: %lld\n", definition->nick, value_end); + g_print (" %s: %lld\n", definition->nick, value_end); } } else g_print (" could not get logical stream %s\n", definition->nick); @@ -180,13 +180,13 @@ collect_stream_properties (struct probe_context *context) if (res) { if (format == GST_FORMAT_TIME) { - value /= (GST_SECOND / 100); - g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, - value / 6000, (value / 100) % 60, (value % 100)); + value /= (GST_SECOND / 100); + g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, + value / 6000, (value / 100) % 60, (value % 100)); } else { - if (format == context->ls_format) - context->total_ls = value; - g_print (" total %s: %lld\n", definition->nick, value); + if (format == context->ls_format) + context->total_ls = value; + g_print (" total %s: %lld\n", definition->nick, value); } } } |