mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst-libs/gst/video/video.c: Video format can also be conveniently determined from (many) non-fixed caps.
Original commit message from CVS: * gst-libs/gst/video/video.c: (gst_video_format_parse_caps): Video format can also be conveniently determined from (many) non-fixed caps.
This commit is contained in:
parent
024d0e56f5
commit
d6d5f88174
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-07-14 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
|
||||
|
||||
* gst-libs/gst/video/video.c: (gst_video_format_parse_caps):
|
||||
Video format can also be conveniently determined from (many)
|
||||
non-fixed caps.
|
||||
|
||||
2008-07-14 Jan Schmidt <thaytan@noraisin.net>
|
||||
|
||||
* gst/playback/gstplaybasebin.c:
|
||||
|
|
|
@ -223,8 +223,8 @@ error_overflow:
|
|||
* gst_video_format_parse_caps:
|
||||
* @caps: the #GstCaps to parse
|
||||
* @format: the #GstVideoFormat of the video represented by @caps (output)
|
||||
* @width: the width of the video represented by @caps (output)
|
||||
* @height: the height of the video represented by @caps (output)
|
||||
* @width: the width of the video represented by @caps, may be NULL (output)
|
||||
* @height: the height of the video represented by @caps, may be NULL (output)
|
||||
*
|
||||
* Determines the #GstVideoFormat of @caps and places it in the location
|
||||
* pointed to by @format. Extracts the size of the video and places it
|
||||
|
@ -243,7 +243,9 @@ gst_video_format_parse_caps (GstCaps * caps, GstVideoFormat * format,
|
|||
GstStructure *structure;
|
||||
gboolean ok = TRUE;
|
||||
|
||||
if (!gst_caps_is_fixed (caps))
|
||||
/* caps must hold exactly 1 structure to be unambiguous,
|
||||
* but need not be fixed to determine format */
|
||||
if (gst_caps_get_size (caps) != 1)
|
||||
return FALSE;
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
|
Loading…
Reference in a new issue