From 2aee39d12cae1c5b5966dba9379366f01743bcfb Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 19 Mar 2018 00:25:17 +0100 Subject: [PATCH] video: Add gtk_video_get_file() That function was missing. --- gtk/gtkvideo.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gtk/gtkvideo.c b/gtk/gtkvideo.c index b6c1edd690..eb13ead95e 100644 --- a/gtk/gtkvideo.c +++ b/gtk/gtkvideo.c @@ -542,6 +542,23 @@ gtk_video_set_media_stream (GtkVideo *self, g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MEDIA_STREAM]); } +/** + * gtk_video_get_file: + * @self: a #GtkVideo + * + * Gets the file played by @self or %NULL if not playing back + * a file. + * + * Returns: (nullable) (transfer none): The file played by @self + **/ +GFile * +gtk_video_get_file (GtkVideo *self) +{ + g_return_val_if_fail (GTK_IS_VIDEO (self), NULL); + + return self->file; +} + /** * gtk_video_set_file: * @self: a #GtkVideo