Commit 5fcdabd9 authored by Edward Hervey's avatar Edward Hervey
Browse files

video: specify/restrict usage of GST_VIDEO_FORMAT_ENCODED

GST_VIDEO_FORMAT_ENCODED was added to support *extracting* video-related
information (like width, height, framerate,...) from caps.

It is __NOT__ intended to be used as a format field on video/x-raw caps.
parent 1966b85b
...@@ -29,7 +29,7 @@ G_BEGIN_DECLS ...@@ -29,7 +29,7 @@ G_BEGIN_DECLS
/** /**
* GstVideoFormat: * GstVideoFormat:
* @GST_VIDEO_FORMAT_UNKNOWN: Unknown or unset video format id * @GST_VIDEO_FORMAT_UNKNOWN: Unknown or unset video format id
* @GST_VIDEO_FORMAT_ENCODED: Encoded video format * @GST_VIDEO_FORMAT_ENCODED: Encoded video format (NOTE: not for use in "video/x-raw")
* @GST_VIDEO_FORMAT_I420: planar 4:2:0 YUV * @GST_VIDEO_FORMAT_I420: planar 4:2:0 YUV
* @GST_VIDEO_FORMAT_YV12: planar 4:2:0 YVU (like I420 but UV planes swapped) * @GST_VIDEO_FORMAT_YV12: planar 4:2:0 YVU (like I420 but UV planes swapped)
* @GST_VIDEO_FORMAT_YUY2: packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...) * @GST_VIDEO_FORMAT_YUY2: packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...)
......
...@@ -317,6 +317,7 @@ gst_video_info_to_caps (GstVideoInfo * info) ...@@ -317,6 +317,7 @@ gst_video_info_to_caps (GstVideoInfo * info)
g_return_val_if_fail (info != NULL, NULL); g_return_val_if_fail (info != NULL, NULL);
g_return_val_if_fail (info->finfo != NULL, NULL); g_return_val_if_fail (info->finfo != NULL, NULL);
g_return_val_if_fail (info->finfo->format != GST_VIDEO_FORMAT_UNKNOWN, NULL); g_return_val_if_fail (info->finfo->format != GST_VIDEO_FORMAT_UNKNOWN, NULL);
g_return_val_if_fail (info->finfo->format != GST_VIDEO_FORMAT_ENCODED, NULL);
format = gst_video_format_to_string (info->finfo->format); format = gst_video_format_to_string (info->finfo->format);
g_return_val_if_fail (format != NULL, NULL); g_return_val_if_fail (format != NULL, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment