diff --git a/demos/gtk-demo/paintable_mediastream.c b/demos/gtk-demo/paintable_mediastream.c index c7c699509e..c142cdd6c0 100644 --- a/demos/gtk-demo/paintable_mediastream.c +++ b/demos/gtk-demo/paintable_mediastream.c @@ -150,7 +150,7 @@ gtk_nuclear_media_stream_step (gpointer data) * call our pause function to pause the stream. */ if (nuclear->progress >= DURATION) - gtk_media_stream_ended (GTK_MEDIA_STREAM (nuclear)); + gtk_media_stream_set_ended (GTK_MEDIA_STREAM (nuclear)); /* The timeout function is removed by the pause function, * so we can just always return this value. diff --git a/gtk/gtkmediastream.c b/gtk/gtkmediastream.c index 66f0a06489..8e33814d1e 100644 --- a/gtk/gtkmediastream.c +++ b/gtk/gtkmediastream.c @@ -1140,7 +1140,7 @@ gtk_media_stream_unset_prepared (GtkMediaStream *self) } /** - * gtk_media_stream_prepared: + * gtk_media_stream_prepared: (skip) * @self: a `GtkMediaStream` * @has_audio: %TRUE if the stream should advertise audio support * @has_video: %TRUE if the stream should advertise video support @@ -1162,7 +1162,7 @@ gtk_media_stream_prepared (GtkMediaStream *self, } /** - * gtk_media_stream_unprepared: + * gtk_media_stream_unprepared: (skip) * @self: a `GtkMediaStream` * * Same as gtk_media_stream_unset_prepared(). @@ -1337,7 +1337,7 @@ gtk_media_stream_update (GtkMediaStream *self, } /** - * gtk_media_stream_ended: + * gtk_media_stream_set_ended: * @self: a `GtkMediaStream` * * Pauses the media stream and marks it as ended. @@ -1346,9 +1346,11 @@ gtk_media_stream_update (GtkMediaStream *self, * may still happen. * * The media stream must be prepared when this function is called. + * + * Since: 4.4 */ void -gtk_media_stream_ended (GtkMediaStream *self) +gtk_media_stream_set_ended (GtkMediaStream *self) { GtkMediaStreamPrivate *priv = gtk_media_stream_get_instance_private (self); @@ -1366,6 +1368,25 @@ gtk_media_stream_ended (GtkMediaStream *self) g_object_thaw_notify (G_OBJECT (self)); } +/** + * gtk_media_stream_ended: (skip) + * @self: a `GtkMediaStream` + * + * Pauses the media stream and marks it as ended. + * + * This is a hint only, calls to GtkMediaStream.play() + * may still happen. + * + * The media stream must be prepared when this function is called. + * + * Deprecated: 4.4: Use [method@Gtk.MediaStream.set_ended] instead + */ +void +gtk_media_stream_ended (GtkMediaStream *self) +{ + gtk_media_stream_set_ended (self); +} + /** * gtk_media_stream_seek_success: * @self: a `GtkMediaStream` diff --git a/gtk/gtkmediastream.h b/gtk/gtkmediastream.h index f4ed91f15e..ed892ccccf 100644 --- a/gtk/gtkmediastream.h +++ b/gtk/gtkmediastream.h @@ -137,8 +137,10 @@ void gtk_media_stream_unset_prepared (GtkMediaStream GDK_AVAILABLE_IN_ALL void gtk_media_stream_update (GtkMediaStream *self, gint64 timestamp); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_4_FOR(gtk_media_stream_set_ended) void gtk_media_stream_ended (GtkMediaStream *self); +GDK_AVAILABLE_IN_4_4 +void gtk_media_stream_set_ended (GtkMediaStream *self); GDK_AVAILABLE_IN_ALL void gtk_media_stream_seek_success (GtkMediaStream *self); GDK_AVAILABLE_IN_ALL diff --git a/modules/media/gtkgstmediafile.c b/modules/media/gtkgstmediafile.c index e607aa1aa8..d1ebab1506 100644 --- a/modules/media/gtkgstmediafile.c +++ b/modules/media/gtkgstmediafile.c @@ -208,7 +208,7 @@ gtk_gst_media_file_end_of_stream_cb (GstPlayer *player, return; } - gtk_media_stream_ended (GTK_MEDIA_STREAM (self)); + gtk_media_stream_set_ended (GTK_MEDIA_STREAM (self)); } static void