Commit 15da764a authored by Laurent Aimar's avatar Laurent Aimar

Added vlc_fourcc_IsYUV.

parent adcf4a99
...@@ -355,10 +355,15 @@ VLC_EXPORT( const char *, vlc_fourcc_GetDescription, ( int i_cat, vlc_fourcc_t i ...@@ -355,10 +355,15 @@ VLC_EXPORT( const char *, vlc_fourcc_GetDescription, ( int i_cat, vlc_fourcc_t i
* It returns a list (terminated with the value 0) of YUV fourccs in * It returns a list (terminated with the value 0) of YUV fourccs in
* decreasing priority order for the given chroma. * decreasing priority order for the given chroma.
* *
* It will always return a non NULL pointer that must not freed. * 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 ) ); 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 * It returns true if the two fourccs are equivalent if their U&V planes are
* swapped. * swapped.
......
...@@ -483,6 +483,7 @@ vlc_fourcc_GetCodec ...@@ -483,6 +483,7 @@ vlc_fourcc_GetCodec
vlc_fourcc_GetCodecAudio vlc_fourcc_GetCodecAudio
vlc_fourcc_GetCodecFromString vlc_fourcc_GetCodecFromString
vlc_fourcc_GetDescription vlc_fourcc_GetDescription
vlc_fourcc_IsYUV
vlc_fourcc_GetYUVFallback vlc_fourcc_GetYUVFallback
vlc_fourcc_AreUVPlanesSwapped vlc_fourcc_AreUVPlanesSwapped
vlc_gai_strerror vlc_gai_strerror
......
...@@ -1428,8 +1428,7 @@ bool vlc_fourcc_AreUVPlanesSwapped( vlc_fourcc_t a, vlc_fourcc_t b ) ...@@ -1428,8 +1428,7 @@ bool vlc_fourcc_AreUVPlanesSwapped( vlc_fourcc_t a, vlc_fourcc_t b )
((b == VLC_CODEC_I420 || b == VLC_CODEC_J420) && a == VLC_CODEC_YV12)); ((b == VLC_CODEC_I420 || b == VLC_CODEC_J420) && a == VLC_CODEC_YV12));
} }
#if 0 bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
static inline bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
{ {
for( unsigned i = 0; p_list_YUV[i]; i++ ) for( unsigned i = 0; p_list_YUV[i]; i++ )
{ {
...@@ -1438,4 +1437,4 @@ static inline bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc) ...@@ -1438,4 +1437,4 @@ static inline bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
} }
return false; return false;
} }
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment