[totem] backend: Don't check the duration by hand
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Don't check the duration by hand
- Date: Sun, 15 Jul 2012 18:41:10 +0000 (UTC)
commit 701c9b2b02d11744692a179bf069a411c57bc892
Author: Bastien Nocera <hadess hadess net>
Date: Sun Jul 15 17:12:20 2012 +0100
backend: Don't check the duration by hand
The duration messages should take care of updating us, and our
initial state is gathered when we receive async-done messages.
src/backend/bacon-video-widget.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 41e4179..b70f643 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -2393,16 +2393,9 @@ playbin_deep_notify_cb (GstObject *gstobject,
static gboolean
bvw_query_timeout (BaconVideoWidget *bvw)
{
- gint64 pos = -1, len = -1;
-
- /* check length/pos of stream */
- if (gst_element_query_duration (bvw->priv->play, GST_FORMAT_TIME, &len)) {
- if (len != -1)
- bvw->priv->stream_length = len / GST_MSECOND;
- } else {
- GST_DEBUG ("could not get duration");
- }
+ gint64 pos = -1;
+ /* check pos of stream */
if (gst_element_query_position (bvw->priv->play, GST_FORMAT_TIME, &pos)) {
if (pos != -1) {
got_time_tick (GST_ELEMENT (bvw->priv->play), pos, bvw);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]