<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 7 nov. 2019 08 h 40, Sirius Wu <<a href="mailto:ccwu660601@gmail.com">ccwu660601@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">How can I register a tracer plugins in _priv_gst_tracing_init()? I do not know how to get the plugins.</div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">This is a bit hidden in the Android.mk stuff, but each plugins export a registration function, you simply need to call this function, there is a helper macro somewhere.</div><div dir="auto"><br></div><div dir="auto">I have commented on the issue, I need some information about the leak tracer to suggest a proper solution.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"> </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Sirius Wu <<a href="mailto:ccwu660601@gmail.com" target="_blank" rel="noreferrer">ccwu660601@gmail.com</a>> 於 2019年11月7日 週四 下午9:08寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I've submit a bug report and a merge request.</div><div><br></div><div><a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/462" target="_blank" rel="noreferrer">https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/462</a></div><div><a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/316" target="_blank" rel="noreferrer">https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/316</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" target="_blank" rel="noreferrer">nicolas@ndufresne.ca</a>> 於 2019年11月7日 週四 上午8:46寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le mercredi 06 novembre 2019 à 23:04 +0800, Sirius Wu a écrit :<br>
> Any suggestion that I can change so that _priv_gst_tracing_init() can be called after plugin loading of coretracers?<br>
<br>
I don't think anyone has tested the tracers on Android yet, and like<br>
many other thing, what isn't tested usually does not work.<br>
<br>
As Matthew mention, there is an ordering issue. To be allowed to<br>
register a plugin you need to gst_init(), but then there tracer init<br>
will lookup the env before you have registered any tracer.<br>
<br>
Can you file an issue about this ? Meanwhile, if you need to<br>
workaround, you'll have to hack _priv_gst_tracing_init() to register<br>
the tracer plugins.<br>
<br>
> <br>
> Sirius Wu <<a href="mailto:ccwu660601@gmail.com" target="_blank" rel="noreferrer">ccwu660601@gmail.com</a>> 於 2019年11月6日 週三 下午11:02寫道:<br>
> > Hi,<br>
> > <br>
> > because I've just modified android tutorial 5.<br>
> > In app_function() there are only a few lines before gst_parse_launch().<br>
> > <br>
> > ------------<br>
> >  /* Create our own GLib Main Context and make it the default one */<br>
> >   data->context = g_main_context_new ();<br>
> >   g_main_context_push_thread_default (data->context);<br>
> > <br>
> >   /* Build pipeline */<br>
> >   data->pipeline = gst_parse_launch ("playbin", &error);<br>
> > ------------<br>
> > <br>
> > I'd say the ordering issue is not in my code.<br>
> > <br>
> > I found that function init_post() which calls_priv_gst_tracing_init() is called before static plugins coreelements and coretracers.<br>
> > Should this plugins be loaded between init_pre() and init_post()? Or should they be loaded in init_post() but before priv_gst_tracing_init()?<br>
> > <br>
> >  <br>
> > <br>
> > Matthew Waters <<a href="mailto:ystreet00@gmail.com" target="_blank" rel="noreferrer">ystreet00@gmail.com</a>> 於 2019年11月6日 週三 下午7:43寫道:<br>
> > > Looks like there is an ordering issue.  On android you need to register the plugin before it can be used.  This may be an issue in GStreamer or with your build modifications.<br>
> > > <br>
> > > Cheers<br>
> > > -Matt<br>
> > > <br>
> > > On 6/11/19 9:09 pm, Sirius Wu wrote:<br>
> > > > HI,<br>
> > > > <br>
> > > > I've modified Android tutorial 5 to learn how to write a player.<br>
> > > > I'm using GStreamer 1.16.1.<br>
> > > > <br>
> > > > While testing the tutorial with a HLS link, I suspected that there are memory leaks caused by the playbin plugin. So I passed the following environment with Android's Os.setenv() to the player. I also added a gst_deinit() at the end of app_function().<br>
> > > > <br>
> > > >             Os.setenv("GST_TRACERS", "leaks", true);<br>
> > > >             Os.setenv("GST_DEBUG", "GST_TRACER:7", true);<br>
> > > > <br>
> > > > But I cannot find any logs from the leak tracer. I've only seen the following warning:<br>
> > > > <br>
> > > > _priv_gst_tracing_init no tracer named 'leaks'<br>
> > > > gst_tracer_register:<tracerfactory0> new tracer factory for latency<br>
> > > > gst_tracer_register:<latency> tracer factory for 2818005248:GstLatencyTracer<br>
> > > > gst_tracer_register:<tracerfactory1> new tracer factory for log<br>
> > > > gst_tracer_register:<log> tracer factory for 2818005328:GstLogTracer<br>
> > > > gst_tracer_register:<tracerfactory2> new tracer factory for rusage<br>
> > > > gst_tracer_register:<rusage> tracer factory for 2818005408:GstRUsageTracer<br>
> > > > gst_tracer_register:<tracerfactory3> new tracer factory for stats<br>
> > > > gst_tracer_register:<stats> tracer factory for 2818005488:GstStatsTracer<br>
> > > > gst_tracer_register:<tracerfactory4> new tracer factory for leaks<br>
> > > > gst_tracer_register:<leaks> tracer factory for 2818005568:GstLeaksTracer<br>
> > > > <br>
> > > > -- <br>
> > > > Sirius Wu<br>
> > > > <br>
> > > <br>
> > > <br>
> > <br>
> > <br>
> > -- <br>
> > Sirius Wu<br>
> <br>
> <br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span></span>Sirius Wu<br></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span></span>Sirius Wu<br></div></div></div></div></div></div></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>