adding NEW debug level

Tim-Philipp Müller t.i.m at zen.co.uk
Sat Mar 2 03:37:13 PST 2013


On Fri, 2013-03-01 at 23:31 -0800, Raju wrote:

> I am running gstreamer-1.0. I want to add new debug level in the
> GstDebuglevel enumeration.

Why? What are you trying to do exactly?

> Will it work if I simply add the enum values in
> the gstinfo.h or should I have add it in any other file? 
> 
> I want something like this: 
> 
> typedef enum { 
>   GST_LEVEL_NONE = 0, 
>   GST_LEVEL_ERROR = 1, 
>   GST_LEVEL_WARNING = 2, 
>   GST_LEVEL_FIXME = 3, 
>   GST_LEVEL_INFO = 4, 
>   GST_LEVEL_DEBUG = 5, 
>   GST_LEVEL_LOG = 6, 
>   GST_LEVEL_TRACE = 7, 
>   /* add more */ 
>   GST_LEVEL_MEMDUMP = 9, 
>   /* add more */ 
>   MY_LOG_LEVEL=10,
>   GST_LEVEL_COUNT 
> } GstDebugLevel; 

Do you understand how the debug system works? Just adding an enum is
fine, but won't do anything at all by itself, you will also need to map
the enum to a string in gstinfo.c, and then of course you may want to
add some short cut macros like GST_MYLEVEL so it actually an be used.

Cheers
 -Tim



More information about the gstreamer-devel mailing list