<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jun 26, 2017 at 8:59 AM Mats Lindestam <<a href="mailto:mats.lindestam@gmail.com">mats.lindestam@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I have an element (bin) that has defined its own GstDebugCategory. What I did was to break out some of the element-functions to another utility-file. This was done to facilitate stubbing when running check-tests.</div><div><br></div><div>A drawback of this is that Gstreamer logging functions e.g. GST_DEBUG (), GST_INFO (), GST_ELEMENT_ERROR(),... does not seem to work in the utility-file.<br clear="all"><div><br></div><div>Is there a way around this, so that the utility-file can use the debug category of the element?</div></div></div></blockquote><div><br></div><div>If you want to share a debug category across more than one compilation unit, instead of using GST_DEBUG_CATEGORY_STATIC, define the category using GST_DEBUG_CATEGORY in one compilation unit and reference it using GST_DEBUG_CATEGORY_EXTERN in the other units (e.g. via the element's header file).</div><div><br></div><div>You still need to define GST_CAT_DEFAULT in all compilation units.<br></div></div></div>