diff --git a/libobs/media-io/video-io.h b/libobs/media-io/video-io.h index 7fae63c10..cef009dd0 100644 --- a/libobs/media-io/video-io.h +++ b/libobs/media-io/video-io.h @@ -103,6 +103,24 @@ static inline bool format_is_yuv(enum video_format format) return false; } +static inline const char *get_video_format_name(enum video_format format) +{ + switch (format) { + case VIDEO_FORMAT_I420: return "I420"; + case VIDEO_FORMAT_NV12: return "NV12"; + case VIDEO_FORMAT_YVYU: return "YVYU"; + case VIDEO_FORMAT_YUY2: return "YUY2"; + case VIDEO_FORMAT_UYVY: return "UYVY"; + case VIDEO_FORMAT_RGBA: return "RGBA"; + case VIDEO_FORMAT_BGRA: return "BGRA"; + case VIDEO_FORMAT_BGRX: return "BGRX"; + case VIDEO_FORMAT_I444: return "I444"; + case VIDEO_FORMAT_NONE:; + } + + return "None"; +} + enum video_scale_type { VIDEO_SCALE_DEFAULT, VIDEO_SCALE_POINT,