mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 05:52:37 +00:00
libs: add and expose gst_vaapi_video_format_to_string() helper.
This is just a wrapper over gst_video_format_to_string() for older GStreamer 0.10 builds.
This commit is contained in:
parent
b868c6d888
commit
4a8a80061f
5 changed files with 23 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>videoformat</FILE>
|
<FILE>videoformat</FILE>
|
||||||
<TITLE>GstVideoFormat</TITLE>
|
<TITLE>GstVideoFormat</TITLE>
|
||||||
|
gst_vaapi_video_format_to_string
|
||||||
gst_vaapi_video_format_from_caps
|
gst_vaapi_video_format_from_caps
|
||||||
gst_vaapi_video_format_from_structure
|
gst_vaapi_video_format_from_structure
|
||||||
gst_vaapi_video_format_from_va_format
|
gst_vaapi_video_format_from_va_format
|
||||||
|
|
|
@ -285,7 +285,7 @@ gst_vaapi_image_new(
|
||||||
g_return_val_if_fail(width > 0, NULL);
|
g_return_val_if_fail(width > 0, NULL);
|
||||||
g_return_val_if_fail(height > 0, NULL);
|
g_return_val_if_fail(height > 0, NULL);
|
||||||
|
|
||||||
GST_DEBUG("format %s, size %ux%u", gst_video_format_to_string(format),
|
GST_DEBUG("format %s, size %ux%u", gst_vaapi_video_format_to_string(format),
|
||||||
width, height);
|
width, height);
|
||||||
|
|
||||||
image = gst_vaapi_object_new(gst_vaapi_image_class(), display);
|
image = gst_vaapi_object_new(gst_vaapi_image_class(), display);
|
||||||
|
@ -435,7 +435,7 @@ _gst_vaapi_image_set_image(GstVaapiImage *image, const VAImage *va_image)
|
||||||
image->format = format;
|
image->format = format;
|
||||||
image->is_linear = TRUE;
|
image->is_linear = TRUE;
|
||||||
GST_DEBUG("linearized image to %s format",
|
GST_DEBUG("linearized image to %s format",
|
||||||
gst_video_format_to_string(format));
|
gst_vaapi_video_format_to_string(format));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ gst_vaapi_surface_create_with_format(GstVaapiSurface *surface,
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
error_unsupported_format:
|
error_unsupported_format:
|
||||||
GST_ERROR("unsupported format %u", gst_video_format_to_string(format));
|
GST_ERROR("unsupported format %u", gst_vaapi_video_format_to_string(format));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -256,7 +256,7 @@ gst_vaapi_surface_new_with_format(
|
||||||
GstVaapiSurface *surface;
|
GstVaapiSurface *surface;
|
||||||
|
|
||||||
GST_DEBUG("size %ux%u, format %s", width, height,
|
GST_DEBUG("size %ux%u, format %s", width, height,
|
||||||
gst_video_format_to_string(format));
|
gst_vaapi_video_format_to_string(format));
|
||||||
|
|
||||||
surface = gst_vaapi_object_new(gst_vaapi_surface_class(), display);
|
surface = gst_vaapi_object_new(gst_vaapi_surface_class(), display);
|
||||||
if (!surface)
|
if (!surface)
|
||||||
|
|
|
@ -139,6 +139,21 @@ get_map(GstVideoFormat format)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_vaapi_video_format_to_string:
|
||||||
|
* @format: a #GstVideoFormat
|
||||||
|
*
|
||||||
|
* Returns the string representation of the @format argument.
|
||||||
|
*
|
||||||
|
* Return value: string representation of @format, or %NULL if unknown
|
||||||
|
* or unsupported.
|
||||||
|
*/
|
||||||
|
const gchar *
|
||||||
|
gst_vaapi_video_format_to_string(GstVideoFormat format)
|
||||||
|
{
|
||||||
|
return gst_video_format_to_string(format);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_vaapi_video_format_is_rgb:
|
* gst_vaapi_video_format_is_rgb:
|
||||||
* @format: a #GstVideoFormat
|
* @format: a #GstVideoFormat
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
const char *
|
||||||
|
gst_vaapi_video_format_to_string(GstVideoFormat format);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_vaapi_video_format_is_rgb(GstVideoFormat format);
|
gst_vaapi_video_format_is_rgb(GstVideoFormat format);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue