mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
waylandsink: rename video format conversion functions to indicate they are about wl_shm
Needed to add linux_dmabuf format conversion functions later
This commit is contained in:
parent
4377a5d71c
commit
ee7968dd4a
4 changed files with 13 additions and 13 deletions
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue