waylandsink: rename GstWlDisplay::formats array to shm_formats
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Sun, 30 Aug 2015 12:55:11 +0000 (14:55 +0200)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Wed, 14 Oct 2015 20:05:52 +0000 (22:05 +0200)
These formats are specific to the wl_shm interface. We are going
to add dmabuf formats later as well.

ext/wayland/gstwaylandsink.c
ext/wayland/wldisplay.c
ext/wayland/wldisplay.h

index b4d6f61..a850a8a 100644 (file)
@@ -403,7 +403,7 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
     g_value_init (&list, GST_TYPE_LIST);
     g_value_init (&value, G_TYPE_STRING);
 
-    formats = sink->display->formats;
+    formats = sink->display->shm_formats;
     for (i = 0; i < formats->len; i++) {
       fmt = g_array_index (formats, uint32_t, i);
       g_value_set_string (&value, gst_wl_shm_format_to_string (fmt));
@@ -454,7 +454,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
     goto invalid_format;
 
   /* verify we support the requested format */
-  formats = sink->display->formats;
+  formats = sink->display->shm_formats;
   for (i = 0; i < formats->len; i++) {
     if (g_array_index (formats, uint32_t, i) == format)
       break;
index 8c5eeaf..616ded3 100644 (file)
@@ -44,7 +44,7 @@ gst_wl_display_class_init (GstWlDisplayClass * klass)
 static void
 gst_wl_display_init (GstWlDisplay * self)
 {
-  self->formats = g_array_new (FALSE, FALSE, sizeof (uint32_t));
+  self->shm_formats = g_array_new (FALSE, FALSE, sizeof (uint32_t));
   self->wl_fd_poll = gst_poll_new (TRUE);
   self->buffers = g_hash_table_new (g_direct_hash, g_direct_equal);
   g_mutex_init (&self->buffers_mutex);
@@ -69,7 +69,7 @@ gst_wl_display_finalize (GObject * gobject)
       (GHFunc) gst_wl_buffer_force_release_and_unref, NULL);
   g_hash_table_remove_all (self->buffers);
 
-  g_array_unref (self->formats);
+  g_array_unref (self->shm_formats);
   gst_poll_free (self->wl_fd_poll);
   g_hash_table_unref (self->buffers);
   g_mutex_clear (&self->buffers_mutex);
@@ -136,7 +136,7 @@ shm_format (void *data, struct wl_shm *wl_shm, uint32_t format)
 {
   GstWlDisplay *self = data;
 
-  g_array_append_val (self->formats, format);
+  g_array_append_val (self->shm_formats, format);
 }
 
 static const struct wl_shm_listener shm_listener = {
index 5505d60..e9df749 100644 (file)
@@ -52,7 +52,7 @@ struct _GstWlDisplay
   struct wl_shell *shell;
   struct wl_shm *shm;
   struct wl_scaler *scaler;
-  GArray *formats;
+  GArray *shm_formats;
 
   /* private */
   gboolean own_display;