libobs: Add function to get video format name
This commit is contained in:
parent
881d1a79d2
commit
1b53215b99
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user