[FFmpeg-devel] [PATCH 1/8] lavu/log: add device categories
Lukasz Marek
lukasz.m.luki at gmail.com
Sun Mar 2 01:12:33 CET 2014
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?
--
Best Regards,
Lukasz Marek
I may be drunk, Miss, but in the morning I will be sober and you will
still be ugly. - Winston Churchill
More information about the ffmpeg-devel
mailing list