video: Add gtk_video_get_file()
authorBenjamin Otte <otte@redhat.com>
Sun, 18 Mar 2018 23:25:17 +0000 (00:25 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 18 Mar 2018 23:28:20 +0000 (00:28 +0100)
That function was missing.

gtk/gtkvideo.c

index b6c1edd690be301b421d4af203df5f836e7367ae..eb13ead95ee0a972c95c30478484cd9e4f840555 100644 (file)
@@ -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