summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-07-03 11:18:12 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-07-03 11:41:21 +0200
commite229771e8ca665d3f21994dbf7ee30b9ba4bac23 (patch)
tree94ecc20e2fc9a7c03594e62057af84d57522eba9 /src
parent1a3acacce9f5d7dad9ade7e36d26a75721dc8729 (diff)
Do initial port to GStreamer 1.0
Diffstat (limited to 'src')
-rw-r--r--src/egg-play-preview.c8
-rw-r--r--src/sj-play.c7
2 files changed, 5 insertions, 10 deletions
diff --git a/src/egg-play-preview.c b/src/egg-play-preview.c
index 4e88d34..0d7c8c9 100644
--- a/src/egg-play-preview.c
+++ b/src/egg-play-preview.c
@@ -684,10 +684,8 @@ _query_duration (GstElement *element)
GstState state;
GstState pending;
gint64 duration;
- GstFormat format;
duration = 0;
- format = GST_FORMAT_TIME;
result = gst_element_get_state (element, &state, &pending, GST_CLOCK_TIME_NONE);
@@ -702,7 +700,7 @@ _query_duration (GstElement *element)
if (result == GST_STATE_CHANGE_ASYNC)
gst_element_get_state (element, NULL, NULL, GST_CLOCK_TIME_NONE);
- gst_element_query_duration (element, &format, &duration);
+ gst_element_query_duration (element, GST_FORMAT_TIME, &duration);
gst_element_set_state (element, state);
@@ -713,12 +711,10 @@ static gint
_query_position (GstElement *element)
{
gint64 position;
- GstFormat format;
position = 0;
- format = GST_FORMAT_TIME;
- gst_element_query_position (element, &format, &position);
+ gst_element_query_position (element, GST_FORMAT_TIME, &position);
return (gint) (position / GST_SECOND);
}
diff --git a/src/sj-play.c b/src/sj-play.c
index 676e556..2b66ebf 100644
--- a/src/sj-play.c
+++ b/src/sj-play.c
@@ -231,7 +231,6 @@ static gboolean
cb_set_time (gpointer data)
{
GstElement *cd;
- GstFormat fmt = GST_FORMAT_TIME;
gint64 pos, len;
if (seeking)
@@ -239,8 +238,8 @@ cb_set_time (gpointer data)
cd = gst_bin_get_by_name_recurse_up (GST_BIN (pipeline), "cd-source");
- if (gst_element_query_duration (cd, &fmt, &len) &&
- gst_element_query_position (cd, &fmt, &pos)) {
+ if (gst_element_query_duration (cd, GST_FORMAT_TIME, &len) &&
+ gst_element_query_position (cd, GST_FORMAT_TIME, &pos)) {
internal_update = TRUE;
gtk_range_set_value (GTK_RANGE (seek_scale), (gdouble) pos / len);
set_statusbar_pos (pos / GST_SECOND, len / GST_SECOND);
@@ -355,7 +354,7 @@ setup (GError **err)
g_signal_connect (bus, "message::error", G_CALLBACK (cb_error), NULL);
g_signal_connect (bus, "message::state-changed", G_CALLBACK (cb_state), NULL);
- cdp = gst_element_make_from_uri (GST_URI_SRC, "cdda://1", "cd-source");
+ cdp = gst_element_make_from_uri (GST_URI_SRC, "cdda://1", "cd-source", NULL);
if (!cdp) {
gst_object_unref (GST_OBJECT (pipeline));
pipeline = NULL;