reference count?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

reference count?

killerrats
This post was updated on .
        - - - - rtph264depay - - - - h264parse - - - - vtee - - - - - queue3 - -  
rtspsrc                                                                                                avimux - - appsink
        - - - - rtpmp4gdepay - - - aacparse - - - faad - - - atee - - queue4 - -


I have a class that creates the gstelements for the pipeline. queue3 and queue4 have 1 reference after adding to pipeline, then when I delete the pipeline it says they have more than 10000000 references. I can't seem to gst_object_uref gives me fail. I have a memory leak problem and wondered if that might be one of the problems. any ideas?
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: reference count?

Nicolas Dufresne-5


Le 8 déc. 2017 6:34 PM, "killerrats" <[hidden email]> a écrit :
I have a class that creates the gstelements for the pipeline. both of the
queues have 1 reference then when I delete the pipeline it says they have
more than 52000 references. I can't seem to gst_object_uref gives me fail. I
have a memory leak problem and wondered if that might be one of the
problems. any ideas?

Considering you have added your queue element into the pipeline, and that these queue elements had floating reference, those queue are then owned by the pipeline.

As a side effect, reading back the recount after dropping the last reference on the pipeline is a use after free. Hence the results is undefined.




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: reference count?

killerrats
could that lead to a memory leak?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: reference count?

Nicolas Dufresne-5


Le 10 déc. 2017 12:11 AM, "killerrats" <[hidden email]> a écrit :
could that lead to a memory leak?

Probably not, but it is a type of buffer overflow.





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: reference count?

killerrats
This post was updated on .
In reply to this post by killerrats
Gstreamer 1.12.3
---------------------------------------------------------
        - - - - fakesink
rtspsrc
        - - - - fakesink2

so far i'm still getting the memory leak. I put together a small project
which will connect to a camera then 10 sec later will disconnect then
reconnect. see if there is something i have to do to unref differently. I
tried without removing fakesinks' and does the samething. any ideas?

rtspsrc.cpp <http://www.planetkorey.com/tmp/rtspsrc.cpp



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: reference count?

killerrats
I upgraded to 1.12.4 and seem to do okay with this pipeline:
        - - - - fakesink
rtspsrc
        - - - - fakesink2

when I introduce this pipeline it seems to not perform like it should.

        - - - - rtph264depay ---- h264parse ---- tee ---- queue
rtspsrc                                                                          
avimux ---- appsink
        - - - - rtpmp4gdepay --- aacparse ---- tee ---- queue


I installed a memory leak detection. so far I only see these things in the
program so far.

Unreed Memory <http://www.planetkorey.com/tmp/rtpUnfreedMemory.jpg>  
rtpSessionHandles
<http://www.planetkorey.com/tmp/rtpsessionHandleNotClosing.jpg>  

could this lead to a memory leak some how? it seems to happen every time I
go into play mode.



-----
------------------------------
Gstreamer 1.12.3
------------------------------
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: reference count?

killerrats
I did the pipeline using the gst_parse_launch() instead and unref the
pipeline seems to not have a memory leak. I didn't really seem any different
between them other than I was using variables for each of the elements and
put into the pipeline. so I guess I'm gonna have to stick with
gst_parse_launch() for recording. I left it there for two days and never
went above 15mb in memory. If i used the other way it got up to almost 30mb
in one day and kept going up. I would unref everything then assign the
elements again and put into the pipeline.



-----
------------------------------
Gstreamer 1.12.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.12.4
------------------------------
Windows