mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-11 00:42:36 +00:00
video-format: Add macro checking for validity of GstVideoFormatInfo
Mostly to maintain consistency with the GST_AUDIO_FORMAT_INFO_IS_VALID_RAW macro. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2800>
This commit is contained in:
parent
3345d16aed
commit
d98c78251c
1 changed files with 11 additions and 0 deletions
|
@ -639,6 +639,17 @@ struct _GstVideoFormatInfo {
|
||||||
GstVideoTileInfo tile_info[GST_VIDEO_MAX_PLANES];
|
GstVideoTileInfo tile_info[GST_VIDEO_MAX_PLANES];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VIDEO_FORMAT_INFO_IS_VALID_RAW:
|
||||||
|
*
|
||||||
|
* Tests that the given #GstVideoFormatInfo represents a valid un-encoded
|
||||||
|
* format.
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
|
#define GST_VIDEO_FORMAT_INFO_IS_VALID_RAW(info) \
|
||||||
|
(info != NULL && (info)->format > GST_VIDEO_FORMAT_ENCODED)
|
||||||
|
|
||||||
#define GST_VIDEO_FORMAT_INFO_FORMAT(info) ((info)->format)
|
#define GST_VIDEO_FORMAT_INFO_FORMAT(info) ((info)->format)
|
||||||
#define GST_VIDEO_FORMAT_INFO_NAME(info) ((info)->name)
|
#define GST_VIDEO_FORMAT_INFO_NAME(info) ((info)->name)
|
||||||
#define GST_VIDEO_FORMAT_INFO_FLAGS(info) ((info)->flags)
|
#define GST_VIDEO_FORMAT_INFO_FLAGS(info) ((info)->flags)
|
||||||
|
|
Loading…
Reference in a new issue