[vlc-devel] vlc-devel Digest, Vol 94, Issue 42

Rémi Denis-Courmont remi at remlab.net
Mon Mar 30 10:19:49 CEST 2015


Le 2015-03-30 07:50, Goldy Liang a écrit :
> For following comment, I think you meant that subtitle demux is not
> thread-safe. Because I tried to call demux_Control by the input
> control, which is called by the interface thread?

"Thread-safe" is vague. The modules must be thread-safe insofar as 
there can be more than one instance of one module in the same process at 
the same time. The modules need not be thread-safe insofar as multiple 
threads could use the same instance simultaneously.

Anyway, you cannot access the demux_t objects of the input thread 
outside the input thread. In fact, you cannot even read the pointers 
outside that thread.

> I know the concern here. Actually I already tried
> calling input_ControlPush with a command similar to
> INPUT_ADD_SUBTITLE/INPUT_CONTROL_ADD_SUBTITLE. But it failed because 
> I
> want the control to return the time value. By calling
> input_ControlPush, the handling is asynchronous, so that the function
> call can not get the value right away. I dont know how to solve that.
> Not sure if there is any other example to return a value
> asynchronously?

There is no such case because it could deadlock the user interface 
thread that calls input_ControlPush(). I don't see why you need to get 
data back for a seek control request though.

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list