gst_info suggestion

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gst_info suggestion

hcpwll
Dear Devels,
        Sorry for my poor english, and 
        I have a little suggestion about the gst_info module.
        1,  In my opinion, It should not extern some global value in the gst_info.h.
             for example the  GST_CAT_DEFAULT.  if someone do the following thing
                   #define GST_CAT_DEFAULT my_plugin
                   #include <gst/info.h>
                   GST_DEBUG_CATEGORY_STATIC( my_plugin);

             the compiler complain "error: static declaration of 'my_plugin' follows non-static decalration.

          2, Currently,  The functions of parse debug parameters is in the gst.c, for example parse_debug_list function.
               In my opinion, Should put it in the gst_info.c. In this way, the gst_info.h need not to export some global functions
               for example gst_debug_set_threshould_for_name.





_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst_info suggestion

Tim-Philipp Müller-2
On Thu, 2012-10-11 at 17:34 +0800, hcpwll wrote:


>                    #define GST_CAT_DEFAULT my_plugin
>                    #include <gst/info.h>
>                    GST_DEBUG_CATEGORY_STATIC( my_plugin);
>
>              the compiler complain "error: static declaration of
'my_plugin' follows non-static decalration.

I think the expected usage pattern here is:

  #include <gst/gst.h>
  #define GST_CAT_DEFAULT my_plugin
  GST_DEBUG_CATEGORY_STATIC (my_plugin);


There might still be something to improve in the headers though, not
sure. Feel free to file a bug in bugzilla for it.


>           2, Currently,  The functions of parse debug parameters is in
> the gst.c, for example parse_debug_list function.
>                In my opinion, Should put it in the gst_info.c. In this
> way, the gst_info.h need not to export some global functions
>                for example gst_debug_set_threshould_for_name.

There is a bug to make this function public API and move it into
gstinfo.c, fwiw.

https://bugzilla.gnome.org/show_bug.cgi?id=679152

Cheers
 -Tim


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel