totem r5744 - in trunk: . src/backend
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5744 - in trunk: . src/backend
- Date: Tue, 7 Oct 2008 12:57:42 +0000 (UTC)
Author: hadess
Date: Tue Oct 7 12:57:42 2008
New Revision: 5744
URL: http://svn.gnome.org/viewvc/totem?rev=5744&view=rev
Log:
2008-10-07 Bastien Nocera <hadess hadess net>
* src/backend/bacon-video-widget-gst-0.10.c (got_time_tick),
(bacon_video_widget_close), (bacon_video_widget_pause):
* src/backend/bacon-video-widget-xine.c
(bacon_video_widget_tick_send), (bacon_video_widget_close):
When streaming audio or video, make sure pause actually stops the
stream, as per the xine-lib backend
Modified:
trunk/ChangeLog
trunk/src/backend/bacon-video-widget-gst-0.10.c
trunk/src/backend/bacon-video-widget-xine.c
Modified: trunk/src/backend/bacon-video-widget-gst-0.10.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-gst-0.10.c (original)
+++ trunk/src/backend/bacon-video-widget-gst-0.10.c Tue Oct 7 12:57:42 2008
@@ -145,6 +145,7 @@
gint64 current_time_nanos;
gint64 current_time;
gdouble current_position;
+ gboolean is_live;
GstTagList *tagcache;
GstTagList *audiotags;
@@ -1672,6 +1673,8 @@
seekable = TRUE;
}
+ bvw->priv->is_live = (bvw->priv->stream_length > 0);
+
/*
GST_DEBUG ("%" GST_TIME_FORMAT ",%" GST_TIME_FORMAT " %s",
GST_TIME_ARGS (bvw->priv->current_time),
@@ -2973,6 +2976,7 @@
g_free (bvw->com->mrl);
bvw->com->mrl = NULL;
+ bvw->priv->is_live = FALSE;
bvw->priv->window_resized = FALSE;
g_object_notify (G_OBJECT (bvw), "seekable");
@@ -3121,6 +3125,12 @@
g_return_if_fail (GST_IS_ELEMENT (bvw->priv->play));
g_return_if_fail (bvw->com->mrl != NULL);
+ if (bvw->priv->is_live != FALSE) {
+ GST_LOG ("Stopping because we have a live stream");
+ bacon_video_widget_stop (bvw);
+ return;
+ }
+
GST_LOG ("Pausing");
gst_element_set_state (GST_ELEMENT (bvw->priv->play), GST_STATE_PAUSED);
bvw->priv->target_state = GST_STATE_PAUSED;
Modified: trunk/src/backend/bacon-video-widget-xine.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-xine.c (original)
+++ trunk/src/backend/bacon-video-widget-xine.c Tue Oct 7 12:57:42 2008
@@ -2084,10 +2084,7 @@
}
}
- if (stream_length > 0)
- bvw->priv->is_live = FALSE;
- else
- bvw->priv->is_live = TRUE;
+ bvw->priv->is_live = (stream_length > 0);
if (stream_length != 0 && bvw->com->mrl != NULL) {
seekable = xine_get_stream_info (bvw->priv->stream,
@@ -2708,6 +2705,7 @@
bacon_video_widget_stop (bvw);
xine_close (bvw->priv->stream);
bvw->priv->has_subtitle = FALSE;
+ bvw->priv->is_live = FALSE;
g_free (bvw->com->mrl);
bvw->com->mrl = NULL;
bvw->priv->stream_length = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]