X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_fourcc.h;h=0fe0c2dd9710b835d1bdaf6927e200442ad0d734;hb=66bd92014e5d721d8fe74bfd69f601bfd228012a;hp=c041a8e6c9fd774aa54154afb44d612b354f4aba;hpb=724461bdf250e856eb32f6c0b7c51b065e482982;p=vlc diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h index c041a8e6c9..0fe0c2dd97 100644 --- a/include/vlc_fourcc.h +++ b/include/vlc_fourcc.h @@ -29,8 +29,6 @@ /* Video codec */ #define VLC_CODEC_MPGV VLC_FOURCC('m','p','g','v') -#define VLC_CODEC_MP1V VLC_FOURCC('m','p','1','v') -#define VLC_CODEC_MP2V VLC_FOURCC('m','p','2','v') #define VLC_CODEC_MP4V VLC_FOURCC('m','p','4','v') #define VLC_CODEC_DIV1 VLC_FOURCC('D','I','V','1') #define VLC_CODEC_DIV2 VLC_FOURCC('D','I','V','2') @@ -169,6 +167,8 @@ #define VLC_CODEC_YMGA VLC_FOURCC('Y','M','G','A') /* Packed YUV 4:2:2, U:Y:V:Y, reverted */ #define VLC_CODEC_CYUV VLC_FOURCC('c','y','u','v') +/* 10-bit 4:2:2 Component YCbCr */ +#define VLC_CODEC_V210 VLC_FOURCC('v','2','1','0') /* Image codec (video) */ #define VLC_CODEC_PNG VLC_FOURCC('p','n','g',' ') @@ -279,21 +279,41 @@ #define VLC_CODEC_CVD VLC_FOURCC('c','v','d',' ') -/* Special endian dependant values */ +/* Special endian dependant values + * The suffic N means Native + * The suffix I means Inverted (ie non native) */ #ifdef WORDS_BIGENDIAN # define VLC_CODEC_S16N VLC_CODEC_S16B # define VLC_CODEC_U16N VLC_CODEC_U16B # define VLC_CODEC_S24N VLC_CODEC_S24B # define VLC_CODEC_S32N VLC_CODEC_S32B + +# define VLC_CODEC_S16I VLC_CODEC_S16L +# define VLC_CODEC_U16I VLC_CODEC_U16L +# define VLC_CODEC_S24I VLC_CODEC_S24L +# define VLC_CODEC_S32I VLC_CODEC_S32L #else # define VLC_CODEC_S16N VLC_CODEC_S16L # define VLC_CODEC_U16N VLC_CODEC_U16L # define VLC_CODEC_S24N VLC_CODEC_S24L # define VLC_CODEC_S32N VLC_CODEC_S32L + +# define VLC_CODEC_S16I VLC_CODEC_S16B +# define VLC_CODEC_U16I VLC_CODEC_U16B +# define VLC_CODEC_S24I VLC_CODEC_S24B +# define VLC_CODEC_S32I VLC_CODEC_S32B #endif +/* Non official codecs, used to force a profile in an encoder */ +/* MPEG-1 video */ +#define VLC_CODEC_MP1V VLC_FOURCC('m','p','1','v') +/* MPEG-2 video */ +#define VLC_CODEC_MP2V VLC_FOURCC('m','p','2','v') +/* MPEG-I/II layer 3 audio */ +#define VLC_CODEC_MP3 VLC_FOURCC('m','p','3',' ') + /** - * It returns the codec associatedto a fourcc within a ES category. + * It returns the codec associated to a fourcc within a ES category. * * If not found, it will return the given fourcc. * If found, it will allways be one of the VLC_CODEC_ defined above. @@ -302,6 +322,26 @@ */ VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodec, ( int i_cat, vlc_fourcc_t i_fourcc ) ); +/** + * It returns the codec associated to a fourcc store in a zero terminated + * string. + * + * If the string is NULL or does not have exactly 4 charateres, it will + * return 0, otherwise it behaves like vlc_fourcc_GetCodec. + * + * Provided for convenience. + */ +VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodecFromString, ( int i_cat, const char * ) ); + +/** + * It convert the gives fourcc to an audio codec when possible. + * + * The fourcc converted are aflt, araw/pcm , twos, sowt. When an incompatible i_bits + * is detected, 0 is returned. + * The other fourcc goes through vlc_fourcc_GetCodec and i_bits is not checked. + */ +VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodecAudio, ( vlc_fourcc_t i_fourcc, int i_bits ) ); + /** * It returns the description of the given fourcc or NULL if not found. *