HI, I've modified Android tutorial 5 to learn how to write a player. I'm using GStreamer 1.16.1. 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(). Os.setenv("GST_DEBUG", "GST_TRACER:7", true); But I cannot find any logs from the leak tracer. I've only seen the following warning: _priv_gst_tracing_init no tracer named 'leaks' gst_tracer_register:<tracerfactory0> new tracer factory for latency gst_tracer_register:<latency> tracer factory for 2818005248:GstLatencyTracer gst_tracer_register:<tracerfactory1> new tracer factory for log gst_tracer_register:<log> tracer factory for 2818005328:GstLogTracer gst_tracer_register:<tracerfactory2> new tracer factory for rusage gst_tracer_register:<rusage> tracer factory for 2818005408:GstRUsageTracer gst_tracer_register:<tracerfactory3> new tracer factory for stats gst_tracer_register:<stats> tracer factory for 2818005488:GstStatsTracer gst_tracer_register:<tracerfactory4> new tracer factory for leaks gst_tracer_register:<leaks> tracer factory for 2818005568:GstLeaksTracer -- Sirius Wu _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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.
Cheers -Matt On 6/11/19 9:09 pm, Sirius Wu wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (499 bytes) Download Attachment |
Hi, because I've just modified android tutorial 5. In app_function() there are only a few lines before gst_parse_launch(). ------------ /* Create our own GLib Main Context and make it the default one */ data->context = g_main_context_new (); g_main_context_push_thread_default (data->context); /* Build pipeline */ data->pipeline = gst_parse_launch ("playbin", &error); ------------ I'd say the ordering issue is not in my code. I found that function init_post() which calls_priv_gst_tracing_init() is called before static plugins coreelements and coretracers. 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()? Matthew Waters <[hidden email]> 於 2019年11月6日 週三 下午7:43寫道:
-- Sirius Wu _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Any suggestion that I can change so that _priv_gst_tracing_init() can be called after plugin loading of coretracers? Sirius Wu <[hidden email]> 於 2019年11月6日 週三 下午11:02寫道:
-- Sirius Wu _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le mercredi 06 novembre 2019 à 23:04 +0800, Sirius Wu a écrit :
> Any suggestion that I can change so that _priv_gst_tracing_init() can be called after plugin loading of coretracers? I don't think anyone has tested the tracers on Android yet, and like many other thing, what isn't tested usually does not work. As Matthew mention, there is an ordering issue. To be allowed to register a plugin you need to gst_init(), but then there tracer init will lookup the env before you have registered any tracer. Can you file an issue about this ? Meanwhile, if you need to workaround, you'll have to hack _priv_gst_tracing_init() to register the tracer plugins. > > Sirius Wu <[hidden email]> 於 2019年11月6日 週三 下午11:02寫道: > > Hi, > > > > because I've just modified android tutorial 5. > > In app_function() there are only a few lines before gst_parse_launch(). > > > > ------------ > > /* Create our own GLib Main Context and make it the default one */ > > data->context = g_main_context_new (); > > g_main_context_push_thread_default (data->context); > > > > /* Build pipeline */ > > data->pipeline = gst_parse_launch ("playbin", &error); > > ------------ > > > > I'd say the ordering issue is not in my code. > > > > I found that function init_post() which calls_priv_gst_tracing_init() is called before static plugins coreelements and coretracers. > > 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()? > > > > > > > > Matthew Waters <[hidden email]> 於 2019年11月6日 週三 下午7:43寫道: > > > 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. > > > > > > Cheers > > > -Matt > > > > > > On 6/11/19 9:09 pm, Sirius Wu wrote: > > > > HI, > > > > > > > > I've modified Android tutorial 5 to learn how to write a player. > > > > I'm using GStreamer 1.16.1. > > > > > > > > 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(). > > > > > > > > Os.setenv("GST_TRACERS", "leaks", true); > > > > Os.setenv("GST_DEBUG", "GST_TRACER:7", true); > > > > > > > > But I cannot find any logs from the leak tracer. I've only seen the following warning: > > > > > > > > _priv_gst_tracing_init no tracer named 'leaks' > > > > gst_tracer_register:<tracerfactory0> new tracer factory for latency > > > > gst_tracer_register:<latency> tracer factory for 2818005248:GstLatencyTracer > > > > gst_tracer_register:<tracerfactory1> new tracer factory for log > > > > gst_tracer_register:<log> tracer factory for 2818005328:GstLogTracer > > > > gst_tracer_register:<tracerfactory2> new tracer factory for rusage > > > > gst_tracer_register:<rusage> tracer factory for 2818005408:GstRUsageTracer > > > > gst_tracer_register:<tracerfactory3> new tracer factory for stats > > > > gst_tracer_register:<stats> tracer factory for 2818005488:GstStatsTracer > > > > gst_tracer_register:<tracerfactory4> new tracer factory for leaks > > > > gst_tracer_register:<leaks> tracer factory for 2818005568:GstLeaksTracer > > > > > > > > -- > > > > Sirius Wu > > > > > > > > > > > > > > > > -- > > Sirius Wu > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I've submit a bug report and a merge request. Nicolas Dufresne <[hidden email]> 於 2019年11月7日 週四 上午8:46寫道: Le mercredi 06 novembre 2019 à 23:04 +0800, Sirius Wu a écrit : -- Sirius Wu _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
How can I register a tracer plugins in _priv_gst_tracing_init()? I do not know how to get the plugins. Sirius Wu <[hidden email]> 於 2019年11月7日 週四 下午9:08寫道:
-- Sirius Wu _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le jeu. 7 nov. 2019 08 h 40, Sirius Wu <[hidden email]> a écrit :
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. I have commented on the issue, I need some information about the leak tracer to suggest a proper solution.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |