[vlc-devel] [RFC] -- playlist and input small improvements (vlc core)

brezhoneg1 brezhoneg1 at yahoo.fr
Wed Sep 16 19:45:38 CEST 2009


GUI interfaces usually need to add callbacks on variables owned by the
input thread object. For that purpose, they detect new inputs via the
'item-current' variable, then retrieve a reference on the new input
object and call var_AddCallback. These calls are done while the input
thread is already running, which is not the best thing since variables
may already have been updated and changes can be missed at the GUI
level. (Or more complexity in code is needed to deal with these corner

Actually, if either a new variable or 'item-current' was updated between
input_Create and input_Start, that would give GUI interfaces a chance to
add callbacks in a synchronous way _after_ variables have been created
and _before_ the input thread has started updating them.

In the same vein, two input variables (bit-rate and sample-rate) should
be moved from the init phase of input_Start() and placed into
input_Create() to prevent var_Addcallbacks from failing if called too

For better clarity, two small patches are attached.

Comments welcome.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-core-create-two-variables-at-initialization-for-va.patch
Type: application/octet-stream
Size: 1458 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090916/77bd77df/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-playlist-add-a-input-current-variable-for-being-com.patch
Type: application/octet-stream
Size: 1714 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090916/77bd77df/attachment-0001.obj>

More information about the vlc-devel mailing list