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

Lukasz M lukasz.m.luki at gmail.com
Mon Mar 3 13:20:09 CET 2014


On 3 March 2014 11:39, Michael Niedermayer <michaelni at gmx.at> wrote:

> On Sun, Mar 02, 2014 at 09:05:09PM +0100, Lukasz Marek wrote:
> > On 02.03.2014 02:50, Michael Niedermayer wrote:
> > >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
> >
> > set to 40.
> >
> > --
> > Best Regards,
> > Lukasz Marek
> >
> > Microsoft isn't evil, they just make really crappy operating
> > systems. - Linus Torvalds
>
> >  log.c |   12 ++++++++++++
> >  log.h |    6 ++++++
> >  2 files changed, 18 insertions(+)
> > 5d7e85563cf0f0caef837c1d3b303a9240f52653
>  0001-lavu-log-add-device-categories.patch
> > From 2d9e482a8ef65fa0e370daa30967032637e95c34 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?
>
> patch LGTM, but if you want me to bump something on merge please
> state it without "?" or in the mail thats asks for a merge otherwise
> that TODO stuff would end in git history unless i rebase the patches


OK sorry. I meant I'm not sure it should be micro or minor bump.
I will resent it fixed


More information about the ffmpeg-devel mailing list