Merge branch 'media-stream-name-collision' into 'master'

mediastream: Some more api renaming

Closes #4023

See merge request GNOME/gtk!3673
This commit is contained in:
Matthias Clasen 2021-06-16 10:07:29 +00:00
commit 10564514e8
4 changed files with 30 additions and 7 deletions

View File

@ -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.

View File

@ -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`

View File

@ -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

View File

@ -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