[vlc-devel] commit: Added vlc_fourcc_IsYUV. (Laurent Aimar )
git version control
git at videolan.org
Sun Aug 9 01:42:28 CEST 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Aug 9 01:27:08 2009 +0200| [15da764af5710586564eff1168b7e08446f0b011] | committer: Laurent Aimar
Added vlc_fourcc_IsYUV.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=15da764af5710586564eff1168b7e08446f0b011
---
include/vlc_fourcc.h | 7 ++++++-
src/libvlccore.sym | 1 +
src/misc/fourcc.c | 5 ++---
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 680eed9..46edc4e 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -355,11 +355,16 @@ 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
* 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 ) );
/**
+ * 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.
*/
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index b332277..d629a9d 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -483,6 +483,7 @@ vlc_fourcc_GetCodec
vlc_fourcc_GetCodecAudio
vlc_fourcc_GetCodecFromString
vlc_fourcc_GetDescription
+vlc_fourcc_IsYUV
vlc_fourcc_GetYUVFallback
vlc_fourcc_AreUVPlanesSwapped
vlc_gai_strerror
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index d29e14c..c503f34 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -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));
}
-#if 0
-static inline bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
+bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
{
for( unsigned i = 0; p_list_YUV[i]; i++ )
{
@@ -1438,4 +1437,4 @@ static inline bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
}
return false;
}
-#endif
+
More information about the vlc-devel
mailing list