How to print GST_DEBUG_OBJECT messages in console?

Francisco Velázquez francisco.javier at me.com
Fri Oct 17 10:47:07 PDT 2014


Hi Chuck

Thank you for your reply.

I am running the example code from http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic-pipelines.html. There you can see that each GST_DEBUG_OBJECT has an object pointer as first parameter.

I tried the GST_DEBUG(...) macro. For that, I added to the top of my code:

GST_DEBUG_CATEGORY (my_category);
#define GST_CAT_DEFAULT my_category

Then I exported the environment variable GST_DEBUG=my_category:9, and finally I tried two things to initialise the category. 

1) I added the following line above GST_DEBUG_CATEGORY (my_category);:

#define _do_init GST_DEBUG_CATEGORY_INIT (my_category, "my category", 0, "This is the category for debugging this program");

2) I added GST_DEBUG_CATEGORY_INIT (my_category, "my category", 0, "This is the category for debugging this program”); right after g_option_context_add_group (ctx, gst_init_get_option_group ());

 but debugging messages are still not appearing in the console.

I am testing the code in Xcode 6.0.1 in Mac OS X 10.9.5. I export the environment variable in the Xcode GUI. I know it is taking effect, because the console displays DEBUG messages from all other categories if I export GST_DEBUG=5, or GST_DEBUG=*:5. The messages displayed vary depending on the value. I have also created some .dot files with the environment variable GST_DEBUG_DUMP_DOT_DIR also exported through the GUI in Xcode. My apologises for creating confusion when I stated “declare GST_DEBUG”, it was a figurative sentence.

I think that I am doing something wrong with the initialisation of GST_DEBUG_CATEGORY_INIT.

Do you have any idea what I am missing or doing wrong?

Thank you!

Francisco

On 16 Oct 2014, at 17:22, Chuck Crisler <ccrisler at mutualink.net> wrote:

> The process does work, so you have some small but critical error. The GST_DEBUG_OBJECT requires some object pointer as the first parameter, so insure that you have that. Alternatively, you can simply use GST_DEBUG(...). Second, you say 'declare GST_DEBUG=', it must be 'export GST_DEBUG=' in your environment before launching the app, assuming Linux.
> 
> If you are still having trouble, post the OS you are using and code snippets around the important lines (GST_DEBUG_CATEGORY, #define _do_init..., export GST_DEBUG=...
> 
> On Thu, Oct 16, 2014 at 8:34 AM, Francisco Velázquez <francisco.javier at me.com> wrote:
> Hi GStreamer devel community,
> 
> I have a question that may be trivial, but I’m struggling with it. My question refers to the code of Chapter 19 of the GStreamer manual posted in http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic-pipelines.html
> 
> My question is:
> 
> How to print GST_DEBUG_OBJECT messages in console?
> 
> I have read the threads below among others. The environment variable GST_DEBUG has an effect when being general. For example, GST_DEBUG=5 or GST_DEBUG=*:5 print messages from all involved categories. I have not figured out how to print to the console the messages from the code example.
> 
> http://gstreamer-devel.966125.n4.nabble.com/how-do-you-enable-output-of-GST-DEBUG-OBJECT-td4662640.html
> http://permalink.gmane.org/gmane.comp.video.gstreamer.devel/46433
> 
> I have also tried to initialise a category for the code example with:
> 
> GST_DEBUG_CATEGORY (my_category);
> #define GST_CAT_DEFAULT my_category
> 
> #define _do_init GST_DEBUG_CATEGORY_INIT (my_category, "my category", 0, "This is the category for the code example of Chapter 19");
> 
> Then, I declare GST_DEBUG=mycategory:9, but there are no messages printed from GST_DEBUG_OBJECT.
> 
> Thanks a lot for any hint!
> 
> Francisco
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141017/8332fbf3/attachment.html>


More information about the gstreamer-devel mailing list