libobs/media-io: Add colorspace to video info

This is useful for keeping track of what the current colorspace/range is
if a YUV format is being used.
This commit is contained in:
jp9000 2014-12-11 19:47:51 -08:00
parent 56899df08f
commit 59c4731aa6

View File

@ -46,6 +46,18 @@ enum video_format {
VIDEO_FORMAT_BGRX,
};
enum video_colorspace {
VIDEO_CS_DEFAULT,
VIDEO_CS_601,
VIDEO_CS_709,
};
enum video_range_type {
VIDEO_RANGE_DEFAULT,
VIDEO_RANGE_PARTIAL,
VIDEO_RANGE_FULL
};
struct video_data {
uint8_t *data[MAX_AV_PLANES];
uint32_t linesize[MAX_AV_PLANES];
@ -60,6 +72,9 @@ struct video_output_info {
uint32_t fps_den;
uint32_t width;
uint32_t height;
enum video_colorspace colorspace;
enum video_range_type range;
};
static inline bool format_is_yuv(enum video_format format)
@ -89,18 +104,6 @@ enum video_scale_type {
VIDEO_SCALE_BICUBIC,
};
enum video_colorspace {
VIDEO_CS_DEFAULT,
VIDEO_CS_601,
VIDEO_CS_709,
};
enum video_range_type {
VIDEO_RANGE_DEFAULT,
VIDEO_RANGE_PARTIAL,
VIDEO_RANGE_FULL
};
struct video_scale_info {
enum video_format format;
uint32_t width;