浏览代码

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.
jp9000 11 年之前
父节点
当前提交
59c4731aa6
共有 1 个文件被更改,包括 15 次插入12 次删除
  1. 15 12
      libobs/media-io/video-io.h

+ 15 - 12
libobs/media-io/video-io.h

@@ -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;