XCB global hotkeys: don't keep a connection and a thread if not needed
The X11 connection and the poll()'ing thread are useless if we don't
grab any single key. We still return VLC_SUCCESS to avoid an error while
VLC is being started.
This reduces the amount of memory copied when creating/deleting a
variable on an object. We now use a table of pointers instead of table
of variable_t.
This also simplifies callback handling a bit as the variable_t cannot
move anymore while we wait. Earlier another thread could add or remove
another variable on the same object, thus changing the variable table.
With this change, we could also store non-serialized data (i.e.
non-movable with memcpy/memmove) directly inside variable_t.
Only default to rc.lua if module loading wasn't forced. This still isn't perfect. (And there seems to be an issue in module_need(), wasn't -I intf1,intf2 supposed to first try loading intf1 and fallback to intf2 if intf1 couldn't load? For example -I rc,qt4 should load rc and not qt4, which is the case in 0.8.6 but doesn't seem to be the case in 1.0.0 ... looks like this is due to bb0d752792bc6ded51e383240cadf399b9ca71fa removing i_shortcut_bonus)
Win32: emulate static mutexes with a boolean (fix: #2399)
We use the same pattern as the variable callback lock: one mutex,
one condition variable and N boolean flags instead of N mutexes.
This is a bit slower but it shouldn't leak OS handles anymore.
First one is about starting to inherit from the parent. Shouldn't hurt much.
Second one is about looking to inherit from the right variable. hurt more.
macosx_dialog_provider: Offer a way to render this API somewhat legit with libvlc.
Make the dialogs that requires no user action and that will be normally handled via regular error code path optionals.
Still, there is no context with those dialogs, and we don't know to what output they belongs, ideally we should have a proper API that makes the client a proxy for those user actions.
And close #3182 the unparented widget that could be bothering you.
The issue about the unparented widget was totalled found by freeruner (on IRC and trac)
The address field is removed, as it is quite useless. The default
unspecified value works just fine. In fact, it works better than
0.0.0.0 as it allows both IPv6 and IPv4 automatically.
A new path field is added for the local path, defaults to '/'
consistent with HTTP URI semantics ("http://www.example.com" really
means "http://www.example.com/").
Allocate variable and inherit value before the variables lock
The initial value of the variable must be correct when the variables
lock is released after the variable was created. Hence we could not
release the lock between Insert() and InheritValue(). If we did, there
would be a race where another thread could see the variable with the
generic default value (0, "", 0., ...) instead of the inherited value.
So instead, we inherit the value in a temporary variable on the stack,
before we take the variables lock. Then we can create the variable with
the correct value without taking the lock for the duration of
InheritValue().
This adds overhead when an existing variable is re-created (i.e.
reference count is increased but no new variable is created). But it
dramatically reduces contention on the variables lock. More importantly,
it allows calling InheritValue() without the variables lock. So when we
fix InheritValue(), which is currently not thread-safe, we won't have
any problem with nested locking.
Here, the DSEnumCallback documentation seems wrong or misleading, it needs LPCWSTR with DirectSoundEnumerateW
http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.reference.dsenumcallback%28VS.85%29.aspx
InheritValue() is not thread-safe. It runs under the variable lock of
the object creating the new variabe. But it reads variables of parent
objects. This would require the variable lock of the parent object.
We still need to fix var_Create() with VLC_VAR_DOINHERIT.