waylandsink: rename video format conversion functions to indicate they are about...
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Fri, 20 Jun 2014 13:24:36 +0000 (16:24 +0300)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Sat, 11 Oct 2014 12:57:14 +0000 (14:57 +0200)
Needed to add linux_dmabuf format conversion functions later

ext/wayland/gstwaylandsink.c
ext/wayland/wlshmallocator.c
ext/wayland/wlvideoformat.c
ext/wayland/wlvideoformat.h

index ef669d3..0b9b899 100644 (file)
@@ -410,7 +410,7 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
     formats = sink->display->formats;
     for (i = 0; i < formats->len; i++) {
       fmt = g_array_index (formats, uint32_t, i);
-      g_value_set_string (&value, gst_wayland_format_to_string (fmt));
+      g_value_set_string (&value, gst_wl_shm_format_to_string (fmt));
       gst_value_list_append_value (&list, &value);
     }
 
@@ -453,7 +453,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
   if (!gst_video_info_from_caps (&info, caps))
     goto invalid_format;
 
-  format = gst_video_format_to_wayland_format (GST_VIDEO_INFO_FORMAT (&info));
+  format = gst_video_format_to_wl_shm_format (GST_VIDEO_INFO_FORMAT (&info));
   if ((gint) format == -1)
     goto invalid_format;
 
@@ -497,7 +497,7 @@ invalid_format:
 unsupported_format:
   {
     GST_DEBUG_OBJECT (sink, "Format %s is not available on the display",
-        gst_wayland_format_to_string (format));
+        gst_wl_shm_format_to_string (format));
     return FALSE;
   }
 pool_failed:
index 78d6334..183795c 100644 (file)
@@ -159,7 +159,7 @@ gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
   height = GST_VIDEO_INFO_HEIGHT (info);
   stride = GST_VIDEO_INFO_PLANE_STRIDE (info, 0);
   size = GST_VIDEO_INFO_SIZE (info);
-  format = gst_video_format_to_wayland_format (GST_VIDEO_INFO_FORMAT (info));
+  format = gst_video_format_to_wl_shm_format (GST_VIDEO_INFO_FORMAT (info));
 
   g_return_val_if_fail (gst_is_wl_shm_memory (mem), NULL);
   g_return_val_if_fail (size <= mem->size, NULL);
@@ -167,7 +167,7 @@ gst_wl_shm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
 
   GST_DEBUG_OBJECT (mem->allocator, "Creating wl_buffer of size %"
       G_GSSIZE_FORMAT " (%d x %d, stride %d), format %s", size, width, height,
-      stride, gst_wayland_format_to_string (format));
+      stride, gst_wl_shm_format_to_string (format));
 
   wl_pool = wl_shm_create_pool (display->shm, shm_mem->fd, mem->size);
   wbuffer = wl_shm_pool_create_buffer (wl_pool, 0, width, height, stride,
index f2166f9..1302da6 100644 (file)
@@ -78,7 +78,7 @@ static const wl_VideoFormat formats[] = {
 };
 
 enum wl_shm_format
-gst_video_format_to_wayland_format (GstVideoFormat format)
+gst_video_format_to_wl_shm_format (GstVideoFormat format)
 {
   guint i;
 
@@ -86,12 +86,12 @@ gst_video_format_to_wayland_format (GstVideoFormat format)
     if (formats[i].gst_format == format)
       return formats[i].wl_format;
 
-  GST_WARNING ("wayland video format not found");
+  GST_WARNING ("wayland shm video format not found");
   return -1;
 }
 
 GstVideoFormat
-gst_wayland_format_to_video_format (enum wl_shm_format wl_format)
+gst_wl_shm_format_to_video_format (enum wl_shm_format wl_format)
 {
   guint i;
 
@@ -104,8 +104,8 @@ gst_wayland_format_to_video_format (enum wl_shm_format wl_format)
 }
 
 const gchar *
-gst_wayland_format_to_string (enum wl_shm_format wl_format)
+gst_wl_shm_format_to_string (enum wl_shm_format wl_format)
 {
   return gst_video_format_to_string
-      (gst_wayland_format_to_video_format (wl_format));
+      (gst_wl_shm_format_to_video_format (wl_format));
 }
index 72efc81..833b98d 100644 (file)
 
 G_BEGIN_DECLS
 
-enum wl_shm_format gst_video_format_to_wayland_format (GstVideoFormat format);
-GstVideoFormat gst_wayland_format_to_video_format (enum wl_shm_format wl_format);
+enum wl_shm_format gst_video_format_to_wl_shm_format (GstVideoFormat format);
+GstVideoFormat gst_wl_shm_format_to_video_format (enum wl_shm_format wl_format);
 
-const gchar *gst_wayland_format_to_string (enum wl_shm_format wl_format);
+const gchar *gst_wl_shm_format_to_string (enum wl_shm_format wl_format);
 
 G_END_DECLS