libvlc_release: can we know when refcounter reaches 0

This forum is about all development around libVLC.
badgeror
Blank Cone
Blank Cone
Posts: 22
Joined: 15 Oct 2014 15:31
Operating System: Windows
Location: Sophia-Antipolis - FRANCE

libvlc_release: can we know when refcounter reaches 0

Postby badgeror » 20 Oct 2014 14:53

Hi,

Ok here's my problem:
- I'm doing multiple streams in a multi-threaded software. No problem.
- I'm creating a libvlc_instance on first connection then retaining each time a new connection comes in. Still no problem.
- When stopping one of the streams I make a call to libvlc_release. still no problem

Now when stopping the last stream libvlc_release will destroy the libvl_instance_t* that was first created. That's all fine and dandy unless I want to open a new connection as my instance has not been set to NULL and using it as argument of libvlc_maintain will crash as the instance has been released...

So is there a way to get the result of the libvlc_release operation (i.e. can we know if instance has been deleted or its ref counter simply decremented)?

Thanks for any help on this one...

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_release: can we know when refcounter reaches 0

Postby Rémi Denis-Courmont » 20 Oct 2014 15:22

No.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

badgeror
Blank Cone
Blank Cone
Posts: 22
Joined: 15 Oct 2014 15:31
Operating System: Windows
Location: Sophia-Antipolis - FRANCE

Re: libvlc_release: can we know when refcounter reaches 0

Postby badgeror » 20 Oct 2014 15:33

Ok seems good to me, I'll just stop retaining and release instance at program exit...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests