audio/video add descriptions

Add a description to the audio and video format info in case we want to use this
later.
This commit is contained in:
Wim Taymans 2011-09-06 16:46:48 +02:00
parent c0d31dd555
commit f04b8fd8af
4 changed files with 151 additions and 85 deletions

View file

@ -37,8 +37,8 @@
#define SINT (GST_AUDIO_FORMAT_FLAG_INTEGER | GST_AUDIO_FORMAT_FLAG_SIGNED)
#define UINT (GST_AUDIO_FORMAT_FLAG_INTEGER)
#define MAKE_FORMAT(str,flags,end,width,depth,silent) \
{ GST_AUDIO_FORMAT_ ##str, G_STRINGIFY(str), flags, end, width, depth, silent }
#define MAKE_FORMAT(str,desc,flags,end,width,depth,silent) \
{ GST_AUDIO_FORMAT_ ##str, G_STRINGIFY(str), desc, flags, end, width, depth, silent }
#define SILENT_0 { 0, 0, 0, 0, 0, 0, 0, 0 }
#define SILENT_U8 { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }
@ -58,46 +58,74 @@
static GstAudioFormatInfo formats[] = {
{GST_AUDIO_FORMAT_UNKNOWN, "UNKNOWN", 0, 0, 0, 0},
/* 8 bit */
MAKE_FORMAT (S8, SINT, 0, 8, 8, SILENT_0),
MAKE_FORMAT (U8, UINT, 0, 8, 8, SILENT_U8),
MAKE_FORMAT (S8, "8-bit signed PCM audio", SINT, 0, 8, 8, SILENT_0),
MAKE_FORMAT (U8, "8-bit unsigned PCM audio", UINT, 0, 8, 8, SILENT_U8),
/* 16 bit */
MAKE_FORMAT (S16LE, SINT, G_LITTLE_ENDIAN, 16, 16, SILENT_0),
MAKE_FORMAT (S16BE, SINT, G_BIG_ENDIAN, 16, 16, SILENT_0),
MAKE_FORMAT (U16LE, UINT, G_LITTLE_ENDIAN, 16, 16, SILENT_U16LE),
MAKE_FORMAT (U16BE, UINT, G_BIG_ENDIAN, 16, 16, SILENT_U16BE),
MAKE_FORMAT (S16LE, "16-bit signed PCM audio", SINT, G_LITTLE_ENDIAN, 16, 16,
SILENT_0),
MAKE_FORMAT (S16BE, "16-bit signed PCM audio", SINT, G_BIG_ENDIAN, 16, 16,
SILENT_0),
MAKE_FORMAT (U16LE, "16-bit unsigned PCM audio", UINT, G_LITTLE_ENDIAN, 16,
16, SILENT_U16LE),
MAKE_FORMAT (U16BE, "16-bit unsigned PCM audio", UINT, G_BIG_ENDIAN, 16, 16,
SILENT_U16BE),
/* 24 bit in low 3 bytes of 32 bits */
MAKE_FORMAT (S24_32LE, SINT, G_LITTLE_ENDIAN, 32, 24, SILENT_0),
MAKE_FORMAT (S24_32BE, SINT, G_BIG_ENDIAN, 32, 24, SILENT_0),
MAKE_FORMAT (U24_32LE, UINT, G_LITTLE_ENDIAN, 32, 24, SILENT_U24_32LE),
MAKE_FORMAT (U24_32BE, UINT, G_BIG_ENDIAN, 32, 24, SILENT_U24_32BE),
MAKE_FORMAT (S24_32LE, "24-bit signed PCM audio", SINT, G_LITTLE_ENDIAN, 32,
24, SILENT_0),
MAKE_FORMAT (S24_32BE, "24-bit signed PCM audio", SINT, G_BIG_ENDIAN, 32, 24,
SILENT_0),
MAKE_FORMAT (U24_32LE, "24-bit unsigned PCM audio", UINT, G_LITTLE_ENDIAN, 32,
24, SILENT_U24_32LE),
MAKE_FORMAT (U24_32BE, "24-bit unsigned PCM audio", UINT, G_BIG_ENDIAN, 32,
24, SILENT_U24_32BE),
/* 32 bit */
MAKE_FORMAT (S32LE, SINT, G_LITTLE_ENDIAN, 32, 32, SILENT_0),
MAKE_FORMAT (S32BE, SINT, G_BIG_ENDIAN, 32, 32, SILENT_0),
MAKE_FORMAT (U32LE, UINT, G_LITTLE_ENDIAN, 32, 32, SILENT_U32LE),
MAKE_FORMAT (U32BE, UINT, G_BIG_ENDIAN, 32, 32, SILENT_U32BE),
MAKE_FORMAT (S32LE, "32-bit signed PCM audio", SINT, G_LITTLE_ENDIAN, 32, 32,
SILENT_0),
MAKE_FORMAT (S32BE, "32-bit signed PCM audio", SINT, G_BIG_ENDIAN, 32, 32,
SILENT_0),
MAKE_FORMAT (U32LE, "32-bit unsigned PCM audio", UINT, G_LITTLE_ENDIAN, 32,
32, SILENT_U32LE),
MAKE_FORMAT (U32BE, "32-bit unsigned PCM audio", UINT, G_BIG_ENDIAN, 32, 32,
SILENT_U32BE),
/* 24 bit in 3 bytes */
MAKE_FORMAT (S24LE, SINT, G_LITTLE_ENDIAN, 24, 24, SILENT_0),
MAKE_FORMAT (S24BE, SINT, G_BIG_ENDIAN, 24, 24, SILENT_0),
MAKE_FORMAT (U24LE, UINT, G_LITTLE_ENDIAN, 24, 24, SILENT_U24LE),
MAKE_FORMAT (U24BE, UINT, G_BIG_ENDIAN, 24, 24, SILENT_U24BE),
MAKE_FORMAT (S24LE, "24-bit signed PCM audio", SINT, G_LITTLE_ENDIAN, 24, 24,
SILENT_0),
MAKE_FORMAT (S24BE, "24-bit signed PCM audio", SINT, G_BIG_ENDIAN, 24, 24,
SILENT_0),
MAKE_FORMAT (U24LE, "24-bit unsigned PCM audio", UINT, G_LITTLE_ENDIAN, 24,
24, SILENT_U24LE),
MAKE_FORMAT (U24BE, "24-bit unsigned PCM audio", UINT, G_BIG_ENDIAN, 24, 24,
SILENT_U24BE),
/* 20 bit in 3 bytes */
MAKE_FORMAT (S20LE, SINT, G_LITTLE_ENDIAN, 24, 20, SILENT_0),
MAKE_FORMAT (S20BE, SINT, G_BIG_ENDIAN, 24, 20, SILENT_0),
MAKE_FORMAT (U20LE, UINT, G_LITTLE_ENDIAN, 24, 20, SILENT_U20LE),
MAKE_FORMAT (U20BE, UINT, G_BIG_ENDIAN, 24, 20, SILENT_U20BE),
MAKE_FORMAT (S20LE, "20-bit signed PCM audio", SINT, G_LITTLE_ENDIAN, 24, 20,
SILENT_0),
MAKE_FORMAT (S20BE, "20-bit signed PCM audio", SINT, G_BIG_ENDIAN, 24, 20,
SILENT_0),
MAKE_FORMAT (U20LE, "20-bit unsigned PCM audio", UINT, G_LITTLE_ENDIAN, 24,
20, SILENT_U20LE),
MAKE_FORMAT (U20BE, "20-bit unsigned PCM audio", UINT, G_BIG_ENDIAN, 24, 20,
SILENT_U20BE),
/* 18 bit in 3 bytes */
MAKE_FORMAT (S18LE, SINT, G_LITTLE_ENDIAN, 24, 18, SILENT_0),
MAKE_FORMAT (S18BE, SINT, G_BIG_ENDIAN, 24, 18, SILENT_0),
MAKE_FORMAT (U18LE, UINT, G_LITTLE_ENDIAN, 24, 18, SILENT_U18LE),
MAKE_FORMAT (U18BE, UINT, G_BIG_ENDIAN, 24, 18, SILENT_U18BE),
MAKE_FORMAT (S18LE, "18-bit signed PCM audio", SINT, G_LITTLE_ENDIAN, 24, 18,
SILENT_0),
MAKE_FORMAT (S18BE, "18-bit signed PCM audio", SINT, G_BIG_ENDIAN, 24, 18,
SILENT_0),
MAKE_FORMAT (U18LE, "18-bit unsigned PCM audio", UINT, G_LITTLE_ENDIAN, 24,
18, SILENT_U18LE),
MAKE_FORMAT (U18BE, "18-bit unsigned PCM audio", UINT, G_BIG_ENDIAN, 24, 18,
SILENT_U18BE),
/* float */
MAKE_FORMAT (F32LE, GST_AUDIO_FORMAT_FLAG_FLOAT, G_LITTLE_ENDIAN, 32, 32,
MAKE_FORMAT (F32LE, "32-bit floating-point audio",
GST_AUDIO_FORMAT_FLAG_FLOAT, G_LITTLE_ENDIAN, 32, 32,
SILENT_0),
MAKE_FORMAT (F32BE, GST_AUDIO_FORMAT_FLAG_FLOAT, G_BIG_ENDIAN, 32, 32,
MAKE_FORMAT (F32BE, "32-bit floating-point audio",
GST_AUDIO_FORMAT_FLAG_FLOAT, G_BIG_ENDIAN, 32, 32,
SILENT_0),
MAKE_FORMAT (F64LE, GST_AUDIO_FORMAT_FLAG_FLOAT, G_LITTLE_ENDIAN, 64, 64,
MAKE_FORMAT (F64LE, "64-bit floating-point audio",
GST_AUDIO_FORMAT_FLAG_FLOAT, G_LITTLE_ENDIAN, 64, 64,
SILENT_0),
MAKE_FORMAT (F64BE, GST_AUDIO_FORMAT_FLAG_FLOAT, G_BIG_ENDIAN, 64, 64,
MAKE_FORMAT (F64BE, "64-bit floating-point audio",
GST_AUDIO_FORMAT_FLAG_FLOAT, G_BIG_ENDIAN, 64, 64,
SILENT_0)
};

View file

@ -189,6 +189,7 @@ typedef void (*GstAudioFormatPack) (GstAudioFormatInfo *info, const gp
* GstAudioFormatInfo:
* @format: #GstAudioFormat
* @name: string representation of the format
* @description: user readable description of the format
* @flags: #GstAudioFormatFlags
* @endianness: the endianness
* @width: amount of bits used for one sample
@ -203,6 +204,7 @@ typedef void (*GstAudioFormatPack) (GstAudioFormatInfo *info, const gp
struct _GstAudioFormatInfo {
GstAudioFormat format;
const gchar *name;
const gchar *description;
GstAudioFormatFlags flags;
gint endianness;
gint width;

View file

@ -100,93 +100,127 @@ typedef struct
#define SUB4444 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
#define SUB4204 { 0, 1, 1, 0 }, { 0, 1, 1, 0 }
#define MAKE_YUV_FORMAT(name, fourcc, depth, pstride, plane, offs, sub ) \
{ fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), GST_VIDEO_FORMAT_FLAG_YUV, depth, pstride, plane, offs, sub } }
#define MAKE_YUVA_FORMAT(name, fourcc, depth, pstride, plane, offs, sub) \
{ fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), GST_VIDEO_FORMAT_FLAG_YUV | GST_VIDEO_FORMAT_FLAG_ALPHA, depth, pstride, plane, offs, sub } }
#define MAKE_YUV_FORMAT(name, desc, fourcc, depth, pstride, plane, offs, sub ) \
{ fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_YUV, depth, pstride, plane, offs, sub } }
#define MAKE_YUVA_FORMAT(name, desc, fourcc, depth, pstride, plane, offs, sub) \
{ fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_YUV | GST_VIDEO_FORMAT_FLAG_ALPHA, depth, pstride, plane, offs, sub } }
#define MAKE_RGB_FORMAT(name, depth, pstride, plane, offs, sub) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), GST_VIDEO_FORMAT_FLAG_RGB, depth, pstride, plane, offs, sub } }
#define MAKE_RGBA_FORMAT(name, depth, pstride, plane, offs, sub) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), GST_VIDEO_FORMAT_FLAG_RGB | GST_VIDEO_FORMAT_FLAG_ALPHA, depth, pstride, plane, offs, sub } }
#define MAKE_RGB_FORMAT(name, desc, depth, pstride, plane, offs, sub) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_RGB, depth, pstride, plane, offs, sub } }
#define MAKE_RGBA_FORMAT(name, desc, depth, pstride, plane, offs, sub) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_RGB | GST_VIDEO_FORMAT_FLAG_ALPHA, depth, pstride, plane, offs, sub } }
#define MAKE_GRAY_FORMAT(name, depth, pstride, plane, offs, sub) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), GST_VIDEO_FORMAT_FLAG_GRAY, depth, pstride, plane, offs, sub } }
#define MAKE_GRAY_FORMAT(name, desc, depth, pstride, plane, offs, sub) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY, depth, pstride, plane, offs, sub } }
static VideoFormat formats[] = {
{0x00000000, {GST_VIDEO_FORMAT_UNKNOWN, "UNKNOWN", 0, DPTH0, PSTR0, PLANE_NA,
{0x00000000, {GST_VIDEO_FORMAT_UNKNOWN, "UNKNOWN", "unknown video", 0, DPTH0,
PSTR0, PLANE_NA,
OFFS0}},
MAKE_YUV_FORMAT (I420, GST_MAKE_FOURCC ('I', '4', '2', '0'), DPTH888, PSTR111,
MAKE_YUV_FORMAT (I420, "raw video", GST_MAKE_FOURCC ('I', '4', '2', '0'),
DPTH888, PSTR111,
PLANE012, OFFS0, SUB420),
MAKE_YUV_FORMAT (YV12, GST_MAKE_FOURCC ('Y', 'V', '1', '2'), DPTH888, PSTR111,
MAKE_YUV_FORMAT (YV12, "raw video", GST_MAKE_FOURCC ('Y', 'V', '1', '2'),
DPTH888, PSTR111,
PLANE021, OFFS0, SUB420),
MAKE_YUV_FORMAT (YUY2, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'), DPTH888, PSTR244,
MAKE_YUV_FORMAT (YUY2, "raw video", GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'),
DPTH888, PSTR244,
PLANE0, OFFS013, SUB422),
MAKE_YUV_FORMAT (UYVY, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'), DPTH888, PSTR244,
MAKE_YUV_FORMAT (UYVY, "raw video", GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'),
DPTH888, PSTR244,
PLANE0, OFFS102, SUB422),
MAKE_YUVA_FORMAT (AYUV, GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'), DPTH8888,
MAKE_YUVA_FORMAT (AYUV, "raw video", GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'),
DPTH8888,
PSTR4444, PLANE0, OFFS1230, SUB4444),
MAKE_RGB_FORMAT (RGBx, DPTH888, PSTR444, PLANE0, OFFS012, SUB444),
MAKE_RGB_FORMAT (BGRx, DPTH888, PSTR444, PLANE0, OFFS210, SUB444),
MAKE_RGB_FORMAT (xRGB, DPTH888, PSTR444, PLANE0, OFFS123, SUB444),
MAKE_RGB_FORMAT (xBGR, DPTH888, PSTR444, PLANE0, OFFS321, SUB444),
MAKE_RGBA_FORMAT (RGBA, DPTH8888, PSTR4444, PLANE0, OFFS0123, SUB4444),
MAKE_RGBA_FORMAT (BGRA, DPTH8888, PSTR4444, PLANE0, OFFS2103, SUB4444),
MAKE_RGBA_FORMAT (ARGB, DPTH8888, PSTR4444, PLANE0, OFFS1230, SUB4444),
MAKE_RGBA_FORMAT (ABGR, DPTH8888, PSTR4444, PLANE0, OFFS3210, SUB4444),
MAKE_RGB_FORMAT (RGB, DPTH888, PSTR333, PLANE0, OFFS012, SUB444),
MAKE_RGB_FORMAT (BGR, DPTH888, PSTR333, PLANE0, OFFS210, SUB444),
MAKE_RGB_FORMAT (RGBx, "raw video", DPTH888, PSTR444, PLANE0, OFFS012,
SUB444),
MAKE_RGB_FORMAT (BGRx, "raw video", DPTH888, PSTR444, PLANE0, OFFS210,
SUB444),
MAKE_RGB_FORMAT (xRGB, "raw video", DPTH888, PSTR444, PLANE0, OFFS123,
SUB444),
MAKE_RGB_FORMAT (xBGR, "raw video", DPTH888, PSTR444, PLANE0, OFFS321,
SUB444),
MAKE_RGBA_FORMAT (RGBA, "raw video", DPTH8888, PSTR4444, PLANE0, OFFS0123,
SUB4444),
MAKE_RGBA_FORMAT (BGRA, "raw video", DPTH8888, PSTR4444, PLANE0, OFFS2103,
SUB4444),
MAKE_RGBA_FORMAT (ARGB, "raw video", DPTH8888, PSTR4444, PLANE0, OFFS1230,
SUB4444),
MAKE_RGBA_FORMAT (ABGR, "raw video", DPTH8888, PSTR4444, PLANE0, OFFS3210,
SUB4444),
MAKE_RGB_FORMAT (RGB, "raw video", DPTH888, PSTR333, PLANE0, OFFS012, SUB444),
MAKE_RGB_FORMAT (BGR, "raw video", DPTH888, PSTR333, PLANE0, OFFS210, SUB444),
MAKE_YUV_FORMAT (Y41B, GST_MAKE_FOURCC ('Y', '4', '1', 'B'), DPTH888, PSTR111,
MAKE_YUV_FORMAT (Y41B, "raw video", GST_MAKE_FOURCC ('Y', '4', '1', 'B'),
DPTH888, PSTR111,
PLANE012, OFFS0, SUB411),
MAKE_YUV_FORMAT (Y42B, GST_MAKE_FOURCC ('Y', '4', '2', 'B'), DPTH888, PSTR111,
MAKE_YUV_FORMAT (Y42B, "raw video", GST_MAKE_FOURCC ('Y', '4', '2', 'B'),
DPTH888, PSTR111,
PLANE012, OFFS0, SUB422),
MAKE_YUV_FORMAT (YVYU, GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U'), DPTH888, PSTR244,
MAKE_YUV_FORMAT (YVYU, "raw video", GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U'),
DPTH888, PSTR244,
PLANE0, OFFS031, SUB422),
MAKE_YUV_FORMAT (Y444, GST_MAKE_FOURCC ('Y', '4', '4', '4'), DPTH888, PSTR111,
MAKE_YUV_FORMAT (Y444, "raw video", GST_MAKE_FOURCC ('Y', '4', '4', '4'),
DPTH888, PSTR111,
PLANE012, OFFS0, SUB444),
MAKE_YUV_FORMAT (v210, GST_MAKE_FOURCC ('v', '2', '1', '0'), DPTH10_10_10,
MAKE_YUV_FORMAT (v210, "raw video", GST_MAKE_FOURCC ('v', '2', '1', '0'),
DPTH10_10_10,
PSTR0, PLANE0, OFFS0, SUB422),
MAKE_YUV_FORMAT (v216, GST_MAKE_FOURCC ('v', '2', '1', '6'), DPTH16_16_16,
MAKE_YUV_FORMAT (v216, "raw video", GST_MAKE_FOURCC ('v', '2', '1', '6'),
DPTH16_16_16,
PSTR488, PLANE0, OFFS026, SUB422),
MAKE_YUV_FORMAT (NV12, GST_MAKE_FOURCC ('N', 'V', '1', '2'), DPTH888, PSTR122,
MAKE_YUV_FORMAT (NV12, "raw video", GST_MAKE_FOURCC ('N', 'V', '1', '2'),
DPTH888, PSTR122,
PLANE011, OFFS001, SUB420),
MAKE_YUV_FORMAT (NV21, GST_MAKE_FOURCC ('N', 'V', '2', '1'), DPTH888, PSTR122,
MAKE_YUV_FORMAT (NV21, "raw video", GST_MAKE_FOURCC ('N', 'V', '2', '1'),
DPTH888, PSTR122,
PLANE011, OFFS010, SUB420),
MAKE_GRAY_FORMAT (GRAY8, DPTH8, PSTR1, PLANE0, OFFS0, SUB4),
MAKE_GRAY_FORMAT (GRAY16_BE, DPTH16, PSTR2, PLANE0, OFFS0, SUB4),
MAKE_GRAY_FORMAT (GRAY16_LE, DPTH16, PSTR2, PLANE0, OFFS0, SUB4),
MAKE_GRAY_FORMAT (GRAY8, "raw video", DPTH8, PSTR1, PLANE0, OFFS0, SUB4),
MAKE_GRAY_FORMAT (GRAY16_BE, "raw video", DPTH16, PSTR2, PLANE0, OFFS0, SUB4),
MAKE_GRAY_FORMAT (GRAY16_LE, "raw video", DPTH16, PSTR2, PLANE0, OFFS0, SUB4),
MAKE_YUV_FORMAT (v308, GST_MAKE_FOURCC ('v', '3', '0', '8'), DPTH888, PSTR333,
MAKE_YUV_FORMAT (v308, "raw video", GST_MAKE_FOURCC ('v', '3', '0', '8'),
DPTH888, PSTR333,
PLANE0, OFFS012, SUB444),
MAKE_YUV_FORMAT (Y800, GST_MAKE_FOURCC ('Y', '8', '0', '0'), DPTH8, PSTR1,
MAKE_YUV_FORMAT (Y800, "raw video", GST_MAKE_FOURCC ('Y', '8', '0', '0'),
DPTH8, PSTR1,
PLANE0, OFFS0, SUB4),
MAKE_YUV_FORMAT (Y16, GST_MAKE_FOURCC ('Y', '1', '6', ' '), DPTH16, PSTR2,
MAKE_YUV_FORMAT (Y16, "raw video", GST_MAKE_FOURCC ('Y', '1', '6', ' '),
DPTH16, PSTR2,
PLANE0, OFFS0, SUB4),
MAKE_RGB_FORMAT (RGB16, DPTH565, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_RGB_FORMAT (BGR16, DPTH565, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_RGB_FORMAT (RGB15, DPTH555, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_RGB_FORMAT (BGR15, DPTH555, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_RGB_FORMAT (RGB16, "raw video", DPTH565, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_RGB_FORMAT (BGR16, "raw video", DPTH565, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_RGB_FORMAT (RGB15, "raw video", DPTH555, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_RGB_FORMAT (BGR15, "raw video", DPTH555, PSTR222, PLANE0, OFFS0, SUB444),
MAKE_YUV_FORMAT (UYVP, GST_MAKE_FOURCC ('U', 'Y', 'V', 'P'), DPTH10_10_10,
MAKE_YUV_FORMAT (UYVP, "raw video", GST_MAKE_FOURCC ('U', 'Y', 'V', 'P'),
DPTH10_10_10,
PSTR0, PLANE0, OFFS0, SUB422),
MAKE_YUVA_FORMAT (A420, GST_MAKE_FOURCC ('A', '4', '2', '0'), DPTH8888,
MAKE_YUVA_FORMAT (A420, "raw video", GST_MAKE_FOURCC ('A', '4', '2', '0'),
DPTH8888,
PSTR1111, PLANE0123, OFFS0, SUB4204),
MAKE_RGBA_FORMAT (RGB8_PALETTED, DPTH8888, PSTR1111, PLANE0, OFFS0, SUB4444),
MAKE_YUV_FORMAT (YUV9, GST_MAKE_FOURCC ('Y', 'U', 'V', '9'), DPTH888, PSTR111,
MAKE_RGBA_FORMAT (RGB8_PALETTED, "raw video", DPTH8888, PSTR1111, PLANE0,
OFFS0, SUB4444),
MAKE_YUV_FORMAT (YUV9, "raw video", GST_MAKE_FOURCC ('Y', 'U', 'V', '9'),
DPTH888, PSTR111,
PLANE012, OFFS0, SUB410),
MAKE_YUV_FORMAT (YVU9, GST_MAKE_FOURCC ('Y', 'V', 'U', '9'), DPTH888, PSTR111,
MAKE_YUV_FORMAT (YVU9, "raw video", GST_MAKE_FOURCC ('Y', 'V', 'U', '9'),
DPTH888, PSTR111,
PLANE021, OFFS0, SUB410),
MAKE_YUV_FORMAT (IYU1, GST_MAKE_FOURCC ('I', 'Y', 'U', '1'), DPTH888, PSTR0,
MAKE_YUV_FORMAT (IYU1, "raw video", GST_MAKE_FOURCC ('I', 'Y', 'U', '1'),
DPTH888, PSTR0,
PLANE0, OFFS104, SUB411),
MAKE_RGBA_FORMAT (ARGB64, DPTH16_16_16_16, PSTR8888, PLANE0, OFFS2460,
MAKE_RGBA_FORMAT (ARGB64, "raw video", DPTH16_16_16_16, PSTR8888, PLANE0,
OFFS2460,
SUB444),
MAKE_YUVA_FORMAT (AYUV64, 0x00000000, DPTH16_16_16_16, PSTR8888, PLANE0,
MAKE_YUVA_FORMAT (AYUV64, "raw video", 0x00000000, DPTH16_16_16_16, PSTR8888,
PLANE0,
OFFS2460, SUB444),
MAKE_YUV_FORMAT (r210, GST_MAKE_FOURCC ('r', '2', '1', '0'), DPTH10_10_10,
MAKE_YUV_FORMAT (r210, "raw video", GST_MAKE_FOURCC ('r', '2', '1', '0'),
DPTH10_10_10,
PSTR444, PLANE0, OFFS0, SUB444),
};

View file

@ -206,6 +206,7 @@ typedef void (*GstVideoFormatPack) (GstVideoFormatInfo *info, const gp
* GstVideoFormatInfo:
* @format: #GstVideoFormat
* @name: string representation of the format
* @description: use readable description of the format
* @flags: #GstVideoFormatFlags
* @bits: The number of bits used to pack data items. This can be less than 8
* when multiple pixels are stored in a byte. for values > 8 multiple bytes
@ -236,6 +237,7 @@ typedef void (*GstVideoFormatPack) (GstVideoFormatInfo *info, const gp
struct _GstVideoFormatInfo {
GstVideoFormat format;
const gchar *name;
const gchar *description;
GstVideoFormatFlags flags;
guint bits;
guint n_components;