X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_fourcc.h;h=46edc4edbaffa7268c9a7471e7b3901743bff38e;hb=1853bff167e3797e8f5fd801d18c52adedd3188e;hp=6794e5df6d670257998a0ea73745081fa23574c1;hpb=192cad600ce33f25bb4f8d8cf2703b2d3eb3c596;p=vlc diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h index 6794e5df6d..46edc4edba 100644 --- a/include/vlc_fourcc.h +++ b/include/vlc_fourcc.h @@ -220,6 +220,7 @@ #define VLC_CODEC_ADPCM_IMA_WS VLC_FOURCC('A','I','W','S') #define VLC_CODEC_VMDAUDIO VLC_FOURCC('v','m','d','a') #define VLC_CODEC_ADPCM_G726 VLC_FOURCC('g','7','2','6') +#define VLC_CODEC_ADPCM_SWF VLC_FOURCC('S','W','F','a') #define VLC_CODEC_AMR_NB VLC_FOURCC('s','a','m','r') #define VLC_CODEC_AMR_WB VLC_FOURCC('s','a','w','b') #define VLC_CODEC_ALAC VLC_FOURCC('a','l','a','c') @@ -239,6 +240,7 @@ #define VLC_CODEC_QCELP VLC_FOURCC('Q','c','l','p') #define VLC_CODEC_302M VLC_FOURCC('3','0','2','m') #define VLC_CODEC_DVD_LPCM VLC_FOURCC('l','p','c','m') +#define VLC_CODEC_DVDA_LPCM VLC_FOURCC('a','p','c','m') #define VLC_CODEC_BD_LPCM VLC_FOURCC('b','p','c','m') #define VLC_CODEC_SDDS VLC_FOURCC('s','d','d','s') #define VLC_CODEC_MIDI VLC_FOURCC('M','I','D','I') @@ -279,17 +281,29 @@ #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 */ @@ -301,7 +315,7 @@ #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. @@ -310,6 +324,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. * @@ -317,5 +351,25 @@ VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodec, ( int i_cat, vlc_fourcc_t i_fourc */ VLC_EXPORT( const char *, vlc_fourcc_GetDescription, ( int i_cat, vlc_fourcc_t i_fourcc ) ); +/** + * It returns a list (terminated with the value 0) of YUV fourccs in + * decreasing priority order for the given chroma. + * + * It will always return a non NULL pointer that must not be freed. + */ +VLC_EXPORT( const vlc_fourcc_t *, vlc_fourcc_GetYUVFallback, ( vlc_fourcc_t ) ); + +/** + * It returns true if the given fourcc is YUV and false otherwise. + */ +VLC_EXPORT( bool, vlc_fourcc_IsYUV, ( vlc_fourcc_t ) ); + +/** + * It returns true if the two fourccs are equivalent if their U&V planes are + * swapped. + */ +VLC_EXPORT( bool, vlc_fourcc_AreUVPlanesSwapped, (vlc_fourcc_t , vlc_fourcc_t ) ); + + #endif /* _VLC_FOURCC_H */