[FFmpeg-devel] [PATCH 1/8] lavu/log: add device categories
Michael Niedermayer
michaelni at gmx.at
Sun Mar 2 02:50:08 CET 2014
On Sun, Mar 02, 2014 at 01:12:33AM +0100, Lukasz Marek wrote:
> On 01.03.2014 17:03, Michael Niedermayer wrote:
> >On Tue, Feb 25, 2014 at 02:45:57AM +0100, Lukasz Marek wrote:
> >>
> >>>>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
> >>
> >>I clearly misunderstand you, probably, but updated patch attached.
> >>Updated patch attached.
> >>
> >>
> >>--
> >>Best Regards,
> >>Lukasz Marek
> >>
> >>Royale with Cheese.
> >
> >> log.h | 6 ++++++
> >> 1 file changed, 6 insertions(+)
> >>050379a7c3044e9e2ba75491945ebc2914775a77 0001-lavu-log-add-device-categories.patch
> >> From f2cbb8bd734b2cbd53c0acc05228d594e49d9912 Mon Sep 17 00:00:00 2001
> >>From: Lukasz Marek <lukasz.m.luki at gmail.com>
> >>Date: Sat, 22 Feb 2014 23:32:45 +0100
> >>Subject: [PATCH 1/4] lavu/log: add device categories
> >>
> >>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..43562ff 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_OUTPUT,
> >>+ AV_CLASS_CATEGORY_DEVICE_INPUT,
> >> AV_CLASS_CATEGORY_NB, ///< not part of ABI/API
> >> }AVClassCategory;
> >
> >this also needs an update to the color tables in log.c
>
> No I see there is color[16 + AV_CLASS_CATEGORY_NB] static array.
> I assigned 100 to first added category. I can change it to lower
> value, 16 for example to leave so space for fork or remove it, to
> not waste too much memory?
i cant predict the future so i dont know if 16 will be sufficient
especially if this is used in public API for more than colors
its probably better to use at least 30
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20140302/71a9a1ab/attachment.asc>
More information about the ffmpeg-devel
mailing list