libvlc_media_player_play from two threads

This forum is about all development around libVLC.
ahmet13
New Cone
New Cone
Posts: 3
Joined: 06 Nov 2010 08:03

libvlc_media_player_play from two threads

Postby ahmet13 » 11 Nov 2010 08:54

Hi all,
I wonder is it possible to use libvlc_media_player functions (for example libvlc_media_player_play) from two different threads using same "libvlc_media_player_t" object? Are these functions thread safe?

Regards

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libvlc_media_player_play from two threads

Postby Jean-Baptiste Kempf » 11 Nov 2010 13:42

Hmm, I guess they should, but I am not sure.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ahmet13
New Cone
New Cone
Posts: 3
Joined: 06 Nov 2010 08:03

Re: libvlc_media_player_play from two threads

Postby ahmet13 » 11 Nov 2010 13:52

I think I've found my answer:

Quoting Sébastien Escudier <sebastien-devel at celeos.eu>:

>
>
> Hi
>
> Is libvlc thread safe : can I call libvlc functions with only one instance
> from
> multiple threads without locking?

Depends on the API you plan to call. You need to lock for all the media_list
related call (using media_list_lock).

The rest should be thread safe, but it needs a review.

Pierre.

On Tuesday 29 July 2008 12:01:12 Sébastien Escudier, you wrote:
> Is libvlc thread safe

Yes.

> can I call libvlc functions with only one instance
> from multiple threads without locking?

No.

--
Rémi Denis-Courmont


Link -> http://mailman.videolan.org/pipermail/v ... 47107.html


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 1 guest