[vlc-devel] [vlc-commits] macosx: split main interface class

David Fuhrmann david.fuhrmann at gmail.com
Tue Jul 21 22:20:42 CEST 2015


> Am 21.07.2015 um 19:53 schrieb Felix Paul Kühne <fkuehne at videolan.org>:
> 
> 
>> On 21 Jul 2015, at 19:11, David Fuhrmann <david.fuhrmann at gmail.com> wrote:
>> 
>>> ++ (VLCVoutWindowController *)sharedInstance;
>>> +
>>> + at property (readonly, atomic) NSLock *lock;
>>> +
>> 
>> AFAIK the lock was introduced to protect access to the sharedInstance call itself. If you move the lock to the object now, we should check if its still needed at all.
> 
> It would be great if you could do this since you introduced that lock in the first place.

Yeah, I’ll take a look.

> 
>> For all the callback functions: We should leverage the void* parameter, instead of using the VLCMain singleton everywhere…
> 
> Just to make sure that we understand each other. You prefer
> 
> void * bridgedSelf = (__bridge void *)self;
> var_AddCallback( vlcobject, var, callback, bridgedSelf)
> 
> over
> var_AddCallback( vlcobject, var, callback, (__bridge void *)self)
> 
> …, correct? :)

No, in your example I would say just use the shorter variant (the latter). I’m referring to the actual callback function where we ignore the user data void* mosty and use the singletons. Point is to just use the pointer we already set in var_AddCallback.

Best regards,
David


More information about the vlc-devel mailing list