[FFmpeg-cvslog] lavu/log: add device category macros

Lukasz Marek git at videolan.org
Mon Aug 18 23:03:42 CEST 2014


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Thu Aug  7 01:58:56 2014 +0200| [3c19744218e665a5b1ff426aae6e3402585d08b1] | committer: Michael Niedermayer

lavu/log: add device category macros

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c19744218e665a5b1ff426aae6e3402585d08b1
---

 libavutil/log.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libavutil/log.h b/libavutil/log.h
index a6a07e0..e1ff09b 100644
--- a/libavutil/log.h
+++ b/libavutil/log.h
@@ -46,6 +46,16 @@ typedef enum {
     AV_CLASS_CATEGORY_NB, ///< not part of ABI/API
 }AVClassCategory;
 
+#define AV_IS_INPUT_DEVICE(category) \
+    (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
+     ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
+     ((category) == AV_CLASS_CATEGORY_DEVICE_INPUT))
+
+#define AV_IS_OUTPUT_DEVICE(category) \
+    (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT) || \
+     ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT) || \
+     ((category) == AV_CLASS_CATEGORY_DEVICE_OUTPUT))
+
 struct AVOptionRanges;
 
 /**



More information about the ffmpeg-cvslog mailing list