summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/capsfilter/capsfilter1.c2
-rw-r--r--examples/dynparams/filter.c98
-rw-r--r--examples/gstplay/player.c2
-rw-r--r--examples/indexing/indexmpeg.c29
-rw-r--r--examples/seeking/cdparanoia.c24
-rw-r--r--examples/seeking/cdplayer.c19
-rw-r--r--examples/seeking/seek.c51
-rw-r--r--examples/seeking/spider_seek.c25
-rw-r--r--examples/seeking/vorbisfile.c24
-rw-r--r--examples/stats/mp2ogg.c18
10 files changed, 149 insertions, 143 deletions
diff --git a/examples/capsfilter/capsfilter1.c b/examples/capsfilter/capsfilter1.c
index 46e127a2..5948d601 100644
--- a/examples/capsfilter/capsfilter1.c
+++ b/examples/capsfilter/capsfilter1.c
@@ -72,7 +72,7 @@ main (gint argc, gchar * argv[])
/* force RGB data passing between colorspace and xvideosink */
res = gst_element_link_filtered (colorspace, "src", xvideosink, "sink",
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) {
g_print ("could not connect colorspace and xvideosink\n");
diff --git a/examples/dynparams/filter.c b/examples/dynparams/filter.c
index 982a4c7a..5178d28b 100644
--- a/examples/dynparams/filter.c
+++ b/examples/dynparams/filter.c
@@ -15,17 +15,17 @@
/* filter UI data */
struct _filter_ui
{
- GtkWidget *window; /* top-level interface window */
+ GtkWidget *window; /* top-level interface window */
- GtkWidget *buttons; /* all of the control buttons */
- GtkWidget *parse, *play, *stop; /* control buttons */
+ GtkWidget *buttons; /* all of the control buttons */
+ GtkWidget *parse, *play, *stop; /* control buttons */
- GtkWidget *feedback; /* here's where we'll tell you stuff */
- GtkTextBuffer *fb_buffer; /* feedback buffer */
- GtkWidget *selection; /* the place to input element stuff */
- GtkWidget *input, *filter, *output; /* the selection widgets */
+ GtkWidget *feedback; /* here's where we'll tell you stuff */
+ GtkTextBuffer *fb_buffer; /* feedback buffer */
+ GtkWidget *selection; /* the place to input element stuff */
+ 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;
@@ -33,13 +33,13 @@ typedef struct _filter_ui _filter_ui_t;
/* back-end 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 *pipe_string;
GList *filter_choices;
gboolean playing;
- GstElement *input, *output; /* these are in and out bins */
+ GstElement *input, *output; /* these are in and out bins */
GstElement *pipeline;
GstElement *filter;
};
@@ -75,21 +75,21 @@ gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction,
while (pads) {
/* check if the direction matches */
if (GST_PAD_DIRECTION (GST_PAD (pads->data)) == direction) {
- if (GST_PAD_PEER (GST_PAD (pads->data)) == NULL) {
- /* found it ! */
- g_print ("DEBUG: found an unconnected pad !\n");
- pad = GST_PAD (pads->data);
- }
+ if (GST_PAD_PEER (GST_PAD (pads->data)) == NULL) {
+ /* found it ! */
+ g_print ("DEBUG: found an unconnected pad !\n");
+ pad = GST_PAD (pads->data);
+ }
}
if (pad)
- break; /* found one already */
+ break; /* found one already */
pads = g_list_next (pads);
}
elements = g_list_next (elements);
}
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;
pad = gst_ghost_pad_new (name, pad);
@@ -157,37 +157,37 @@ ui_control_create (GstElement * element, GtkWidget * control, _filter_ui_t * ui)
gtk_container_add (GTK_CONTAINER (hbox), widget);
gtk_widget_show (widget);
switch (G_PARAM_SPEC_VALUE_TYPE (specs[i])) {
- case G_TYPE_INT64:
- widget = gtk_hscale_new_with_range (
- (gdouble) (((GParamSpecInt64 *) specs[i])->minimum),
- (gdouble) (((GParamSpecInt64 *) specs[i])->maximum), 1.0);
- gtk_range_set_value (GTK_RANGE (widget),
- (gdouble) ((GParamSpecInt64 *) specs[i])->default_value);
- break;
-
- case G_TYPE_INT:
- widget = gtk_hscale_new_with_range (
- (gdouble) (((GParamSpecInt *) specs[i])->minimum),
- (gdouble) (((GParamSpecInt *) specs[i])->maximum), 1.0);
- gtk_range_set_value (GTK_RANGE (widget),
- (gdouble) ((GParamSpecInt *) specs[i])->default_value);
- break;
- case G_TYPE_FLOAT:
- widget = gtk_hscale_new_with_range (
- (gdouble) (((GParamSpecFloat *) specs[i])->minimum),
- (gdouble) (((GParamSpecFloat *) specs[i])->maximum), 0.00001);
- gtk_range_set_value (GTK_RANGE (widget),
- (gdouble) ((GParamSpecFloat *) specs[i])->default_value);
- break;
+ case G_TYPE_INT64:
+ widget = gtk_hscale_new_with_range (
+ (gdouble) (((GParamSpecInt64 *) specs[i])->minimum),
+ (gdouble) (((GParamSpecInt64 *) specs[i])->maximum), 1.0);
+ gtk_range_set_value (GTK_RANGE (widget),
+ (gdouble) ((GParamSpecInt64 *) specs[i])->default_value);
+ break;
+
+ case G_TYPE_INT:
+ widget = gtk_hscale_new_with_range (
+ (gdouble) (((GParamSpecInt *) specs[i])->minimum),
+ (gdouble) (((GParamSpecInt *) specs[i])->maximum), 1.0);
+ gtk_range_set_value (GTK_RANGE (widget),
+ (gdouble) ((GParamSpecInt *) specs[i])->default_value);
+ break;
+ case G_TYPE_FLOAT:
+ widget = gtk_hscale_new_with_range (
+ (gdouble) (((GParamSpecFloat *) specs[i])->minimum),
+ (gdouble) (((GParamSpecFloat *) specs[i])->maximum), 0.00001);
+ gtk_range_set_value (GTK_RANGE (widget),
+ (gdouble) ((GParamSpecFloat *) specs[i])->default_value);
+ break;
}
/* create the dparam object */
dparam = gst_dpsmooth_new (G_PARAM_SPEC_VALUE_TYPE (specs[i]));
g_object_set (G_OBJECT (dparam), "update_period", 2000000LL, NULL);
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");
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);
gtk_container_add (GTK_CONTAINER (hbox), widget);
@@ -315,7 +315,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
fd->input = GST_ELEMENT (gst_parse_launch (fd->input_pipe, &error));
if (error) {
ui_feedback_add (fd->ui, "Error : parsing input pipeline : %s\n",
- error->message);
+ error->message);
g_error_free (error);
return;
}
@@ -329,7 +329,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
fd->output = GST_ELEMENT (gst_parse_launch (fd->output_pipe, &error));
if (error) {
ui_feedback_add (fd->ui, "Error : parsing output pipeline : %s\n",
- error->message);
+ error->message);
g_error_free (error);
return;
}
@@ -340,7 +340,7 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
fd->filter = gst_element_factory_make (fd->filter_element, "filter");
if (fd->filter == NULL) {
ui_feedback_add (fd->ui, "Error : could not create element %s\n",
- fd->filter_element);
+ fd->filter_element);
return;
}
@@ -359,14 +359,14 @@ cb_parse_clicked (GtkButton * button, gpointer * user_data)
"source");
if (src_pad == NULL) {
ui_feedback_add (fd->ui,
- "Error : could not find an unconnected source pad !\n");
+ "Error : could not find an unconnected source pad !\n");
return;
}
sink_pad = gst_bin_find_unconnected_pad (GST_BIN (fd->output), GST_PAD_SINK,
"sink");
if (sink_pad == NULL) {
ui_feedback_add (fd->ui,
- "Error : could not find an unconnected sink pad !\n");
+ "Error : could not find an unconnected sink pad !\n");
return;
}
gst_element_add_pad (fd->input, src_pad);
@@ -417,8 +417,8 @@ init_data (_filter_data_t * fd)
void
create_ui (_filter_ui_t * fui, _filter_data_t * fd)
{
- GtkWidget *widget; /* temporary widget */
- GtkWidget *vbox; /* temporary vbox */
+ GtkWidget *widget; /* temporary widget */
+ GtkWidget *vbox; /* temporary vbox */
g_print ("DEBUG: creating top-level window\n");
fui->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -480,7 +480,7 @@ create_ui (_filter_ui_t * fui, _filter_data_t * fd)
widget = gtk_label_new ("Output Pipe");
gtk_container_add (GTK_CONTAINER (vbox), widget);
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 (fui->selection), vbox);
g_signal_connect (G_OBJECT (fui->output), "activate",
diff --git a/examples/gstplay/player.c b/examples/gstplay/player.c
index 3272778b..a23d3a01 100644
--- a/examples/gstplay/player.c
+++ b/examples/gstplay/player.c
@@ -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));
} else {
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) {
diff --git a/examples/indexing/indexmpeg.c b/examples/indexing/indexmpeg.c
index 48a7ca23..5c129609 100644
--- a/examples/indexing/indexmpeg.c
+++ b/examples/indexing/indexmpeg.c
@@ -29,21 +29,21 @@ entry_added (GstIndex * index, GstIndexEntry * entry)
switch (entry->type) {
case GST_INDEX_ENTRY_ID:
g_print ("id %d describes writer %s\n", entry->id,
- GST_INDEX_ID_DESCRIPTION (entry));
+ GST_INDEX_ID_DESCRIPTION (entry));
break;
case GST_INDEX_ENTRY_FORMAT:
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;
case GST_INDEX_ENTRY_ASSOCIATION:
{
gint i;
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++) {
- g_print ("%d %lld ", GST_INDEX_ASSOC_FORMAT (entry, i),
- GST_INDEX_ASSOC_VALUE (entry, i));
+ g_print ("%d %lld ", GST_INDEX_ASSOC_FORMAT (entry, i),
+ GST_INDEX_ASSOC_VALUE (entry, i));
}
g_print ("\n");
break;
@@ -60,7 +60,8 @@ typedef struct
GstElement *bin;
GstElement *pipeline;
GstIndex *index;
-} dyn_link;
+}
+dyn_link;
static void
dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer data)
@@ -205,18 +206,18 @@ main (gint argc, gchar * argv[])
GstElement *sink;
struct poptOption options[] = {
{"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,
- "don't print progress bar", NULL},
+ "don't print progress bar", NULL},
POPT_TABLEEND
};
if (!gst_init_check_with_popt_table (&argc, &argv, options) || argc < 3) {
g_print ("usage: %s [-v] <type> <filename> \n"
- " type can be: 0 mpeg_systems\n"
- " 1 mpeg_decoder\n"
- " -v : report added index entries\n"
- " -q : don't print progress\n", argv[0]);
+ " type can be: 0 mpeg_systems\n"
+ " 1 mpeg_decoder\n"
+ " -v : report added index entries\n"
+ " -q : don't print progress\n", argv[0]);
return -1;
}
@@ -225,7 +226,7 @@ main (gint argc, gchar * argv[])
if (index) {
if (verbose)
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);
}
@@ -284,7 +285,7 @@ main (gint argc, gchar * argv[])
gst_index_get_writer_id (index, GST_OBJECT (src), &id);
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);
gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &result);
total_tm = result * 60 / GST_SECOND;
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);
}
}
}
diff --git a/examples/stats/mp2ogg.c b/examples/stats/mp2ogg.c
index 55d79e90..3fb437fe 100644
--- a/examples/stats/mp2ogg.c
+++ b/examples/stats/mp2ogg.c
@@ -47,7 +47,7 @@ main (gint argc, gchar * argv[])
if (!pipeline) {
if (error)
g_print ("ERROR: pipeline could not be constructed: %s\n",
- error->message);
+ error->message);
else
g_print ("ERROR: pipeline could not be constructed\n");
return -1;
@@ -80,18 +80,18 @@ main (gint argc, gchar * argv[])
format = GST_FORMAT_BYTES;
/* see how many bytes are genereated per 8 seconds (== bitrate) */
gst_pad_convert (enc_src, GST_FORMAT_TIME, 8 * GST_SECOND,
- &format, &bitrate_enc);
+ &format, &bitrate_enc);
gst_pad_convert (dec_sink, GST_FORMAT_TIME, 8 * GST_SECOND,
- &format, &bitrate_dec);
+ &format, &bitrate_dec);
g_print ("[%2dm %.2ds] of [%2dm %.2ds], "
- "src avg bitrate: %lld, dest avg birate: %lld, ratio [%02.2f] \r",
- (gint) (position / (GST_SECOND * 60)),
- (gint) (position / (GST_SECOND)) % 60,
- (gint) (duration / (GST_SECOND * 60)),
- (gint) (duration / (GST_SECOND)) % 60,
- bitrate_dec, bitrate_enc, (gfloat) bitrate_dec / bitrate_enc);
+ "src avg bitrate: %lld, dest avg birate: %lld, ratio [%02.2f] \r",
+ (gint) (position / (GST_SECOND * 60)),
+ (gint) (position / (GST_SECOND)) % 60,
+ (gint) (duration / (GST_SECOND * 60)),
+ (gint) (duration / (GST_SECOND)) % 60,
+ bitrate_dec, bitrate_enc, (gfloat) bitrate_dec / bitrate_enc);
}
g_print ("\n");