waylandsink: rename GstWlDisplay::formats array to shm_formats

These formats are specific to the wl_shm interface. We are going
to add dmabuf formats later as well.
This commit is contained in:
George Kiagiadakis 2015-08-30 14:55:11 +02:00
parent 28194c0c11
commit abcc8eafed
3 changed files with 6 additions and 6 deletions

View 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;

View 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 = {

View 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;