[gtk/wip/otte/for-master: 2/2] mediastream: Insist streams are prepared when they start playing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 2/2] mediastream: Insist streams are prepared when they start playing
- Date: Mon, 29 Mar 2021 15:10:02 +0000 (UTC)
commit 38fff37daec3c8ec679717c93650fed2a5999bde
Author: Benjamin Otte <otte redhat com>
Date: Mon Mar 29 15:02:22 2021 +0200
mediastream: Insist streams are prepared when they start playing
Applications expect that behavior, so don't let implementations get away
without preparing the stream.
gtk/gtkmediastream.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtkmediastream.c b/gtk/gtkmediastream.c
index 8635b6bb4c..1b3d1c1115 100644
--- a/gtk/gtkmediastream.c
+++ b/gtk/gtkmediastream.c
@@ -1263,6 +1263,8 @@ gtk_media_stream_error_valist (GtkMediaStream *self,
*
* It is up to implementations to call this at the frequency
* they deem appropriate.
+ *
+ * The media stream must be prepared when this function is called.
*/
void
gtk_media_stream_update (GtkMediaStream *self,
@@ -1271,6 +1273,7 @@ gtk_media_stream_update (GtkMediaStream *self,
GtkMediaStreamPrivate *priv = gtk_media_stream_get_instance_private (self);
g_return_if_fail (GTK_IS_MEDIA_STREAM (self));
+ g_return_if_fail (gtk_media_stream_is_prepared (self));
g_object_freeze_notify (G_OBJECT (self));
@@ -1301,6 +1304,8 @@ gtk_media_stream_update (GtkMediaStream *self,
*
* This is a hint only, calls to GtkMediaStream.play()
* may still happen.
+ *
+ * The media stream must be prepared when this function is called.
*/
void
gtk_media_stream_ended (GtkMediaStream *self)
@@ -1308,6 +1313,7 @@ gtk_media_stream_ended (GtkMediaStream *self)
GtkMediaStreamPrivate *priv = gtk_media_stream_get_instance_private (self);
g_return_if_fail (GTK_IS_MEDIA_STREAM (self));
+ g_return_if_fail (gtk_media_stream_is_prepared (self));
g_return_if_fail (!gtk_media_stream_get_ended (self));
g_object_freeze_notify (G_OBJECT (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]