[totem/gnome-3-6] backend: Remove obsolete gst_message_parse_duration()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-6] backend: Remove obsolete gst_message_parse_duration()
- Date: Tue, 18 Sep 2012 10:29:53 +0000 (UTC)
commit 32a2a3dffc96d46b539fb7dfaaa48c49ea16560b
Author: Bastien Nocera <hadess hadess net>
Date: Tue Sep 18 12:06:10 2012 +0200
backend: Remove obsolete gst_message_parse_duration()
src/backend/bacon-video-widget.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index bf25a43..b7acb7a 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -2064,15 +2064,11 @@ bvw_bus_message_cb (GstBus * bus, GstMessage * message, BaconVideoWidget *bvw)
break;
}
- case GST_MESSAGE_DURATION: {
- gint64 duration;
- GstFormat fmt;
-
- gst_message_parse_duration (message, &fmt, &duration);
- if (fmt == GST_FORMAT_TIME &&
- duration != (gint64) GST_CLOCK_TIME_NONE) {
- bvw->priv->stream_length = duration / GST_MSECOND;
- GST_DEBUG ("got new stream length %" G_GINT64_FORMAT, bvw->priv->stream_length);
+ case GST_MESSAGE_DURATION_CHANGED: {
+ gint64 len = -1;
+ if (gst_element_query_duration (bvw->priv->play, GST_FORMAT_TIME, &len) && len != -1) {
+ bvw->priv->stream_length = len / GST_MSECOND;
+ GST_DEBUG ("got new stream length (through duration message) %" G_GINT64_FORMAT, bvw->priv->stream_length);
}
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]