[FFmpeg-devel] [PATCH 1/8] lavu/log: add device categories

Michael Niedermayer michaelni at gmx.at
Tue Feb 25 01:06:34 CET 2014


On Tue, Feb 25, 2014 at 12:43:05AM +0100, Lukasz Marek wrote:
> On 25.02.2014 00:32, Michael Niedermayer wrote:
> >On Sat, Feb 22, 2014 at 11:33:35PM +0100, Lukasz Marek wrote:
> >>TODO: micro bump?
> >>
> >>Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> >>---
> >>  libavutil/log.h | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> >>
> >>diff --git a/libavutil/log.h b/libavutil/log.h
> >>index 5fb476f..d0ceddd 100644
> >>--- a/libavutil/log.h
> >>+++ b/libavutil/log.h
> >>@@ -37,6 +37,12 @@ typedef enum {
> >>      AV_CLASS_CATEGORY_BITSTREAM_FILTER,
> >>      AV_CLASS_CATEGORY_SWSCALER,
> >>      AV_CLASS_CATEGORY_SWRESAMPLER,
> >>+    AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 100,
> >>+    AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
> >>+    AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
> >>+    AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
> >
> >>+    AV_CLASS_CATEGORY_DEVICE_AUDIO_VIDEO_OUTPUT,
> >>+    AV_CLASS_CATEGORY_DEVICE_AUDIO_VIDEO_INPUT,
> >
> >AUDIO_VIDEO is redundant here i guess
> >so it could be
> >>+    AV_CLASS_CATEGORY_DEVICE_OUTPUT,
> >>+    AV_CLASS_CATEGORY_DEVICE_INPUT,
> 
> I wanted it possible to distinguish audio and video devices. Use
> case is to make a dropdown list in application's gui where user may
> choose which device to use for audio/video. (see next patch with
> iterators). If you have other idea how to distinguish them they give
> a hint.
> INPUT/OUTPUT may be skipped because it is already distinguish by
> input/output format structs, but I don't think there is really
> reason for it.

you guessed correctly that the large number of categories
gave me a odd feelig but i actually just meant this, as i didnt have
a really superior idea
and having audio and video devices colored diferently in the log
output could be usefull

+    AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 100,
+    AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
+    AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
+    AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
+    AV_CLASS_CATEGORY_DEVICE_OUTPUT,
+    AV_CLASS_CATEGORY_DEVICE_INPUT,

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140225/6986bbef/attachment.asc>


More information about the ffmpeg-devel mailing list