summaryrefslogtreecommitdiffstats
path: root/examples/seeking
diff options
context:
space:
mode:
Diffstat (limited to 'examples/seeking')
-rw-r--r--examples/seeking/cdparanoia.c16
-rw-r--r--examples/seeking/cdplayer.c16
-rw-r--r--examples/seeking/seek.c18
-rw-r--r--examples/seeking/spider_seek.c18
-rw-r--r--examples/seeking/vorbisfile.c14
5 files changed, 45 insertions, 37 deletions
diff --git a/examples/seeking/cdparanoia.c b/examples/seeking/cdparanoia.c
index c4a58cf8..fd41187e 100644
--- a/examples/seeking/cdparanoia.c
+++ b/examples/seeking/cdparanoia.c
@@ -28,10 +28,10 @@ get_position_info (GstElement * cdparanoia)
if (format == GST_FORMAT_TIME) {
position /= GST_SECOND;
- g_print ("%s: %lld:%02lld", definition->nick, position / 60,
- position % 60);
+ g_print ("%s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT,
+ definition->nick, position / 60, position % 60);
} else {
- g_print ("%s: %lld", definition->nick, position);
+ g_print ("%s: %" G_GINT64_FORMAT, definition->nick, position);
}
formats++;
@@ -73,10 +73,10 @@ get_track_info (GstElement * cdparanoia)
if (res) {
if (format == GST_FORMAT_TIME) {
total /= GST_SECOND;
- g_print ("%s total: %lld:%02lld\n", definition->nick, total / 60,
- total % 60);
+ g_print ("%s total: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
+ definition->nick, total / 60, total % 60);
} else
- g_print ("%s total: %lld\n", definition->nick, total);
+ g_print ("%s total: %" G_GINT64_FORMAT "\n", definition->nick, total);
if (format == track_format)
total_tracks = total;
@@ -112,7 +112,9 @@ get_track_info (GstElement * cdparanoia)
if (i > 0) {
gint64 length = time - time_count;
- g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n",
+ g_print ("track %d: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT
+ " -> %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ", length: %"
+ G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
i - 1,
time_count / 60, time_count % 60,
time / 60, time % 60, length / 60, length % 60);
diff --git a/examples/seeking/cdplayer.c b/examples/seeking/cdplayer.c
index d83c78e6..afccaa84 100644
--- a/examples/seeking/cdplayer.c
+++ b/examples/seeking/cdplayer.c
@@ -39,8 +39,8 @@ format_value (GtkScale * scale, gdouble value)
seconds = (gint64) real / GST_SECOND;
subseconds = (gint64) real / (GST_SECOND / 100);
- return g_strdup_printf ("%02lld:%02lld:%02lld",
- seconds / 60, seconds % 60, subseconds % 100);
+ return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+ G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
}
typedef struct
@@ -77,7 +77,7 @@ 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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -106,7 +106,7 @@ 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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -183,9 +183,11 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
while (walk) {
GstElement *seekable = GST_ELEMENT (walk->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);
+ g_print ("seek to %" G_GINT64_FORMAT " 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);
res = gst_element_send_event (seekable, s_event);
diff --git a/examples/seeking/seek.c b/examples/seeking/seek.c
index a274c105..2d0216f0 100644
--- a/examples/seeking/seek.c
+++ b/examples/seeking/seek.c
@@ -580,8 +580,8 @@ format_value (GtkScale * scale, gdouble value)
seconds = (gint64) real / GST_SECOND;
subseconds = (gint64) real / (GST_SECOND / 100);
- return g_strdup_printf ("%02lld:%02lld:%02lld",
- seconds / 60, seconds % 60, subseconds % 100);
+ return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+ G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
}
typedef struct
@@ -616,7 +616,7 @@ 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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -647,7 +647,7 @@ query_durations_elems ()
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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -677,7 +677,7 @@ query_durations_pads ()
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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -707,7 +707,7 @@ query_positions_elems ()
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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -737,7 +737,7 @@ query_positions_pads ()
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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -851,7 +851,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
while (walk) {
GstPad *seekable = GST_PAD (walk->data);
- g_print ("seek to %lld on pad %s:%s\n", real,
+ g_print ("seek to %" G_GINT64_FORMAT " on pad %s:%s\n", real,
GST_DEBUG_PAD_NAME (seekable));
s_event =
gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
@@ -867,7 +867,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
while (walk) {
GstElement *seekable = GST_ELEMENT (walk->data);
- g_print ("seek to %lld on element %s\n", real,
+ g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
gst_element_get_name (seekable));
s_event =
gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
diff --git a/examples/seeking/spider_seek.c b/examples/seeking/spider_seek.c
index dc9ddfd6..ec90b395 100644
--- a/examples/seeking/spider_seek.c
+++ b/examples/seeking/spider_seek.c
@@ -83,8 +83,8 @@ format_value (GtkScale * scale, gdouble value)
seconds = (gint64) real / GST_SECOND;
subseconds = (gint64) real / (GST_SECOND / 100);
- return g_strdup_printf ("%02lld:%02lld:%02lld",
- seconds / 60, seconds % 60, subseconds % 100);
+ return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+ G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
}
typedef struct
@@ -119,7 +119,7 @@ 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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -150,7 +150,7 @@ 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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -179,7 +179,7 @@ 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 %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
} else {
g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
}
@@ -254,9 +254,11 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
while (walk) {
GstElement *seekable = GST_ELEMENT (walk->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);
+ g_print ("seek to %" G_GINT64_FORMAT " 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);
res = gst_element_send_event (seekable, s_event);
diff --git a/examples/seeking/vorbisfile.c b/examples/seeking/vorbisfile.c
index afb4ecc4..d193642f 100644
--- a/examples/seeking/vorbisfile.c
+++ b/examples/seeking/vorbisfile.c
@@ -75,10 +75,11 @@ print_lbs_info (struct probe_context *context, gint stream)
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));
+ g_print (" %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+ G_GINT64_FORMAT "\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: %" G_GINT64_FORMAT "\n", definition->nick, value_end);
}
} else
g_print (" could not get logical stream %s\n", definition->nick);
@@ -181,12 +182,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));
+ g_print (" total %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+ G_GINT64_FORMAT "\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);
+ g_print (" total %s: %" G_GINT64_FORMAT "\n", definition->nick, value);
}
}
}