From ee7968dd4a6a575b8b42b833937e158bba834402 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 20 Jun 2014 16:24:36 +0300 Subject: [PATCH] waylandsink: rename video format conversion functions to indicate they are about wl_shm Needed to add linux_dmabuf format conversion functions later --- ext/wayland/gstwaylandsink.c | 6 +++--- ext/wayland/wlshmallocator.c | 4 ++-- ext/wayland/wlvideoformat.c | 10 +++++----- ext/wayland/wlvideoformat.h | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index ef669d3..0b9b899 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -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: diff --git a/ext/wayland/wlshmallocator.c b/ext/wayland/wlshmallocator.c index 78d6334..183795c 100644 --- a/ext/wayland/wlshmallocator.c +++ b/ext/wayland/wlshmallocator.c @@ -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, diff --git a/ext/wayland/wlvideoformat.c b/ext/wayland/wlvideoformat.c index f2166f9..1302da6 100644 --- a/ext/wayland/wlvideoformat.c +++ b/ext/wayland/wlvideoformat.c @@ -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)); } diff --git a/ext/wayland/wlvideoformat.h b/ext/wayland/wlvideoformat.h index 72efc81..833b98d 100644 --- a/ext/wayland/wlvideoformat.h +++ b/ext/wayland/wlvideoformat.h @@ -29,10 +29,10 @@ 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 -- 2.7.4