I’m a bit slow at getting test apps put together. It’s been ages since I’ve written C. I do, however, have my first test done. I decided since I’m both rusty at writing C as well as still not quite up to speed on some GStreamer basics that the thing to do would be to test the built in examples.
So, first thing, I’m building 1.22 source and enabling the examples. Specifically, I’m testing the multiparty-sendrecv
. I’ve added a few logging statements (unnecessary) and a call to deinit (I believe this is necessary) to mp-webrtc-sendrecv.c
. So, basically right before the return statement in the main method, I added this:
gst_deinit();
Next is setting up an environment to show the leaks. I wrote a python script to make it easier for me to do this:
import subprocess
import time
import os
import sys
signalling_server_path = os.path.abspath("./gstreamer/subprojects/gst-examples/webrtc/signalling")
mp_webrtc_sendrecv_path = os.path.abspath("./release/bin")
log_file_path = os.path.join(os.getcwd(), "log.txt")
signalling_command = [
sys.executable,
"simple_server.py"
]
room_command = [
os.path.join(mp_webrtc_sendrecv_path, "mp-webrtc-sendrecv.exe"),
"--room-id=MemoryTest",
"--server=https://localhost:8443"
]
def build_certs():
print("Building signalling server certs...")
cert_pem_path = os.path.join(signalling_server_path, "cert.pem")
key_pem_path = os.path.join(signalling_server_path, "key.pem")
if os.path.exists(cert_pem_path) and os.path.exists(key_pem_path):
print("Certs already created. Returning.")
return
windows_path = os.path.join(signalling_server_path, "generate_cert.bat")
linux_path = os.path.join(signalling_server_path, "generate_cert.sh")
if os.path.exists(windows_path) and os.name == "nt":
print("Creating certs with:", windows_path)
create_certs = subprocess.Popen(windows_path, cwd=signalling_server_path)
create_certs.wait()
if os.path.exists(linux_path) and os.name == "posix":
print("Creating certs with:", linux_path)
create_certs = subprocess.Popen(linux_path, cwd=signalling_server_path)
create_certs.wait()
print("Signalling server certs built...")
def run_signalling_server():
print("Starting signalling server...")
return subprocess.Popen(signalling_command, cwd=signalling_server_path)
def create_room():
print("Creating room...")
new_env = os.environ.copy()
new_env["GST_DEBUG"] = "GST_TRACER:7,*leak*:7"
new_env["GST_DEBUG_FILE"] = log_file_path
new_env["GST_TRACERS"] = "leaks(check-refs=true)"
return subprocess.Popen(room_command, env=new_env, cwd=mp_webrtc_sendrecv_path)
def join_room(num_joins, seconds_per_join):
for loop in range(num_joins):
print(f"Join: {loop}")
process = subprocess.Popen(room_command, cwd=mp_webrtc_sendrecv_path)
time.sleep(seconds_per_join)
process.terminate()
process.wait()
build_certs()
signalling_process = run_signalling_server()
create_room_process = create_room()
join_room(3, 60)
print("Stopping signalling server...")
signalling_process.terminate()
signalling_process.wait()
print("Signalling server stopped.")
print("Waiting for room server process to end...")
create_room_process.wait()
print("Room server process finished.")
A few notes about this:
- It’s only been tested on Windows.
- You may need to change
signalling_server_path = os.path.abspath("./gstreamer/subprojects/gst-examples/webrtc/signalling")
to be wherever the gstreamer example signalling server simple_server.py
script is
- You may need to change
mp_webrtc_sendrecv_path = os.path.abspath("./release/bin")
to be wherever the mp-webrtc-sendrecv
executable is
- If you’re not on Windows, you may need to change
os.path.join(mp_webrtc_sendrecv_path, "mp-webrtc-sendrecv.exe")
to point to whatever the executable for mp-webrtc-sendrecv is called.
I think that’s pretty much all that needs done. Or just run the equivalent logic in the command line.
Also for reference, is my version of the generate_cert.sh
file for windows (generate_cert.bat
, goes in same location as simple_server.py
):
set BASE_DIR=%~dp0
set OUTDIR=""
if "%~1" neq "" (
set OUTDIR=%~1\
)
openssl req -x509 -newkey rsa:4096 -keyout "key.pem" -out "cert.pem" -days 365 -nodes -subj "/CN=example.com" 2>&1
if not %errorlevel% equ 0 (
exit /b %errorlevel%
)
If this all works, after the script runs, it will notify you of leaks. Here is my console output:
**(mp-webrtc-sendrecv.exe:23152): WARNING **: 15:08:19.953: Leaks detected and logged under GST_DEBUG=GST_TRACER:7
And in my case, here’s what is in log.txt
:
0:00:00.859201000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:169:gst_tracer_register:<tracerfactory0> new tracer factory for latency
0:00:00.860367000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:177:gst_tracer_register:<latency> tracer factory for 3962761632:GstLatencyTracer
0:00:00.861365000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:169:gst_tracer_register:<tracerfactory1> new tracer factory for log
0:00:00.862389000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:177:gst_tracer_register:<log> tracer factory for 3962756512:GstLogTracer
0:00:00.862930000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:169:gst_tracer_register:<tracerfactory2> new tracer factory for stats
0:00:00.864996000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:177:gst_tracer_register:<stats> tracer factory for 3962761120:GstStatsTracer
0:00:00.865616000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:169:gst_tracer_register:<tracerfactory3> new tracer factory for leaks
0:00:00.866071000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:177:gst_tracer_register:<leaks> tracer factory for 3962760608:GstLeaksTracer
0:00:00.866670000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:169:gst_tracer_register:<tracerfactory4> new tracer factory for factories
0:00:00.867166000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:177:gst_tracer_register:<factories> tracer factory for 3962757792:GstFactoriesTracer
0:00:06.926749000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:169:gst_tracer_register:<tracerfactory5> new tracer factory for validate
0:00:06.927364000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracer.c:177:gst_tracer_register:<validate> tracer factory for 4077695200:GstValidateRunner
0:00:07.730254000 23152 000001B3EC38FB10 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-alive.class, type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;", description=(structure)"value\,\ type\=\(type\)gchararray\;", ref-count=(structure)"value\,\ type\=\(type\)guint\;", trace=(structure)"value\,\ type\=\(type\)gchararray\;";
0:00:07.730304000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-alive, type-name=(string)%s, address=(gpointer)%p, description=(string)%s, ref-count=(uint)%u, trace=(string)%s;
0:00:07.730798000 23152 000001B3EC38FB10 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-refings.class, ts=(structure)"value\,\ type\=\(type\)guint64\;", type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;", description=(structure)"value\,\ type\=\(type\)gchararray\;", ref-count=(structure)"value\,\ type\=\(type\)guint\;", trace=(structure)"value\,\ type\=\(type\)gchararray\;";
0:00:07.730836000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-refings, ts=(guint64)%llu, type-name=(string)%s, address=(gpointer)%p, description=(string)%s, ref-count=(uint)%u, trace=(string)%s;
0:00:07.731262000 23152 000001B3EC38FB10 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-added.class, type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;";
0:00:07.731296000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-added, type-name=(string)%s, address=(gpointer)%p;
0:00:07.731659000 23152 000001B3EC38FB10 TRACE GST_TRACER gsttracerrecord.c:109:gst_tracer_record_build_format: object-removed.class, type-name=(structure)"value\,\ type\=\(type\)gchararray\;", address=(structure)"value\,\ type\=\(type\)gpointer\;";
0:00:07.731690000 23152 000001B3EC38FB10 DEBUG GST_TRACER gsttracerrecord.c:123:gst_tracer_record_build_format: new format string: object-removed, type-name=(string)%s, address=(gpointer)%p;
0:03:01.010655000 23152 000001B3EC38FB10 DEBUG leaks gstleaks.c:765:gst_leaks_tracer_finalize:<leakstracer0> destroying tracer, checking for leaks
0:03:01.010696000 23152 000001B3EC38FB10 TRACE leaks gstleaks.c:732:process_leaks:<leakstracer0> start listing currently alive objects
0:03:01.010736000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-alive, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)<'':sink>, ref-count=(uint)1, trace=(string);
0:03:01.010763000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)65892916000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)2, trace=(string);
0:03:01.010786000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)65898086000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)1, trace=(string);
0:03:01.010807000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66328154000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)2, trace=(string);
0:03:01.010829000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66335755000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.010850000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66660765000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)4, trace=(string);
0:03:01.010871000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66666740000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)3, trace=(string);
0:03:01.010892000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66674864000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.010913000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66750087000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.010933000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66795425000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.010954000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66818911000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.010983000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66828852000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.011005000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66831881000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.011026000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66918339000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.011046000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66987678000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.011121000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67115826000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.011146000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67147912000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.011167000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67154197000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.011188000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67184938000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.011209000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67194038000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.011230000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67330053000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.011251000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67338131000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.011272000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180219128000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.011293000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180219806000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)4, trace=(string);
0:03:01.011314000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180220739000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011335000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180221245000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011356000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180222132000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)3, trace=(string);
0:03:01.011377000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180222844000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.011398000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180474867000, type-name=(string)GstPad, address=(gpointer)000001B3F608B8C0, description=(string)unreffed, ref-count=(uint)1, trace=(string);
0:03:01.011437000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-alive, type-name=(string)GstDtlsAgent, address=(gpointer)000001B3F5D61630, description=(string)<dtlsagent0>, ref-count=(uint)1, trace=(string);
0:03:01.011460000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-alive, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)1, ref-count=(uint)1, trace=(string);
0:03:01.011484000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)54281098000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)2, trace=(string);
0:03:01.011519000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)54281098000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)1, trace=(string);
0:03:01.011541000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)54767984000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)2, trace=(string);
0:03:01.011562000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)54767988000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)3, trace=(string);
0:03:01.011583000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)54806001000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)4, trace=(string);
0:03:01.011604000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66732821000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011625000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66804859000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011645000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66839800000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011666000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66891486000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011687000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66896415000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011708000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66897790000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011729000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)66963223000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011749000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67126758000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011770000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67129009000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011791000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67129009000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011812000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67129010000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011832000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67164914000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011853000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67334656000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)5, trace=(string);
0:03:01.011892000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67334664000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)reffed, ref-count=(uint)6, trace=(string);
0:03:01.011914000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)67334667000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)5, trace=(string);
0:03:01.011943000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180081503000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)4, trace=(string);
0:03:01.011964000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180130337000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)3, trace=(string);
0:03:01.011984000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180139010000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)2, trace=(string);
0:03:01.012005000 23152 000001B3EC38FB10 TRACE GST_TRACER :0:: object-refings, ts=(guint64)180139010000, type-name=(string)GstCaps, address=(gpointer)000001B3F6391BE0, description=(string)unreffed, ref-count=(uint)1, trace=(string);
0:03:01.012026000 23152 000001B3EC38FB10 TRACE leaks gstleaks.c:752:process_leaks:<leakstracer0> listed 3 alive objects
My understanding is that when deinit happens, the app should:
- Clean up any resources left over.
- Tell the leak tracer to list currently alive objects.
Obviously #2 works based on the log.txt
output. But if there aren’t supposed to be any live objects at this point, it seems like something is wrong. Don’t know if it’s gstreamer itself or if it’s the example code.
I’m eventually going to try to put together an example closer to what I’ve been trying to work with. I may try to modify this example since I don’t think it’d require much.