Hi everybody,<br>
<div>When I tried to use vlm for handling several inputs/outputs I
noticed that there was a problem storing the options along with the
input.<br>
It is fairly easy to reproduce. First off, it is
needed to create one config file such as the attached. With this file
in the vlc folder, just it is needed to run the command..: ./vlc -I
telnet --vlm-conf multivlc.conf<br>
After running the command several times, the results look like kind of
random and I bet this is because of the "too eager" creation of the
input_thread. <br>
I also attached the solution I came up with.<br>
</div>
The xcommon.c is just for debugging so it is not even worth
a look. The vlm.c now grabs all the options perfectly to me. It was 2
issues. 1st is that for the option of reading a file they used
vlm_ExecuteCommand and afterwards reading a command in Load they use
ExecuteCommand which is the same but without mutex. It should be the
other way around, not creating a mutex per config file but per command.
The other issue is that at the beginning is created a new thread which
runs the function manage. This function is loaded as soon as one
instance is created (with the command play) but the problem is that a
thread is also created and we must leave a certain time before creating
this thread in order to guarantee that the options go along with the
input. Doing a msleep works just fine to me. I am aware it is not the most correct solution, though..<br>
Greetings,<br>
Óscar<br>