mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
video: Add color-matrix handling to caps
This commit is contained in:
parent
173b0758dc
commit
76afac25b4
2 changed files with 36 additions and 0 deletions
|
@ -249,6 +249,41 @@ gst_video_format_parse_caps_interlaced (GstCaps * caps, gboolean * interlaced)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_video_parse_caps_color_matrix:
|
||||||
|
* @caps: the fixed #GstCaps to parse
|
||||||
|
*
|
||||||
|
* Extracts the color matrix used by the caps. Possible values are
|
||||||
|
* "sdtv" for the standard definition color matrix (as specified in
|
||||||
|
* Rec. ITU-R BT.470-6) or "hdtv" for the high definition color
|
||||||
|
* matrix (as specified in Rec. ITU-R BT.709)
|
||||||
|
*
|
||||||
|
* Since: 0.10.29
|
||||||
|
*
|
||||||
|
* Returns: TRUE if @caps was parsed correctly.
|
||||||
|
*/
|
||||||
|
const char *
|
||||||
|
gst_video_parse_caps_color_matrix (GstCaps * caps)
|
||||||
|
{
|
||||||
|
GstStructure *structure;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
if (!gst_caps_is_fixed (caps))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
|
s = gst_structure_get_string (structure, "color-matrix");
|
||||||
|
if (s)
|
||||||
|
return s;
|
||||||
|
|
||||||
|
if (gst_structure_has_name (structure, "video/x-raw-yuv")) {
|
||||||
|
return "sdtv";
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_video_format_parse_caps:
|
* gst_video_format_parse_caps:
|
||||||
* @caps: the #GstCaps to parse
|
* @caps: the #GstCaps to parse
|
||||||
|
|
|
@ -291,6 +291,7 @@ gboolean gst_video_parse_caps_framerate (GstCaps *caps,
|
||||||
int *fps_n, int *fps_d);
|
int *fps_n, int *fps_d);
|
||||||
gboolean gst_video_parse_caps_pixel_aspect_ratio (GstCaps *caps,
|
gboolean gst_video_parse_caps_pixel_aspect_ratio (GstCaps *caps,
|
||||||
int *par_n, int *par_d);
|
int *par_n, int *par_d);
|
||||||
|
const char *gst_video_parse_caps_color_matrix (GstCaps * caps);
|
||||||
GstCaps * gst_video_format_new_caps (GstVideoFormat format,
|
GstCaps * gst_video_format_new_caps (GstVideoFormat format,
|
||||||
int width, int height, int framerate_n, int framerate_d,
|
int width, int height, int framerate_n, int framerate_d,
|
||||||
int par_n, int par_d);
|
int par_n, int par_d);
|
||||||
|
|
Loading…
Reference in a new issue