macosx: Replace VLCIntf by getIntf()
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Sat, 9 Jan 2016 11:29:56 +0000 (12:29 +0100)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Sat, 9 Jan 2016 11:29:56 +0000 (12:29 +0100)
The old VLCIntf macro is deprecated, getIntf() should be used
instead.

38 files changed:
modules/gui/macosx/AddonsWindowController.m
modules/gui/macosx/AppleRemote.m
modules/gui/macosx/AudioEffects.m
modules/gui/macosx/ControlsBar.m
modules/gui/macosx/ConvertAndSave.m
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/DebugMessageVisualizer.m
modules/gui/macosx/ExtensionsDialogProvider.m
modules/gui/macosx/ExtensionsManager.m
modules/gui/macosx/InputManager.m
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindowTitle.m
modules/gui/macosx/PLModel.m
modules/gui/macosx/ResumeDialogController.m
modules/gui/macosx/StringUtility.m
modules/gui/macosx/TrackSynchronization.m
modules/gui/macosx/VLCPlaylist.m
modules/gui/macosx/VLCPlaylistInfo.m
modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/VideoEffects.m
modules/gui/macosx/VideoView.m
modules/gui/macosx/Windows.m
modules/gui/macosx/about.m
modules/gui/macosx/applescript.m
modules/gui/macosx/bookmarks.m
modules/gui/macosx/coredialogs.m
modules/gui/macosx/fspanel.m
modules/gui/macosx/helpers.h
modules/gui/macosx/intf-prefs.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/misc.m
modules/gui/macosx/open.m
modules/gui/macosx/output.m
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/simple_prefs.m

index 6dbcea6..b770a32 100644 (file)
@@ -117,7 +117,7 @@ static void addonsEventsCallback( const vlc_event_t *event, void *data )
     [[[_addonsTable tableColumnWithIdentifier:@"author"] headerCell] setStringValue:_NS("Author")];
     [[[_addonsTable tableColumnWithIdentifier:@"type"] headerCell] setStringValue:_NS("Type")];
 
-    _manager = addons_manager_New((vlc_object_t *)VLCIntf);
+    _manager = addons_manager_New((vlc_object_t *)getIntf());
     if (!_manager)
         return;
 
index 72e438a..595af50 100644 (file)
@@ -404,7 +404,7 @@ static AppleRemote* sharedInstance=nil;
             [self handleEventWithCookieString: lastSubCookieString sumOfValues:0];
         }
         if ([cookieString length] > 0) {
-            msg_Warn( VLCIntf, "Unknown AR button for cookiestring %s", [cookieString UTF8String]);
+            msg_Warn( getIntf(), "Unknown AR button for cookiestring %s", [cookieString UTF8String]);
         }
     }
 }
@@ -457,7 +457,7 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
     ioReturnValue = IOObjectGetClass(hidDevice, className);
 
     if (ioReturnValue != kIOReturnSuccess) {
-        msg_Err( VLCIntf, "Failed to get IOKit class name.");
+        msg_Err( getIntf(), "Failed to get IOKit class name.");
         return NULL;
     }
 
@@ -472,7 +472,7 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
         plugInResult = (*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), (LPVOID) &hidDeviceInterface);
 
         if (plugInResult != S_OK) {
-            msg_Err( VLCIntf, "Couldn't create HID class device interface");
+            msg_Err( getIntf(), "Couldn't create HID class device interface");
         }
         // Release
         if (plugInInterface) (*plugInInterface)->Release(plugInInterface);
@@ -591,13 +591,13 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
                     (*queue)->start(queue);
                     return YES;
                 } else {
-                    msg_Err( VLCIntf, "Error when setting event callout");
+                    msg_Err( getIntf(), "Error when setting event callout");
                 }
             } else {
-                msg_Err( VLCIntf, "Error when creating async event source");
+                msg_Err( getIntf(), "Error when creating async event source");
             }
         } else {
-            msg_Err( VLCIntf, "Error when opening HUD device");
+            msg_Err( getIntf(), "Error when opening HUD device");
         }
     }
     return NO;
index 7faf6f2..0229655 100644 (file)
 - (void)setAudioFilter: (char *)psz_name on:(BOOL)b_on
 {
     audio_output_t *p_aout = getAout();
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     playlist_EnableAudioFilter(pl_Get(p_intf), psz_name, b_on);
 
     if (p_aout) {
 
 - (NSString *)generateProfileString
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     vlc_object_t *p_object = VLC_OBJECT(getAout());
     if (p_object == NULL)
         p_object = vlc_object_hold(pl_Get(p_intf));
 
 - (IBAction)profileSelectorAction:(id)sender
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     [self saveCurrentProfile];
     i_old_profile_index = [_profilePopup indexOfSelectedItem];
 
@@ -522,7 +522,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
 
 - (void)equalizerUpdated
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     float fPreamp = config_GetFloat(p_intf, "equalizer-preamp");
     bool b_2p = (BOOL)config_GetInt(p_intf, "equalizer-2pass");
     bool bEnabled = GetEqualizerStatus(p_intf, (char *)"equalizer");
@@ -600,13 +600,13 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
     }
 
     /* save changed to config */
-    config_PutPsz(VLCIntf, "equalizer-bands", [[self generatePresetString] UTF8String]);
+    config_PutPsz(getIntf(), "equalizer-bands", [[self generatePresetString] UTF8String]);
 
 }
 
 - (IBAction)equalizerChangePreset:(id)sender
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     NSInteger numberOfChosenPreset = [sender indexOfSelectedItem];
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
 
@@ -641,7 +641,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
     }
     
     /* save changed to config */
-    config_PutFloat(VLCIntf, "equalizer-preamp", fPreamp);
+    config_PutFloat(getIntf(), "equalizer-preamp", fPreamp);
 }
 
 - (IBAction)equalizerTwoPass:(id)sender
@@ -655,7 +655,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
     }
 
     /* save changed to config */
-    config_PutInt(VLCIntf, "equalizer-2pass", (int)b_2p);
+    config_PutInt(getIntf(), "equalizer-2pass", (int)b_2p);
 }
 
 - (IBAction)addPresetAction:(id)sender
@@ -695,7 +695,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
             vlc_object_release(p_aout);
         }
 
-        config_PutPsz(VLCIntf, "equalizer-preset", [[resultingText decomposedStringWithCanonicalMapping] UTF8String]);
+        config_PutPsz(getIntf(), "equalizer-preset", [[resultingText decomposedStringWithCanonicalMapping] UTF8String]);
 
         /* update UI */
         [_self updatePresetSelector];
@@ -741,7 +741,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
 #pragma mark Compressor
 - (void)resetCompressor
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     BOOL bEnable_compressor = NO;
     char *psz_afilters;
     psz_afilters = config_GetPsz(p_intf, "audio-filter");
@@ -772,7 +772,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
 
 - (IBAction)resetCompressorValues:(id)sender
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     config_PutFloat(p_intf, "compressor-rms-peak", 0.000000);
     config_PutFloat(p_intf, "compressor-attack", 25.000000);
     config_PutFloat(p_intf, "compressor-release", 100.000000);
@@ -824,7 +824,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
         var_SetFloat(p_aout, value, [sender floatValue]);
         vlc_object_release(p_aout);
     }
-    config_PutFloat(VLCIntf, value, [sender floatValue]);
+    config_PutFloat(getIntf(), value, [sender floatValue]);
 
     if (sender == _compressorBand1Slider)
         [_compressorBand1TextField setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [sender floatValue]]];
@@ -846,7 +846,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
 #pragma mark Spatializer
 - (void)resetSpatializer
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     BOOL bEnable_spatializer = NO;
     char *psz_afilters;
     psz_afilters = config_GetPsz(p_intf, "audio-filter");
@@ -874,7 +874,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
 
 - (IBAction)resetSpatializerValues:(id)sender
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     config_PutFloat(p_intf, "spatializer-roomsize", .85);
     config_PutFloat(p_intf, "spatializer-width", 1.);
     config_PutFloat(p_intf, "spatializer-wet", .4);
@@ -918,7 +918,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
         var_SetFloat(p_aout, value, [sender floatValue] / 10.);
         vlc_object_release(p_aout);
     }
-    config_PutFloat(VLCIntf, value, [sender floatValue] / 10.);
+    config_PutFloat(getIntf(), value, [sender floatValue] / 10.);
 
     if (sender == _spatializerBand1Slider)
         [_spatializerBand1TextField setStringValue:[NSString localizedStringWithFormat:@"%1.1f", [sender floatValue]]];
@@ -936,7 +936,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
 #pragma mark Filter
 - (void)resetAudioFilters
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     BOOL bEnable_normvol = NO;
     char *psz_afilters;
     psz_afilters = config_GetPsz(p_intf, "audio-filter");
@@ -978,7 +978,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
         vlc_object_release(p_aout);
     }
 
-    config_PutFloat(VLCIntf, "norm-max-level", [_filterNormLevelSlider floatValue]);
+    config_PutFloat(getIntf(), "norm-max-level", [_filterNormLevelSlider floatValue]);
 }
 
 - (IBAction)filterEnableKaraoke:(id)sender
index 7a873b9..f34aac1 100644 (file)
@@ -55,7 +55,7 @@
 
 - (void)awakeFromNib
 {
-    _darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
+    _darkInterface = config_GetInt(getIntf(), "macosx-interfacestyle");
     _nativeFullscreenMode = NO;
 
     [o_drop_view setDrawBorder: NO];
     [o_play_btn setAlternateImage: o_play_pressed_img];
 
     NSColor *o_string_color;
-    if (!var_InheritBool(VLCIntf, "macosx-interfacestyle"))
+    if (!var_InheritBool(getIntf(), "macosx-interfacestyle"))
         o_string_color = [NSColor colorWithCalibratedRed:0.229 green:0.229 blue:0.229 alpha:100.0];
     else
         o_string_color = [NSColor colorWithCalibratedRed:0.64 green:0.64 blue:0.64 alpha:100.0];
         [o_fullscreen_btn removeFromSuperviewWithoutNeedingDisplay];
     }
 
-    if (config_GetInt(VLCIntf, "macosx-show-playback-buttons"))
+    if (config_GetInt(getIntf(), "macosx-show-playback-buttons"))
         [self toggleForwardBackwardMode: YES];
 
 }
         default:
             return;
     }
-    p_input = pl_CurrentInput(VLCIntf);
+    p_input = pl_CurrentInput(getIntf());
     if (p_input != NULL) {
         vlc_value_t pos;
         NSString * o_time;
 - (void)updateTimeSlider
 {
     input_thread_t * p_input;
-    p_input = pl_CurrentInput(VLCIntf);
+    p_input = pl_CurrentInput(getIntf());
     if (p_input) {
         NSString * o_time;
         vlc_value_t pos;
     bool b_chapters = false;
     bool b_buffering = false;
 
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
 
     PL_LOCK;
     b_plmul = playlist_CurrentSize(p_playlist) > 1;
@@ -623,15 +623,15 @@ frame.origin.x = f_width + frame.origin.x; \
     }
 
 
-    b_show_jump_buttons = config_GetInt(VLCIntf, "macosx-show-playback-buttons");
+    b_show_jump_buttons = config_GetInt(getIntf(), "macosx-show-playback-buttons");
     if (b_show_jump_buttons)
         [self addJumpButtons:YES];
 
-    b_show_playmode_buttons = config_GetInt(VLCIntf, "macosx-show-playmode-buttons");
+    b_show_playmode_buttons = config_GetInt(getIntf(), "macosx-show-playmode-buttons");
     if (!b_show_playmode_buttons)
         [self removePlaymodeButtons:YES];
 
-    if (!config_GetInt(VLCIntf, "macosx-show-effects-button"))
+    if (!config_GetInt(getIntf(), "macosx-show-effects-button"))
         [self removeEffectsButton:YES];
 
     [[[VLCMain sharedInstance] playlist] playbackModeUpdated];
@@ -644,7 +644,7 @@ frame.origin.x = f_width + frame.origin.x; \
 
 - (void)toggleEffectsButton
 {
-    if (config_GetInt(VLCIntf, "macosx-show-effects-button"))
+    if (config_GetInt(getIntf(), "macosx-show-effects-button"))
         [self addEffectsButton:NO];
     else
         [self removeEffectsButton:NO];
@@ -755,7 +755,7 @@ else \
 
 - (void)toggleJumpButtons
 {
-    b_show_jump_buttons = config_GetInt(VLCIntf, "macosx-show-playback-buttons");
+    b_show_jump_buttons = config_GetInt(getIntf(), "macosx-show-playback-buttons");
 
     if (b_show_jump_buttons)
         [self addJumpButtons:NO];
@@ -937,7 +937,7 @@ else \
 
 - (void)togglePlaymodeButtons
 {
-    b_show_playmode_buttons = config_GetInt(VLCIntf, "macosx-show-playmode-buttons");
+    b_show_playmode_buttons = config_GetInt(getIntf(), "macosx-show-playmode-buttons");
 
     if (b_show_playmode_buttons)
         [self addPlaymodeButtons:NO];
@@ -1045,7 +1045,7 @@ else \
 - (IBAction)repeat:(id)sender
 {
     vlc_value_t looping,repeating;
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
     playlist_t * p_playlist = pl_Get(p_intf);
 
     var_Get(p_playlist, "repeat", &repeating);
@@ -1070,7 +1070,7 @@ else \
 - (void)setShuffle
 {
     bool b_value;
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     b_value = var_GetBool(p_playlist, "random");
 
     if (b_value) {
@@ -1139,7 +1139,7 @@ else \
     bool b_control = false;
     bool b_chapters = false;
 
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
 
     PL_LOCK;
     b_plmul = playlist_CurrentSize(p_playlist) > 1;
index 815da7b..9b57352 100644 (file)
         }
     }
 
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
 
     input_item_t *p_input = input_item_New([_MRL UTF8String], [[_dropinMediaLabel stringValue] UTF8String]);
     if (!p_input)
         PL_UNLOCK;
     }
     else
-        msg_Err(VLCIntf, "CAS: playlist add input failed :(");
+        msg_Err(getIntf(), "CAS: playlist add input failed :(");
 
     /* we're done with this input */
     vlc_gc_decref(p_input);
             NSArray * array = [[[VLCMain sharedInstance] playlist] draggedItems];
             NSUInteger count = [array count];
             if (count > 0) {
-                playlist_t * p_playlist = pl_Get(VLCIntf);
+                playlist_t * p_playlist = pl_Get(getIntf());
                 playlist_item_t * p_item = NULL;
 
                 PL_LOCK;
 
     NSArray * components = [profileString componentsSeparatedByString:@";"];
     if ([components count] != 16) {
-        msg_Err(VLCIntf, "CAS: the requested profile '%s' is invalid", [profileString UTF8String]);
+        msg_Err(getIntf(), "CAS: the requested profile '%s' is invalid", [profileString UTF8String]);
         return;
     }
 
     else if ([format isEqualToString:@"wmv"])
         [_customizeEncapMatrix selectCellWithTag:ASF];
     else
-        msg_Err(VLCIntf, "CAS: unknown encap format requested for customization");
+        msg_Err(getIntf(), "CAS: unknown encap format requested for customization");
 }
 
 - (NSString *)currentEncapsulationFormatAsFileExtension:(BOOL)b_extension
index 312fa24..19483dc 100644 (file)
@@ -94,7 +94,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 {
     self = [super init];
     if (self) {
-        intf_thread_t *p_intf = VLCIntf;
+        intf_thread_t *p_intf = getIntf();
 
         /* init media key support */
         b_mediaKeySupport = var_InheritBool(p_intf, "macosx-mediakeys");
@@ -118,7 +118,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)dealloc
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     var_DelCallback(p_intf->p_libvlc, "intf-boss", BossCallback, (__bridge void *)self);
     [[NSNotificationCenter defaultCenter] removeObserver: self];
 }
@@ -128,8 +128,8 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)playOrPause
 {
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
+    playlist_t *p_playlist = pl_Get(getIntf());
 
     if (p_input) {
         playlist_TogglePause(p_playlist);
@@ -146,34 +146,34 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)pause
 {
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
 
     playlist_Pause(p_playlist);
 }
 
 - (void)stop
 {
-    playlist_Stop(pl_Get(VLCIntf));
+    playlist_Stop(pl_Get(getIntf()));
 }
 
 - (void)faster
 {
-    var_TriggerCallback(pl_Get(VLCIntf), "rate-faster");
+    var_TriggerCallback(pl_Get(getIntf()), "rate-faster");
 }
 
 - (void)slower
 {
-    var_TriggerCallback(pl_Get(VLCIntf), "rate-slower");
+    var_TriggerCallback(pl_Get(getIntf()), "rate-slower");
 }
 
 - (void)normalSpeed
 {
-    var_SetFloat(pl_Get(VLCIntf), "rate", 1.);
+    var_SetFloat(pl_Get(getIntf()), "rate", 1.);
 }
 
 - (void)toggleRecord
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -187,7 +187,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)setPlaybackRate:(int)i_value
 {
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
 
     double speed = pow(2, (double)i_value / 17);
     int rate = INPUT_RATE_DEFAULT / speed;
@@ -200,7 +200,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 {
     float f_rate;
 
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return 0;
 
@@ -212,7 +212,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
     }
     else
     {
-        playlist_t * p_playlist = pl_Get(VLCIntf);
+        playlist_t * p_playlist = pl_Get(getIntf());
         f_rate = var_GetFloat(p_playlist, "rate");
     }
 
@@ -230,17 +230,17 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)previous
 {
-    playlist_Prev(pl_Get(VLCIntf));
+    playlist_Prev(pl_Get(getIntf()));
 }
 
 - (void)next
 {
-    playlist_Next(pl_Get(VLCIntf));
+    playlist_Next(pl_Get(getIntf()));
 }
 
 - (int)durationOfCurrentPlaylistItem
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return 0;
 
@@ -257,7 +257,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (NSURL*)URLOfCurrentPlaylistItem
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return nil;
 
@@ -286,7 +286,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (NSString*)nameOfCurrentPlaylistItem
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return nil;
 
@@ -307,7 +307,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
     }
 
     NSString *o_name = @"";
-    char *format = var_InheritString(VLCIntf, "input-title-format");
+    char *format = var_InheritString(getIntf(), "input-title-format");
     if (format) {
         char *formated = str_format_meta(p_input, format);
         free(format);
@@ -342,7 +342,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)jumpWithValue:(char *)p_value forward:(BOOL)b_value
 {
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (!p_input)
         return;
 
@@ -398,7 +398,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)shuffle
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -428,7 +428,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)repeatAll
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -448,7 +448,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)repeatOne
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -468,7 +468,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)repeatOff
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -489,13 +489,13 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 - (void)setAtoB
 {
     if (!timeA) {
-        input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+        input_thread_t * p_input = pl_CurrentInput(getIntf());
         if (p_input) {
             timeA = var_GetInteger(p_input, "time");
             vlc_object_release(p_input);
         }
     } else if (!timeB) {
-        input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+        input_thread_t * p_input = pl_CurrentInput(getIntf());
         if (p_input) {
             timeB = var_GetInteger(p_input, "time");
             vlc_object_release(p_input);
@@ -513,7 +513,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 - (void)updateAtoB
 {
     if (timeB) {
-        input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+        input_thread_t * p_input = pl_CurrentInput(getIntf());
         if (p_input) {
             mtime_t currentTime = var_GetInteger(p_input, "time");
             if ( currentTime >= timeB || currentTime < timeA)
@@ -525,7 +525,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)volumeUp
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -534,7 +534,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)volumeDown
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -543,7 +543,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)toggleMute
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -552,7 +552,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (BOOL)mute
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return NO;
 
@@ -564,7 +564,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (int)volume
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return 0;
 
@@ -575,7 +575,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)setVolume: (int)i_value
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -590,7 +590,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 - (float)maxVolume
 {
     if (f_maxVolume == 0.) {
-        f_maxVolume = (float)var_InheritInteger(VLCIntf, "macosx-max-volume") / 100. * AOUT_VOLUME_DEFAULT;
+        f_maxVolume = (float)var_InheritInteger(getIntf(), "macosx-max-volume") / 100. * AOUT_VOLUME_DEFAULT;
     }
 
     return f_maxVolume;
@@ -598,7 +598,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)addSubtitlesToCurrentInput:(NSArray *)paths
 {
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     if (!p_input)
         return;
 
@@ -606,22 +606,22 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
     for (int i = 0; i < count ; i++) {
         const char *path = [[[paths objectAtIndex:i] path] UTF8String];
-        msg_Dbg(VLCIntf, "loading subs from %s", path);
+        msg_Dbg(getIntf(), "loading subs from %s", path);
 
         int i_result = input_AddSubtitleOSD(p_input, path, true, true);
         if (i_result != VLC_SUCCESS)
-            msg_Warn(VLCIntf, "unable to load subtitles from '%s'", path);
+            msg_Warn(getIntf(), "unable to load subtitles from '%s'", path);
     }
     vlc_object_release(p_input);
 }
 
 - (void)showPosition
 {
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (p_input != NULL) {
         vout_thread_t *p_vout = input_GetVout(p_input);
         if (p_vout != NULL) {
-            var_SetInteger(VLCIntf->p_libvlc, "key-action", ACTIONID_POSITION);
+            var_SetInteger(getIntf()->p_libvlc, "key-action", ACTIONID_POSITION);
             vlc_object_release(p_vout);
         }
         vlc_object_release(p_input);
@@ -638,7 +638,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
         return NO;
 
     // Try to add file as a subtitle
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (items.count == 1 && p_input) {
         NSString *url = [[items firstObject] valueForKey:@"ITEM_URL"];
         char *path = vlc_uri2path([url UTF8String]);
@@ -664,17 +664,17 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)setAspectRatioIsLocked:(BOOL)b_value
 {
-    config_PutInt(VLCIntf, "macosx-lock-aspect-ratio", b_value);
+    config_PutInt(getIntf(), "macosx-lock-aspect-ratio", b_value);
 }
 
 - (BOOL)aspectRatioIsLocked
 {
-    return config_GetInt(VLCIntf, "macosx-lock-aspect-ratio");
+    return config_GetInt(getIntf(), "macosx-lock-aspect-ratio");
 }
 
 - (void)toggleFullscreen
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -699,7 +699,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
     BOOL b_needsRestart = NO;
 
     #define fixpref(pref) \
-    o_workString = [[NSMutableString alloc] initWithFormat:@"%s", config_GetPsz(VLCIntf, pref)]; \
+    o_workString = [[NSMutableString alloc] initWithFormat:@"%s", config_GetPsz(getIntf(), pref)]; \
     if ([o_workString length] > 0) \
     { \
         returnedRange = [o_workString rangeOfString:@"macosx" options: NSCaseInsensitiveSearch]; \
@@ -712,7 +712,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
             fullRange = NSMakeRange(0, [o_workString length]); \
             [o_workString replaceOccurrencesOfString:@"macosx:" withString:@"" options: NSCaseInsensitiveSearch range: fullRange]; \
             \
-            config_PutPsz(VLCIntf, pref, [o_workString UTF8String]); \
+            config_PutPsz(getIntf(), pref, [o_workString UTF8String]); \
             b_needsRestart = YES; \
         } \
     }
@@ -742,14 +742,14 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
     } else if (module_provides(p_obj, "sub filter")) {
         return "sub-filter";
     } else {
-        msg_Err(VLCIntf, "Unknown video filter type.");
+        msg_Err(getIntf(), "Unknown video filter type.");
         return NULL;
     }
 }
 
 - (void)setVideoFilter: (const char *)psz_name on:(BOOL)b_on
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
     char *psz_string, *psz_parser;
@@ -814,7 +814,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 - (void)restartFilterIfNeeded: (const char *)psz_filter option: (const char *)psz_name
 {
     vout_thread_t *p_vout = getVout();
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -869,7 +869,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 {
     vout_thread_t *p_vout = getVout();
     vlc_object_t *p_filter;
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -895,7 +895,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 {
     vout_thread_t *p_vout = getVout();
     vlc_object_t *p_filter;
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -922,7 +922,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
     char *psz_new_value = strdup(psz_value);
     vout_thread_t *p_vout = getVout();
     vlc_object_t *p_filter;
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -950,7 +950,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 {
     vout_thread_t *p_vout = getVout();
     vlc_object_t *p_filter;
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -980,7 +980,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (void)coreChangedMediaKeySupportSetting: (NSNotification *)o_notification
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -1061,7 +1061,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
  increase/decrease as long as the user holds the left/right, plus/minus button */
 - (void) executeHoldActionForRemoteButton: (NSNumber*) buttonIdentifierNumber
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -1096,7 +1096,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
                pressedDown: (BOOL) pressedDown
                 clickCount: (unsigned int) count
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return;
 
@@ -1114,27 +1114,27 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
                 [self playOrPause];
             break;
         case kRemoteButtonVolume_Plus:
-            if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
+            if (config_GetInt(getIntf(), "macosx-appleremote-sysvol"))
                 [NSSound increaseSystemVolume];
             else
                 if (p_intf)
                     var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP);
             break;
         case kRemoteButtonVolume_Minus:
-            if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
+            if (config_GetInt(getIntf(), "macosx-appleremote-sysvol"))
                 [NSSound decreaseSystemVolume];
             else
                 if (p_intf)
                     var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN);
             break;
         case kRemoteButtonRight:
-            if (config_GetInt(VLCIntf, "macosx-appleremote-prevnext"))
+            if (config_GetInt(getIntf(), "macosx-appleremote-prevnext"))
                 [self forward];
             else
                 [self next];
             break;
         case kRemoteButtonLeft:
-            if (config_GetInt(VLCIntf, "macosx-appleremote-prevnext"))
+            if (config_GetInt(getIntf(), "macosx-appleremote-prevnext"))
                 [self backward];
             else
                 [self previous];
@@ -1183,7 +1183,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
         unichar key = [characters characterAtIndex: 0];
 
         if (key) {
-            input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+            input_thread_t * p_input = pl_CurrentInput(getIntf());
             if (p_input != NULL) {
                 vout_thread_t *p_vout = input_GetVout(p_input);
 
@@ -1206,7 +1206,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 
 - (BOOL)hasDefinedShortcutKey:(NSEvent *)o_event force:(BOOL)b_force
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return NO;
 
index dde5451..52105d4 100644 (file)
@@ -98,7 +98,7 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 
 - (void)dealloc
 {
-    vlc_LogSet( VLCIntf->p_libvlc, NULL, NULL );
+    vlc_LogSet( getIntf()->p_libvlc, NULL, NULL );
 }
 
 - (void)windowDidLoad
@@ -116,7 +116,7 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 - (void)showWindow:(id)sender
 {
     /* subscribe to LibVLCCore's messages */
-    vlc_LogSet(VLCIntf->p_libvlc, MsgCallback, (__bridge void*)self);
+    vlc_LogSet(getIntf()->p_libvlc, MsgCallback, (__bridge void*)self);
 
     [super showWindow:sender];
 }
@@ -135,7 +135,7 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 - (void)windowWillClose:(NSNotification *)notification
 {
     /* unsubscribe from LibVLCCore's messages */
-    vlc_LogSet( VLCIntf->p_libvlc, NULL, NULL );
+    vlc_LogSet( getIntf()->p_libvlc, NULL, NULL );
     [_messageArray removeAllObjects];
 }
 
@@ -156,7 +156,7 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 
             NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
             if ([data writeToFile: [[saveFolderPanel URL] path] atomically: YES] == NO)
-                msg_Warn(VLCIntf, "Error while saving the debug log");
+                msg_Warn(getIntf(), "Error while saving the debug log");
         }
     }];
 }
@@ -166,8 +166,8 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
     [_messageArray removeAllObjects];
 
     // Reregister handler, to write new header to log
-    vlc_LogSet(VLCIntf->p_libvlc, NULL, NULL);
-    vlc_LogSet(VLCIntf->p_libvlc, MsgCallback, (__bridge void*)self);
+    vlc_LogSet(getIntf()->p_libvlc, NULL, NULL);
+    vlc_LogSet(getIntf()->p_libvlc, MsgCallback, (__bridge void*)self);
 
     [_messageTable reloadData];
 }
index 6d6bb57..60d108e 100644 (file)
@@ -270,7 +270,7 @@ static int extensionDialogCallback(vlc_object_t *p_this, const char *psz_variabl
 {
     self = [super init];
     if (self) {
-        intf_thread_t *p_intf = VLCIntf;
+        intf_thread_t *p_intf = getIntf();
         var_Create(p_intf, "dialog-extension", VLC_VAR_ADDRESS);
         var_AddCallback(p_intf, "dialog-extension", extensionDialogCallback, (__bridge void *)self);
         // dialog_Register(p_intf) is called by coredialog provider
@@ -280,7 +280,7 @@ static int extensionDialogCallback(vlc_object_t *p_this, const char *psz_variabl
 
 - (void)dealloc
 {
-    var_DelCallback(VLCIntf, "dialog-extension", extensionDialogCallback, (__bridge void *)self);
+    var_DelCallback(getIntf(), "dialog-extension", extensionDialogCallback, (__bridge void *)self);
 }
 
 - (void)performEventWithObject:(NSValue *)objectValue ofType:(const char*)type
@@ -294,7 +294,7 @@ static int extensionDialogCallback(vlc_object_t *p_this, const char *psz_variabl
 
     }
     else
-        msg_Err(VLCIntf, "unhandled dialog type: '%s'", type);
+        msg_Err(getIntf(), "unhandled dialog type: '%s'", type);
 }
 
 - (void)triggerClick:(id)sender
@@ -465,7 +465,7 @@ static int extensionDialogCallback(vlc_object_t *p_this, const char *psz_variabl
 
     VLCDialogWindow *dialogWindow = CFBridgingRelease(p_dialog->p_sys_intf);
     if (!dialogWindow) {
-        msg_Warn(VLCIntf, "dialog window not found");
+        msg_Warn(getIntf(), "dialog window not found");
         return VLC_EGENERIC;
     }
 
index 3cab884..663c015 100644 (file)
@@ -77,7 +77,7 @@
         if (b_ret == NO)
             return;
     }
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
 
     vlc_mutex_lock(&p_extensions_manager->lock);
 
 
 - (BOOL)loadExtensions
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_extensions_manager) {
         p_extensions_manager = (extensions_manager_t*)vlc_object_create(p_intf, sizeof(extensions_manager_t));
         if (!p_extensions_manager) {
 - (void)triggerMenu:(id)sender
 {
     NSLog(@"%s", __PRETTY_FUNCTION__);
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     uint32_t identifier = [(NSMenuItem *)sender tag];
 
     uint16_t i_ext = MENU_GET_EXTENSION(identifier);
 
 - (void)dealloc
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     msg_Dbg(p_intf, "Deinitializing extensions manager");
 
     _extensionDialogProvider = nil;
index 4e0ed44..7815de5 100644 (file)
@@ -155,10 +155,10 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
 {
     self = [super init];
     if(self) {
-        msg_Dbg(VLCIntf, "Initializing input manager");
+        msg_Dbg(getIntf(), "Initializing input manager");
 
         o_main = o_mainObj;
-        var_AddCallback(pl_Get(VLCIntf), "input-current", InputThreadChanged, (__bridge void *)self);
+        var_AddCallback(pl_Get(getIntf()), "input-current", InputThreadChanged, (__bridge void *)self);
 
         informInputChangedQueue = dispatch_queue_create("org.videolan.vlc.inputChangedQueue", DISPATCH_QUEUE_SERIAL);
 
@@ -168,7 +168,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
 
 - (void)dealloc
 {
-    msg_Dbg(VLCIntf, "Deinitializing input manager");
+    msg_Dbg(getIntf(), "Deinitializing input manager");
     if (p_current_input) {
         /* continue playback where you left off */
         [[o_main playlist] storePlaybackPositionForItem:p_current_input];
@@ -178,7 +178,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
         p_current_input = NULL;
     }
 
-    var_DelCallback(pl_Get(VLCIntf), "input-current", InputThreadChanged, (__bridge void *)self);
+    var_DelCallback(pl_Get(getIntf()), "input-current", InputThreadChanged, (__bridge void *)self);
 
     dispatch_release(informInputChangedQueue);
 }
@@ -199,7 +199,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
     input_thread_t *p_input_changed = NULL;
 
     // object is hold here and released then it is dead
-    p_current_input = playlist_CurrentInput(pl_Get(VLCIntf));
+    p_current_input = playlist_CurrentInput(pl_Get(getIntf()));
     if (p_current_input) {
         var_AddCallback(p_current_input, "intf-event", InputEvent, (__bridge void *)self);
         [self playbackStatusUpdated];
@@ -239,7 +239,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
 
 - (void)playbackStatusUpdated
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     int state = -1;
     if (p_current_input) {
         state = var_GetInteger(p_current_input, "state");
@@ -300,7 +300,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
 
         /* prevent the system from sleeping */
         if (systemSleepAssertionID > 0) {
-            msg_Dbg(VLCIntf, "releasing old sleep blocker (%i)" , systemSleepAssertionID);
+            msg_Dbg(getIntf(), "releasing old sleep blocker (%i)" , systemSleepAssertionID);
             IOPMAssertionRelease(systemSleepAssertionID);
         }
 
@@ -322,9 +322,9 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
         }
 
         if (success == kIOReturnSuccess)
-            msg_Dbg(VLCIntf, "prevented sleep through IOKit (%i)", systemSleepAssertionID);
+            msg_Dbg(getIntf(), "prevented sleep through IOKit (%i)", systemSleepAssertionID);
         else
-            msg_Warn(VLCIntf, "failed to prevent system sleep through IOKit");
+            msg_Warn(getIntf(), "failed to prevent system sleep through IOKit");
 
         [[o_main mainMenu] setPause];
         [[o_main mainWindow] setPause];
@@ -335,7 +335,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
 
         /* allow the system to sleep again */
         if (systemSleepAssertionID > 0) {
-            msg_Dbg(VLCIntf, "releasing sleep blocker (%i)" , systemSleepAssertionID);
+            msg_Dbg(getIntf(), "releasing sleep blocker (%i)" , systemSleepAssertionID);
             IOPMAssertionRelease(systemSleepAssertionID);
         }
 
@@ -364,7 +364,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
 
 - (void)resumeItunesPlayback:(id)sender
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (var_InheritInteger(p_intf, "macosx-control-itunes") > 1) {
         if (b_has_itunes_paused) {
             iTunesApplication *iTunesApp = (iTunesApplication *) [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];
index 6555bb4..a7d1044 100644 (file)
@@ -71,7 +71,7 @@
 
 - (void)dealloc
 {
-    msg_Dbg(VLCIntf, "Deinitializing main menu");
+    msg_Dbg(getIntf(), "Deinitializing main menu");
     [[NSNotificationCenter defaultCenter] removeObserver: self];
 
     [self releaseRepresentedObjects:[NSApp mainMenu]];
@@ -86,7 +86,7 @@
     NSString* preferredLanguage = [languages firstObject];
 
     if ([NSLocale characterDirectionForLanguage:preferredLanguage] == NSLocaleLanguageDirectionRightToLeft) {
-        msg_Dbg(VLCIntf, "adapting interface since '%s' is a RTL language", [preferredLanguage UTF8String]);
+        msg_Dbg(getIntf(), "adapting interface since '%s' is a RTL language", [preferredLanguage UTF8String]);
         [_rateTextField setAlignment: NSLeftTextAlignment];
     }
 
     char *key;
 
     /* Get ExtensionsManager */
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
 
     [self initStrings];
 
     module_config_t *p_item;
 
     [menu removeAllItems];
-    p_item = config_FindConfig(VLC_OBJECT(VLCIntf), psz_name);
+    p_item = config_FindConfig(VLC_OBJECT(getIntf()), psz_name);
 
     /* serious problem, if no item found */
     assert(p_item);
         else if (p_item->list.i[i])
             mi = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: @"%d", p_item->list.i[i]] action:NULL keyEquivalent: @""];
         else {
-            msg_Err(VLCIntf, "item %d of pref %s failed to be created", i, psz_name);
+            msg_Err(getIntf(), "item %d of pref %s failed to be created", i, psz_name);
             continue;
         }
 
 
     [_viewMenu setTitle: _NS("View")];
     [_toggleJumpButtons setTitle: _NS("Show Previous & Next Buttons")];
-    [_toggleJumpButtons setState: config_GetInt(VLCIntf, "macosx-show-playback-buttons")];
+    [_toggleJumpButtons setState: config_GetInt(getIntf(), "macosx-show-playback-buttons")];
     [_togglePlaymodeButtons setTitle: _NS("Show Shuffle & Repeat Buttons")];
-    [_togglePlaymodeButtons setState: config_GetInt(VLCIntf, "macosx-show-playmode-buttons")];
+    [_togglePlaymodeButtons setState: config_GetInt(getIntf(), "macosx-show-playmode-buttons")];
     [_toggleEffectsButton setTitle: _NS("Show Audio Effects Button")];
-    [_toggleEffectsButton setState: config_GetInt(VLCIntf, "macosx-show-effects-button")];
+    [_toggleEffectsButton setState: config_GetInt(getIntf(), "macosx-show-effects-button")];
     [_toggleSidebar setTitle: _NS("Show Sidebar")];
-    [_toggleSidebar setState: config_GetInt(VLCIntf, "macosx-show-sidebar")];
+    [_toggleSidebar setState: config_GetInt(getIntf(), "macosx-show-sidebar")];
     [_playlistTableColumns setTitle: _NS("Playlist Table Columns")];
 
     [_controlsMenu setTitle: _NS("Playback")];
 
 - (void)setupMenus
 {
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     input_thread_t *p_input = playlist_CurrentInput(p_playlist);
     if (p_input != NULL) {
         [self setupVarMenuItem:_program target: (vlc_object_t *)p_input
         [mitem setEnabled: YES];
         [mitem setTarget: self];
     }
-    [[submenu itemWithTag: var_InheritInteger(VLCIntf, "macosx-vdev")] setState: NSOnState];
+    [[submenu itemWithTag: var_InheritInteger(getIntf(), "macosx-vdev")] setState: NSOnState];
 }
 
 - (void)setSubmenusEnabled:(BOOL)b_enabled
 
 - (IBAction)toggleEffectsButton:(id)sender
 {
-    BOOL b_value = !config_GetInt(VLCIntf, "macosx-show-effects-button");
-    config_PutInt(VLCIntf, "macosx-show-effects-button", b_value);
+    BOOL b_value = !config_GetInt(getIntf(), "macosx-show-effects-button");
+    config_PutInt(getIntf(), "macosx-show-effects-button", b_value);
     [(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleEffectsButton];
     [_toggleEffectsButton setState: b_value];
 }
 
 - (IBAction)toggleJumpButtons:(id)sender
 {
-    BOOL b_value = !config_GetInt(VLCIntf, "macosx-show-playback-buttons");
-    config_PutInt(VLCIntf, "macosx-show-playback-buttons", b_value);
+    BOOL b_value = !config_GetInt(getIntf(), "macosx-show-playback-buttons");
+    config_PutInt(getIntf(), "macosx-show-playback-buttons", b_value);
 
     [(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleJumpButtons];
     [[[VLCMain sharedInstance] voutController] updateWindowsUsingBlock:^(VLCVideoWindowCommon *window) {
 
 - (IBAction)togglePlaymodeButtons:(id)sender
 {
-    BOOL b_value = !config_GetInt(VLCIntf, "macosx-show-playmode-buttons");
-    config_PutInt(VLCIntf, "macosx-show-playmode-buttons", b_value);
+    BOOL b_value = !config_GetInt(getIntf(), "macosx-show-playmode-buttons");
+    config_PutInt(getIntf(), "macosx-show-playmode-buttons", b_value);
     [(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] togglePlaymodeButtons];
     [_togglePlaymodeButtons setState: b_value];
 }
 
 - (void)updateSidebarMenuItem
 {
-    [_toggleSidebar setState: config_GetInt(VLCIntf, "macosx-show-sidebar")];
+    [_toggleSidebar setState: config_GetInt(getIntf(), "macosx-show-sidebar")];
 }
 
 #pragma mark - Playback
 - (IBAction)repeat:(id)sender
 {
     vlc_value_t val;
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     playlist_t *p_playlist = pl_Get(p_intf);
 
     var_Get(p_playlist, "repeat", &val);
 - (IBAction)loop:(id)sender
 {
     vlc_value_t val;
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     playlist_t *p_playlist = pl_Get(p_intf);
 
     var_Get(p_playlist, "loop", &val);
 
 - (IBAction)quitAfterPlayback:(id)sender
 {
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     bool b_value = !var_CreateGetBool(p_playlist, "play-and-exit");
     var_SetBool(p_playlist, "play-and-exit", b_value);
-    config_PutInt(VLCIntf, "play-and-exit", b_value);
+    config_PutInt(getIntf(), "play-and-exit", b_value);
 }
 
 - (IBAction)toggleRecord:(id)sender
 
 - (IBAction)goToSpecificTime:(id)sender
 {
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (p_input) {
         /* we can obviously only do that if an input is available */
         int64_t length = var_GetInteger(p_input, "length");
             if (returnCode != NSOKButton)
                 return;
 
-            input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+            input_thread_t *p_input = pl_CurrentInput(getIntf());
             if (p_input) {
                 input_Control(p_input, INPUT_SET_TIME, (int64_t)(returnTime *1000000));
                 vlc_object_release(p_input);
         returnValue = aout_DeviceSet(p_aout, NULL);
 
     if (returnValue != 0)
-        msg_Warn(VLCIntf, "failed to set audio device %li", [sender tag]);
+        msg_Warn(getIntf(), "failed to set audio device %li", [sender tag]);
 
     vlc_object_release(p_aout);
     [self refreshAudioDeviceList];
 
 - (IBAction)resizeVideoWindow:(id)sender
 {
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (p_input) {
         vout_thread_t *p_vout = getVoutForActiveWindow();
         if (p_vout) {
 
 - (IBAction)floatOnTop:(id)sender
 {
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (p_input) {
         vout_thread_t *p_vout = getVoutForActiveWindow();
         if (p_vout) {
             BOOL b_fs = var_ToggleBool(p_vout, "video-on-top");
-            var_SetBool(pl_Get(VLCIntf), "video-on-top", b_fs);
+            var_SetBool(pl_Get(getIntf()), "video-on-top", b_fs);
 
             vlc_object_release(p_vout);
         }
 
 - (IBAction)createVideoSnapshot:(id)sender
 {
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (p_input) {
         vout_thread_t *p_vout = getVoutForActiveWindow();
         if (p_vout) {
 
 - (void)toggleFullscreenDevice:(id)sender
 {
-    config_PutInt(VLCIntf, "macosx-vdev", [sender tag]);
+    config_PutInt(getIntf(), "macosx-vdev", [sender tag]);
     [self refreshVoutDeviceMenu: nil];
 }
 
 - (IBAction)addSubtitleFile:(id)sender
 {
     NSInteger i_returnValue = 0;
-    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
     if (!p_input)
         return;
 
     int intValue = [sender tag];
     NSString *representedObject = [sender representedObject];
 
-    config_PutInt(VLCIntf, [representedObject UTF8String], intValue);
+    config_PutInt(getIntf(), [representedObject UTF8String], intValue);
 
     NSMenu *menu = [sender menu];
     NSUInteger count = (NSUInteger) [menu numberOfItems];
 
 - (IBAction)switchSubtitleBackgroundOpacity:(id)sender
 {
-    config_PutInt(VLCIntf, "freetype-background-opacity", [sender intValue]);
+    config_PutInt(getIntf(), "freetype-background-opacity", [sender intValue]);
 }
 
 - (IBAction)telxTransparent:(id)sender
 {
     vlc_object_t *p_vbi;
-    p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(VLCIntf), "zvbi");
+    p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(getIntf()), "zvbi");
     if (p_vbi) {
         var_SetBool(p_vbi, "vbi-opaque", [sender state]);
         [sender setState: ![sender state]];
         i_page = 'b' << 16;
     if (i_page == 0) return;
 
-    p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(VLCIntf), "zvbi");
+    p_vbi = (vlc_object_t *) vlc_object_find_name(pl_Get(getIntf()), "zvbi");
     if (p_vbi) {
         var_SetInteger(p_vbi, "vbi-page", i_page);
         vlc_object_release(p_vbi);
 
 - (IBAction)savePlaylist:(id)sender
 {
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
 
     NSSavePanel *savePanel = [NSSavePanel savePanel];
     NSString * name = [NSString stringWithFormat: @"%@", _NS("Untitled")];
 - (void)setShuffle
 {
     bool b_value;
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     b_value = var_GetBool(p_playlist, "random");
 
     [_random setState: b_value];
     NSString *title = [mi title];
     BOOL bEnabled = TRUE;
     vlc_value_t val;
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     input_thread_t *p_input = playlist_CurrentInput(p_playlist);
 
     if ([title isEqualToString: _NS("Stop")]) {
index 438644e..796274b 100644 (file)
@@ -90,7 +90,7 @@ static const float f_min_window_height = 307.;
     char *key;
     NSString *o_key;
 
-    key = config_GetPsz(VLCIntf, keyString);
+    key = config_GetPsz(getIntf(), keyString);
     o_key = [NSString stringWithFormat:@"%s", key];
     FREENULL(key);
 
@@ -159,7 +159,7 @@ static const float f_min_window_height = 307.;
     [self setAcceptsMouseMovedEvents:YES];
     [self setFrameAutosaveName:@"mainwindow"];
 
-    _nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
+    _nativeFullscreenMode = var_InheritBool(getIntf(), "macosx-nativefullscreenmode");
     b_dropzone_active = YES;
 
     // Playlist setup
@@ -246,7 +246,7 @@ static const float f_min_window_height = 307.;
 
         NSAlert *albumArtAlert = [NSAlert alertWithMessageText:_NS("Check for album art and metadata?") defaultButton:_NS("Enable Metadata Retrieval") alternateButton:_NS("No, Thanks") otherButton:nil informativeTextWithFormat:@"%@",_NS("VLC can check online for album art and metadata to enrich your playback experience, e.g. by providing track information when playing Audio CDs. To provide this functionality, VLC will send information about your contents to trusted services in an anonymized form.")];
         NSInteger returnValue = [albumArtAlert runModal];
-        config_PutInt(VLCIntf, "metadata-network-access", returnValue == NSAlertDefaultReturn);
+        config_PutInt(getIntf(), "metadata-network-access", returnValue == NSAlertDefaultReturn);
     }
 
     if (self.darkInterface) {
@@ -304,13 +304,13 @@ static const float f_min_window_height = 307.;
     }
 
     /* update fs button to reflect state for next startup */
-    if (var_InheritBool(pl_Get(VLCIntf), "fullscreen"))
+    if (var_InheritBool(pl_Get(getIntf()), "fullscreen"))
         [self.controlsBar setFullscreenState:YES];
 
     /* restore split view */
     f_lastLeftSplitViewWidth = 200;
     /* trick NSSplitView implementation, which pretends to know better than us */
-    if (!config_GetInt(VLCIntf, "macosx-show-sidebar"))
+    if (!config_GetInt(getIntf(), "macosx-show-sidebar"))
         [self performSelector:@selector(toggleLeftSubSplitView) withObject:nil afterDelay:0.05];
 }
 
@@ -337,9 +337,9 @@ static const float f_min_window_height = 307.;
     /* SD subnodes, inspired by the Qt4 intf */
     char **ppsz_longnames = NULL;
     int *p_categories = NULL;
-    char **ppsz_names = vlc_sd_GetNames(pl_Get(VLCIntf), &ppsz_longnames, &p_categories);
+    char **ppsz_names = vlc_sd_GetNames(pl_Get(getIntf()), &ppsz_longnames, &p_categories);
     if (!ppsz_names)
-        msg_Err(VLCIntf, "no sd item found"); //TODO
+        msg_Err(getIntf(), "no sd item found"); //TODO
     char **ppsz_name = ppsz_names, **ppsz_longname = ppsz_longnames;
     int *p_category = p_categories;
     NSMutableArray *internetItems = [[NSMutableArray alloc] init];
@@ -382,7 +382,7 @@ static const float f_min_window_height = 307.;
                 [[mycompItems lastObject] setSdtype: SD_CAT_MYCOMPUTER];
                 break;
             default:
-                msg_Warn(VLCIntf, "unknown SD type found, skipping (%s)", *ppsz_name);
+                msg_Warn(getIntf(), "unknown SD type found, skipping (%s)", *ppsz_name);
                 break;
         }
 
@@ -501,7 +501,7 @@ static const float f_min_window_height = 307.;
 {
     // Beware, this code is really ugly
 
-    msg_Dbg(VLCIntf, "toggle playlist from state: removed splitview %i, minimized view %i. Event %i", b_splitview_removed, b_minimized_view, event);
+    msg_Dbg(getIntf(), "toggle playlist from state: removed splitview %i, minimized view %i. Event %i", b_splitview_removed, b_minimized_view, event);
     if (![self isVisible] && event == psUserMenuEvent) {
         [self makeKeyAndOrderFront: nil];
         return;
@@ -558,7 +558,7 @@ static const float f_min_window_height = 307.;
         }
     }
 
-    msg_Dbg(VLCIntf, "toggle playlist to state: removed splitview %i, minimized view %i", b_splitview_removed, b_minimized_view);
+    msg_Dbg(getIntf(), "toggle playlist to state: removed splitview %i, minimized view %i", b_splitview_removed, b_minimized_view);
 }
 
 - (IBAction)dropzoneButtonAction:(id)sender
@@ -576,7 +576,7 @@ static const float f_min_window_height = 307.;
 
 - (void)applicationWillTerminate:(NSNotification *)notification
 {
-    config_PutInt(VLCIntf, "macosx-show-sidebar", ![_splitView isSubviewCollapsed:_splitViewLeft]);
+    config_PutInt(getIntf(), "macosx-show-sidebar", ![_splitView isSubviewCollapsed:_splitViewLeft]);
     [self saveFrameUsingName:[self frameAutosaveName]];
 }
 
@@ -594,7 +594,7 @@ static const float f_min_window_height = 307.;
 
 - (void)someWindowWillMiniaturize:(NSNotification *)notification
 {
-    if (config_GetInt(VLCIntf, "macosx-pause-minimized")) {
+    if (config_GetInt(getIntf(), "macosx-pause-minimized")) {
         id obj = [notification object];
 
         if ([obj class] == [VLCVideoWindowCommon class] || [obj class] == [VLCDetachedVideoWindow class] || ([obj class] == [VLCMainWindow class] && !self.nonembedded)) {
@@ -684,12 +684,12 @@ static const float f_min_window_height = 307.;
 - (void)updateName
 {
     input_thread_t *p_input;
-    p_input = pl_CurrentInput(VLCIntf);
+    p_input = pl_CurrentInput(getIntf());
     if (p_input) {
         NSString *aString = @"";
 
-        if (!config_GetPsz(VLCIntf, "video-title")) {
-            char *format = var_InheritString(VLCIntf, "input-title-format");
+        if (!config_GetPsz(getIntf(), "video-title")) {
+            char *format = var_InheritString(getIntf(), "input-title-format");
             if (format) {
                 char *formated = str_format_meta(p_input, format);
                 free(format);
@@ -697,7 +697,7 @@ static const float f_min_window_height = 307.;
                 free(formated);
             }
         } else
-            aString = toNSStr(config_GetPsz(VLCIntf, "video-title"));
+            aString = toNSStr(config_GetPsz(getIntf(), "video-title"));
 
         char *uri = input_item_GetURI(input_GetItem(p_input));
 
@@ -750,7 +750,7 @@ static const float f_min_window_height = 307.;
 
     bool b_seekable = false;
 
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     input_thread_t *p_input = playlist_CurrentInput(p_playlist);
     if (p_input) {
         /* seekable streams */
@@ -832,7 +832,7 @@ static const float f_min_window_height = 307.;
         frameBeforePlayback = NSMakeRect(0, 0, 0, 0);
 
         // update fs button to reflect state for next startup
-        if (var_InheritBool(VLCIntf, "fullscreen") || var_GetBool(pl_Get(VLCIntf), "fullscreen")) {
+        if (var_InheritBool(getIntf(), "fullscreen") || var_GetBool(pl_Get(getIntf()), "fullscreen")) {
             [self.controlsBar setFullscreenState:YES];
         }
 
@@ -927,7 +927,7 @@ static const float f_min_window_height = 307.;
 - (void)mainSplitViewDidResizeSubviews:(id)object
 {
     f_lastLeftSplitViewWidth = [_splitViewLeft frame].size.width;
-    config_PutInt(VLCIntf, "macosx-show-sidebar", ![_splitView isSubviewCollapsed:_splitViewLeft]);
+    config_PutInt(getIntf(), "macosx-show-sidebar", ![_splitView isSubviewCollapsed:_splitViewLeft]);
     [[[VLCMain sharedInstance] mainMenu] updateSidebarMenuItem];
 }
 
@@ -946,7 +946,7 @@ static const float f_min_window_height = 307.;
 - (void)_updatePlaylistTitle
 {
     PLRootType root = [[[[VLCMain sharedInstance] playlist] model] currentRootType];
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
 
     PL_LOCK;
     if (root == ROOT_TYPE_PLAYLIST)
@@ -962,7 +962,7 @@ static const float f_min_window_height = 307.;
     if (!node)
         return @"";
 
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
     PL_ASSERT_LOCKED;
 
     mtime_t mt_duration = playlist_GetNodeDuration( node );
@@ -1035,7 +1035,7 @@ static const float f_min_window_height = 307.;
 
 - (NSInteger)sourceList:(PXSourceList*)aSourceList badgeValueForItem:(id)item
 {
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
     NSInteger i_playlist_size = 0;
 
     if ([[item identifier] isEqualToString: @"playlist"]) {
@@ -1076,7 +1076,7 @@ static const float f_min_window_height = 307.;
             if ([item sdtype] > 0)
             {
                 NSMenu *m = [[NSMenu alloc] init];
-                playlist_t * p_playlist = pl_Get(VLCIntf);
+                playlist_t * p_playlist = pl_Get(getIntf());
                 BOOL sd_loaded = playlist_IsServicesDiscoveryLoaded(p_playlist, [[item identifier] UTF8String]);
                 if (!sd_loaded)
                     [m addItemWithTitle:_NS("Enable") action:@selector(sdmenuhandler:) keyEquivalent:@""];
@@ -1095,7 +1095,7 @@ static const float f_min_window_height = 307.;
 {
     NSString * identifier = [sender representedObject];
     if ([identifier length] > 0 && ![identifier isEqualToString:@"lua{sd='freebox',longname='Freebox TV'}"]) {
-        playlist_t * p_playlist = pl_Get(VLCIntf);
+        playlist_t * p_playlist = pl_Get(getIntf());
         BOOL sd_loaded = playlist_IsServicesDiscoveryLoaded(p_playlist, [identifier UTF8String]);
 
         if (!sd_loaded)
@@ -1118,7 +1118,7 @@ static const float f_min_window_height = 307.;
 
 - (void)sourceListSelectionDidChange:(NSNotification *)notification
 {
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
 
     NSIndexSet *selectedIndexes = [_sidebarView selectedRowIndexes];
     id item = [_sidebarView itemAtRow:[selectedIndexes firstIndex]];
@@ -1190,7 +1190,7 @@ static const float f_min_window_height = 307.;
 {
     NSPasteboard *o_pasteboard = [info draggingPasteboard];
 
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
     playlist_item_t *p_node;
 
     if ([[item identifier] isEqualToString:@"playlist"])
@@ -1265,18 +1265,18 @@ static const float f_min_window_height = 307.;
 
     if (sender == _podcastSubscribeOkButton && [[_podcastSubscribeUrlField stringValue] length] > 0) {
         NSMutableString *podcastConf = [[NSMutableString alloc] init];
-        if (config_GetPsz(VLCIntf, "podcast-urls") != NULL)
-            [podcastConf appendFormat:@"%s|", config_GetPsz(VLCIntf, "podcast-urls")];
+        if (config_GetPsz(getIntf(), "podcast-urls") != NULL)
+            [podcastConf appendFormat:@"%s|", config_GetPsz(getIntf(), "podcast-urls")];
 
         [podcastConf appendString: [_podcastSubscribeUrlField stringValue]];
-        config_PutPsz(VLCIntf, "podcast-urls", [podcastConf UTF8String]);
-        var_SetString(pl_Get(VLCIntf), "podcast-urls", [podcastConf UTF8String]);
+        config_PutPsz(getIntf(), "podcast-urls", [podcastConf UTF8String]);
+        var_SetString(pl_Get(getIntf()), "podcast-urls", [podcastConf UTF8String]);
     }
 }
 
 - (IBAction)removePodcast:(id)sender
 {
-    char *psz_urls = var_InheritString(pl_Get(VLCIntf), "podcast-urls");
+    char *psz_urls = var_InheritString(pl_Get(getIntf()), "podcast-urls");
     if (psz_urls != NULL) {
         [_podcastUnsubscribePopUpButton removeAllItems];
         [_podcastUnsubscribePopUpButton addItemsWithTitles:[toNSStr(psz_urls) componentsSeparatedByString:@"|"]];
@@ -1291,14 +1291,14 @@ static const float f_min_window_height = 307.;
     [NSApp endSheet:_podcastUnsubscribeWindow];
 
     if (sender == _podcastUnsubscribeOkButton) {
-        playlist_t * p_playlist = pl_Get(VLCIntf);
+        playlist_t * p_playlist = pl_Get(getIntf());
         char *psz_urls = var_InheritString(p_playlist, "podcast-urls");
 
-        NSMutableArray * urls = [[NSMutableArray alloc] initWithArray:[toNSStr(config_GetPsz(VLCIntf, "podcast-urls")) componentsSeparatedByString:@"|"]];
+        NSMutableArray * urls = [[NSMutableArray alloc] initWithArray:[toNSStr(config_GetPsz(getIntf(), "podcast-urls")) componentsSeparatedByString:@"|"]];
         [urls removeObjectAtIndex: [_podcastUnsubscribePopUpButton indexOfSelectedItem]];
         const char *psz_new_urls = [[urls componentsJoinedByString:@"|"] UTF8String];
-        var_SetString(pl_Get(VLCIntf), "podcast-urls", psz_new_urls);
-        config_PutPsz(VLCIntf, "podcast-urls", psz_new_urls);
+        var_SetString(pl_Get(getIntf()), "podcast-urls", psz_new_urls);
+        config_PutPsz(getIntf(), "podcast-urls", psz_new_urls);
 
         free(psz_urls);
 
@@ -1359,7 +1359,7 @@ static const float f_min_window_height = 307.;
     [super awakeFromNib];
     [self setAcceptsMouseMovedEvents: YES];
 
-    BOOL darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
+    BOOL darkInterface = config_GetInt(getIntf(), "macosx-interfacestyle");
 
     if (darkInterface) {
         [self setBackgroundColor: [NSColor clearColor]];
index 5e7921e..71f0fe7 100644 (file)
@@ -82,7 +82,7 @@
 
 - (void)awakeFromNib
 {
-    b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
+    b_nativeFullscreenMode = var_InheritBool(getIntf(), "macosx-nativefullscreenmode");
 
     if (!b_nativeFullscreenMode || OSX_YOSEMITE || OSX_EL_CAPITAN) {
         [o_fullscreen_btn setHidden: YES];
         [[self window] toggleFullScreen:self];
 
     } else
-        msg_Err(VLCIntf, "unknown button action sender");
+        msg_Err(getIntf(), "unknown button action sender");
 
     [self setWindowButtonOver: NO];
     [self setWindowFullscreenButtonOver: NO];
index aa08db7..c30d15c 100644 (file)
@@ -123,7 +123,7 @@ static int VolumeUpdated(vlc_object_t *p_this, const char *psz_var,
         p_playlist = pl;
         _outlineView = outlineView;
 
-        msg_Dbg(VLCIntf, "Initializing playlist model");
+        msg_Dbg(getIntf(), "Initializing playlist model");
         var_AddCallback(p_playlist, "item-change", PLItemUpdated, (__bridge void *)self);
         var_AddCallback(p_playlist, "playlist-item-append", PLItemAppended, (__bridge void *)self);
         var_AddCallback(p_playlist, "playlist-item-deleted", PLItemRemoved, (__bridge void *)self);
@@ -144,7 +144,7 @@ static int VolumeUpdated(vlc_object_t *p_this, const char *psz_var,
 
 - (void)dealloc
 {
-    msg_Dbg(VLCIntf, "Deinitializing playlist model");
+    msg_Dbg(getIntf(), "Deinitializing playlist model");
     var_DelCallback(p_playlist, "item-change", PLItemUpdated, (__bridge void *)self);
     var_DelCallback(p_playlist, "playlist-item-append", PLItemAppended, (__bridge void *)self);
     var_DelCallback(p_playlist, "playlist-item-deleted", PLItemRemoved, (__bridge void *)self);
index e427213..7fbfe79 100644 (file)
@@ -56,7 +56,7 @@
     NSWindow *w = [self window];
 
     if ([w isVisible]) {
-        msg_Err(VLCIntf, "Resume dialog in use already");
+        msg_Err(getIntf(), "Resume dialog in use already");
         return;
     }
 
index f920315..3640c4c 100644 (file)
@@ -71,7 +71,7 @@ NSString *const kVLCMediaUnknown = @"Unknown";
         stringObject = toNSStr(_(psz));
 
         if (stringObject == NULL) {
-            msg_Err(VLCIntf, "could not translate: %s", psz);
+            msg_Err(getIntf(), "could not translate: %s", psz);
             return @"";
         }
     } else
index ec4057b..ff48915 100644 (file)
@@ -59,7 +59,7 @@
     [[_sv_speedTextField formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("fps")]];
     [_sv_durLabel setStringValue: _NS("Subtitle duration factor:")];
 
-    int i_mode = var_InheritInteger(VLCIntf, SUBSDELAY_CFG_MODE);
+    int i_mode = var_InheritInteger(getIntf(), SUBSDELAY_CFG_MODE);
     NSString * o_toolTip, * o_suffix;
 
     switch (i_mode) {
     [_sv_speedStepper setFloatValue:1.0];
     [_sv_durStepper setFloatValue:0.0];
 
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (p_input) {
         var_SetInteger(p_input, "audio-delay", 0.0);
 
 - (void)updateValues
 {
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (p_input) {
         [_av_advanceTextField setDoubleValue: var_GetInteger(p_input, "audio-delay") / 1000000.];
     else
         [_avStepper setDoubleValue: [_av_advanceTextField doubleValue]];
 
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (p_input) {
         var_SetInteger(p_input, "audio-delay", [_av_advanceTextField doubleValue] * 1000000.);
     else
         [_sv_advanceStepper setDoubleValue: [_sv_advanceTextField doubleValue]];
 
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (p_input) {
         var_SetInteger(p_input, "spu-delay", [_sv_advanceTextField doubleValue] * 1000000.);
     else
         [_sv_speedStepper setFloatValue: [_sv_speedTextField floatValue]];
 
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (p_input) {
         var_SetFloat(p_input, "sub-fps", [_sv_speedTextField floatValue]);
     else
         [_sv_durStepper setFloatValue: [_sv_durTextField floatValue]];
 
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (p_input) {
         float f_factor = [_sv_durTextField floatValue];
-        config_PutFloat(VLCIntf, SUBSDELAY_CFG_FACTOR, f_factor);
+        config_PutFloat(getIntf(), SUBSDELAY_CFG_FACTOR, f_factor);
 
         /* Try to find an instance of subsdelay, and set its factor */
-        vlc_object_t *p_obj = (vlc_object_t *) vlc_object_find_name(VLCIntf->p_libvlc, "subsdelay");
+        vlc_object_t *p_obj = (vlc_object_t *) vlc_object_find_name(getIntf()->p_libvlc, "subsdelay");
         if (p_obj) {
             var_SetFloat(p_obj, SUBSDELAY_CFG_FACTOR, f_factor);
             vlc_object_release(p_obj);
index 83b94c8..1619259 100644 (file)
 {
     NSFont *fontToUse;
     CGFloat rowHeight;
-    if (var_InheritBool(VLCIntf, "macosx-large-text")) {
+    if (var_InheritBool(getIntf(), "macosx-large-text")) {
         fontToUse = [NSFont systemFontOfSize:13.];
         rowHeight = 21.;
     } else {
     _outlineView = outlineView;
     [_outlineView setDelegate:self];
 
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
 
     _model = [[PLModel alloc] initWithOutlineView:_outlineView playlist:p_playlist rootItem:p_playlist->p_playing];
     [_outlineView setDataSource:_model];
 /* When called retrieves the selected outlineview row and plays that node or item */
 - (IBAction)playItem:(id)sender
 {
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
 
     // ignore clicks on column header when handling double action
     if (sender == _outlineView && [_outlineView clickedRow] == -1)
     free(psz_url);
     free(psz_path);
 
-    msg_Dbg(VLCIntf, "Reveal url %s in finder", [path UTF8String]);
+    msg_Dbg(getIntf(), "Reveal url %s in finder", [path UTF8String]);
     [[NSWorkspace sharedWorkspace] selectFile: path inFileViewerRootedAtPath: path];
 }
 
 {
     int i_count;
     NSIndexSet *o_selected_indexes;
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
     playlist_t * p_playlist = pl_Get(p_intf);
     playlist_item_t *p_item = NULL;
 
 {
     int i_count;
     NSIndexSet *o_selected_indexes;
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
     playlist_t * p_playlist = pl_Get(p_intf);
     playlist_item_t *p_item = NULL;
 
 
 - (void)sortNode:(int)i_mode
 {
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
     playlist_item_t * p_item;
 
     // TODO why do we need this kind of sort? It looks crap and confusing...
 
 - (input_item_t *)createItem:(NSDictionary *)itemToCreateDict
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     playlist_t *p_playlist = pl_Get(p_intf);
 
     input_item_t *p_input;
         else if ([diskType isEqualToString: kVLCMediaBD] || [diskType isEqualToString: kVLCMediaBDMVFolder])
             uri = [NSString stringWithFormat: @"bluray://%@", path];
         else
-            msg_Warn(VLCIntf, "unknown disk type, treating %s as regular input", [path UTF8String]);
+            msg_Warn(getIntf(), "unknown disk type, treating %s as regular input", [path UTF8String]);
 
         p_input = input_item_New([uri UTF8String], [[[NSFileManager defaultManager] displayNameAtPath:path] UTF8String]);
     }
     if ([[self model] currentRootType] == ROOT_TYPE_MEDIALIBRARY)
         i_plItemId = [[[self model] rootItem] plItemId];
 
-    BOOL b_autoplay = var_InheritBool(VLCIntf, "macosx-autoplay");
+    BOOL b_autoplay = var_InheritBool(getIntf(), "macosx-autoplay");
 
     [self addPlaylistItems:array withParentItemId:i_plItemId atPos:-1 startPlayback:b_autoplay];
 }
 
 - (void)addPlaylistItems:(NSArray*)array withParentItemId:(int)i_plItemId atPos:(int)i_position startPlayback:(BOOL)b_start
 {
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
     PL_LOCK;
 
     playlist_item_t *p_parent = NULL;
     b_item_sel = (row != -1 && [_outlineView selectedRow] != -1);
     b_rows = [_outlineView numberOfRows] != 0;
 
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     bool b_del_allowed = [[self model] editAllowed];
 
     [_playPlaylistMenuItem setEnabled: b_item_sel];
 - (void)outlineView:(NSOutlineView *)outlineView didClickTableColumn:(NSTableColumn *)aTableColumn
 {
     int type = 0;
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     NSString * identifier = [aTableColumn identifier];
 
     playlist_t *p_playlist = pl_Get(p_intf);
                item:(id)item
 {
     /* this method can be called when VLC is already dead, hence the extra checks */
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
     if (!p_intf)
         return;
     playlist_t *p_playlist = pl_Get(p_intf);
 
     NSFont *fontToUse;
-    if (var_InheritBool(VLCIntf, "macosx-large-text"))
+    if (var_InheritBool(getIntf(), "macosx-large-text"))
         fontToUse = [NSFont systemFontOfSize:13.];
     else
         fontToUse = [NSFont systemFontOfSize:11.];
     if (!lastPosition || lastPosition.intValue <= 0)
         return;
 
-    int settingValue = config_GetInt(VLCIntf, "macosx-continue-playback");
+    int settingValue = config_GetInt(getIntf(), "macosx-continue-playback");
     if (settingValue == 2) // never resume
         return;
 
             return;
 
         mtime_t lastPos = (mtime_t)lastPosition.intValue * 1000000;
-        msg_Dbg(VLCIntf, "continuing playback at %lld", lastPos);
+        msg_Dbg(getIntf(), "continuing playback at %lld", lastPos);
         var_SetInteger(p_input_thread, "time", lastPos);
 
         if (result == RESUME_ALWAYS)
-            config_PutInt(VLCIntf, "macosx-continue-playback", 1);
+            config_PutInt(getIntf(), "macosx-continue-playback", 1);
     };
 
     if (settingValue == 1) { // always
 
 - (void)storePlaybackPositionForItem:(input_thread_t *)p_input_thread
 {
-    if (!var_InheritBool(VLCIntf, "macosx-recentitems"))
+    if (!var_InheritBool(getIntf(), "macosx-recentitems"))
         return;
 
     input_item_t *p_item = input_GetItem(p_input_thread);
index 7e3f933..e4f8213 100644 (file)
 
     [self.window setInitialFirstResponder: _uriLabel];
 
-    b_stats = var_InheritBool(VLCIntf, "stats");
+    b_stats = var_InheritBool(getIntf(), "stats");
     if (!b_stats) {
         if ([_tabView numberOfTabViewItems] > 2)
             [_tabView removeTabViewItem: [_tabView tabViewItemAtIndex: 2]];
         [_imageWell setImage: [NSImage imageNamed: @"noart.png"]];
     } else {
         if (!input_item_IsPreparsed(p_item))
-            libvlc_MetaRequest(VLCIntf->p_libvlc, p_item, META_REQUEST_OPTION_NONE);
+            libvlc_MetaRequest(getIntf()->p_libvlc, p_item, META_REQUEST_OPTION_NONE);
 
         /* fill uri info */
         char *psz_url = vlc_uri_decode(input_item_GetURI(p_item));
@@ -370,7 +370,7 @@ FREENULL( psz_##foo );
     input_item_SetDescription( p_item, utf8( _descriptionTextField ) );
     input_item_SetLanguage( p_item, utf8( _languageTextField ) );
 
-    playlist_t *p_playlist = pl_Get(VLCIntf);
+    playlist_t *p_playlist = pl_Get(getIntf());
     input_item_WriteMeta(VLC_OBJECT(p_playlist), p_item);
 
     var_SetBool(p_playlist, "intf-change", true);
@@ -387,8 +387,8 @@ error:
 
 - (IBAction)downloadCoverArt:(id)sender
 {
-    playlist_t *p_playlist = pl_Get(VLCIntf);
-    if (p_item) libvlc_ArtRequest(VLCIntf->p_libvlc, p_item, META_REQUEST_OPTION_NONE);
+    playlist_t *p_playlist = pl_Get(getIntf());
+    if (p_item) libvlc_ArtRequest(getIntf()->p_libvlc, p_item, META_REQUEST_OPTION_NONE);
 }
 
 @end
index 3a35ec8..8d11bf9 100644 (file)
@@ -80,7 +80,7 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
         // this method is not supposed to fail
         assert(videoView != nil);
 
-        msg_Dbg(VLCIntf, "returning videoview with proposed position x=%i, y=%i, width=%i, height=%i", cfg->x, cfg->y, cfg->width, cfg->height);
+        msg_Dbg(getIntf(), "returning videoview with proposed position x=%i, y=%i, width=%i, height=%i", cfg->x, cfg->y, cfg->width, cfg->height);
         p_wnd->handle.nsobject = (void *)CFBridgingRetain(videoView);
 
         [voutController.lock unlock];
@@ -146,7 +146,7 @@ static int WindowControl(vout_window_t *p_wnd, int i_query, va_list args)
             }
             case VOUT_WINDOW_SET_FULLSCREEN:
             {
-                if (var_InheritBool(VLCIntf, "video-wallpaper")) {
+                if (var_InheritBool(getIntf(), "video-wallpaper")) {
                     msg_Dbg(p_wnd, "Ignore fullscreen event as video-wallpaper is on");
                     goto out;
                 }
@@ -230,7 +230,7 @@ void WindowClose(vout_window_t *p_wnd)
     for (NSValue *key in keys)
         [self removeVoutforDisplay:key];
 
-    if (var_InheritBool(VLCIntf, "macosx-dim-keyboard")) {
+    if (var_InheritBool(getIntf(), "macosx-dim-keyboard")) {
         [o_keyboard_backlight switchLightsInstantly:YES];
     }
 }
@@ -242,8 +242,8 @@ void WindowClose(vout_window_t *p_wnd)
 {
     BOOL b_nonembedded = NO;
     BOOL b_nativeFullscreenMode = [[VLCMain sharedInstance] nativeFullscreenMode];
-    BOOL b_video_deco = var_InheritBool(VLCIntf, "video-deco");
-    BOOL b_video_wallpaper = var_InheritBool(VLCIntf, "video-wallpaper");
+    BOOL b_video_deco = var_InheritBool(getIntf(), "video-deco");
+    BOOL b_video_wallpaper = var_InheritBool(getIntf(), "video-wallpaper");
     BOOL b_multiple_vout_windows = [o_vout_dict count] > 0;
     VLCVoutView *o_vout_view;
     VLCVideoWindowCommon *o_new_video_window;
@@ -259,8 +259,8 @@ void WindowClose(vout_window_t *p_wnd)
     if ((b_video_wallpaper || !b_video_deco) && !b_nativeFullscreenMode) {
         // b_video_wallpaper is priorized over !b_video_deco
 
-        msg_Dbg(VLCIntf, "Creating background / blank window");
-        NSScreen *screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger(VLCIntf, "macosx-vdev")];
+        msg_Dbg(getIntf(), "Creating background / blank window");
+        NSScreen *screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger(getIntf(), "macosx-vdev")];
         if (!screen)
             screen = [[[VLCMain sharedInstance] mainWindow] screen];
 
@@ -310,7 +310,7 @@ void WindowClose(vout_window_t *p_wnd)
 
         b_nonembedded = YES;
     } else {
-        if ((var_InheritBool(VLCIntf, "embedded-video") && !b_mainwindow_has_video)) {
+        if ((var_InheritBool(getIntf(), "embedded-video") && !b_mainwindow_has_video)) {
             // setup embedded video
             o_new_video_window = [[VLCMain sharedInstance] mainWindow] ;
             o_vout_view = [o_new_video_window videoView];
@@ -370,7 +370,7 @@ void WindowClose(vout_window_t *p_wnd)
         [o_new_video_window makeKeyAndOrderFront: self];
     }
 
-    [o_new_video_window setAlphaValue: config_GetFloat(VLCIntf, "macosx-opaqueness")];
+    [o_new_video_window setAlphaValue: config_GetFloat(getIntf(), "macosx-opaqueness")];
 
     [o_vout_view setVoutThread:(vout_thread_t *)p_wnd->p_parent];
     [o_new_video_window setHasActiveVideo: YES];
@@ -391,11 +391,11 @@ void WindowClose(vout_window_t *p_wnd)
 
     // TODO: find a cleaner way for "start in fullscreen"
     // Start in fs, because either prefs settings, or fullscreen button was pressed before
-    char *psz_splitter = var_GetString(pl_Get(VLCIntf), "video-splitter");
+    char *psz_splitter = var_GetString(pl_Get(getIntf()), "video-splitter");
     BOOL b_have_splitter = psz_splitter != NULL && *psz_splitter != '\0';
     free(psz_splitter);
 
-    if (!b_video_wallpaper && !b_have_splitter && (var_InheritBool(VLCIntf, "fullscreen") || var_GetBool(pl_Get(VLCIntf), "fullscreen"))) {
+    if (!b_video_wallpaper && !b_have_splitter && (var_InheritBool(getIntf(), "fullscreen") || var_GetBool(pl_Get(getIntf()), "fullscreen"))) {
 
         // this is not set when we start in fullscreen because of
         // fullscreen settings in video prefs the second time
@@ -413,7 +413,7 @@ void WindowClose(vout_window_t *p_wnd)
 {
     VLCVideoWindowCommon *o_window = [o_vout_dict objectForKey:o_key];
     if (!o_window) {
-        msg_Err(VLCIntf, "Cannot close nonexisting window");
+        msg_Err(getIntf(), "Cannot close nonexisting window");
         return;
     }
 
@@ -465,7 +465,7 @@ void WindowClose(vout_window_t *p_wnd)
 {
     VLCVideoWindowCommon *o_window = [o_vout_dict objectForKey:[NSValue valueWithPointer:p_wnd]];
     if (!o_window) {
-        msg_Err(VLCIntf, "Cannot set size for nonexisting window");
+        msg_Err(getIntf(), "Cannot set size for nonexisting window");
         return;
     }
 
@@ -476,7 +476,7 @@ void WindowClose(vout_window_t *p_wnd)
 {
     VLCVideoWindowCommon *o_window = [o_vout_dict objectForKey:[NSValue valueWithPointer:p_wnd]];
     if (!o_window) {
-        msg_Err(VLCIntf, "Cannot set level for nonexisting window");
+        msg_Err(getIntf(), "Cannot set level for nonexisting window");
         return;
     }
 
@@ -500,7 +500,7 @@ void WindowClose(vout_window_t *p_wnd)
 
 - (void)setFullscreen:(int)i_full forWindow:(vout_window_t *)p_wnd withAnimation:(BOOL)b_animation
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     BOOL b_nativeFullscreenMode = [[VLCMain sharedInstance] nativeFullscreenMode];
 
     if (!p_intf || (!b_nativeFullscreenMode && !p_wnd))
@@ -576,7 +576,7 @@ void WindowClose(vout_window_t *p_wnd)
 
 - (void)updateWindowLevelForHelperWindows:(NSInteger)i_level
 {
-    if (var_InheritBool(VLCIntf, "video-wallpaper"))
+    if (var_InheritBool(getIntf(), "video-wallpaper"))
         return;
 
     i_currentWindowLevel = i_level;
index 73378b2..7d75268 100644 (file)
 
 - (void)resetValues
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     NSString *tmpString;
     char *tmpChar;
     BOOL b_state;
 
 - (NSString *)generateProfileString
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     return [NSString stringWithFormat:@"%@;%@;%@;%lli;%f;%f;%f;%f;%f;%lli;%f;%@;%lli;%lli;%lli;%lli;%lli;%lli;%@;%lli;%lli;%lli;%lli;%lli;%@;%lli;%@;%lli;%lli;%lli;%lli;%lli;%lli;%f",
             B64EncAndFree(config_GetPsz(p_intf, "video-filter")),
             B64EncAndFree(config_GetPsz(p_intf, "sub-source")),
 
 - (IBAction)profileSelectorAction:(id)sender
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     [self saveCurrentProfile];
     i_old_profile_index = [_profilePopup indexOfSelectedItem];
     VLCCoreInteraction *vci_si = [VLCCoreInteraction sharedInstance];
index 826f3f2..8c50e37 100644 (file)
         if (key) {
             /* Escape should always get you out of fullscreen */
             if (key == (unichar) 0x1b) {
-                playlist_t * p_playlist = pl_Get(VLCIntf);
+                playlist_t * p_playlist = pl_Get(getIntf());
                  if (var_GetBool(p_playlist, "fullscreen"))
                      [[VLCCoreInteraction sharedInstance] toggleFullscreen];
             }
                 var_Set(p_vout->p_libvlc, "key-pressed", val);
             }
             else
-                msg_Dbg(VLCIntf, "could not send keyevent to VLC core");
+                msg_Dbg(getIntf(), "could not send keyevent to VLC core");
 
             return;
         }
 
 - (void)scrollWheel:(NSEvent *)theEvent
 {
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
     CGFloat f_deltaX = [theEvent deltaX];
     CGFloat f_deltaY = [theEvent deltaY];
 
index d317acb..3303f16 100644 (file)
           && constrainedRect.size.height != screenRect.size.height
           && fabs(screenRect.size.height - constrainedRect.size.height) <= 25.) {
 
-        msg_Dbg(VLCIntf, "Contrain window height %.1f to screen height %.1f",
+        msg_Dbg(getIntf(), "Contrain window height %.1f to screen height %.1f",
                 constrainedRect.size.height, screenRect.size.height);
         constrainedRect.size.height = screenRect.size.height;
     }
 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask
                   backing:(NSBackingStoreType)backingType defer:(BOOL)flag
 {
-    _darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
+    _darkInterface = config_GetInt(getIntf(), "macosx-interfacestyle");
 
     if (_darkInterface) {
         styleMask = NSBorderlessWindowMask | NSResizableWindowMask;
 
 - (void)awakeFromNib
 {
-    BOOL b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
+    BOOL b_nativeFullscreenMode = var_InheritBool(getIntf(), "macosx-nativefullscreenmode");
 
     if (b_nativeFullscreenMode) {
         [self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
 
 - (void)setWindowLevel:(NSInteger)i_state
 {
-    if (var_InheritBool(VLCIntf, "video-wallpaper") || [self level] < NSNormalWindowLevel)
+    if (var_InheritBool(getIntf(), "video-wallpaper") || [self level] < NSNormalWindowLevel)
         return;
 
     if (!self.fullscreen && !_inFullscreenTransition)
 {
     _nativeVideoSize = size;
 
-    if (var_InheritBool(VLCIntf, "macosx-video-autoresize") && !var_InheritBool(VLCIntf, "video-wallpaper"))
+    if (var_InheritBool(getIntf(), "macosx-video-autoresize") && !var_InheritBool(getIntf(), "video-wallpaper"))
         [self resizeWindow];
 }
 
 
     _inFullscreenTransition = YES;
 
-    var_SetBool(pl_Get(VLCIntf), "fullscreen", true);
+    var_SetBool(pl_Get(getIntf()), "fullscreen", true);
 
     frameBeforeLionFullscreen = [self frame];
 
     [self setFullscreen: NO];
 
     if ([self hasActiveVideo]) {
-        var_SetBool(pl_Get(VLCIntf), "fullscreen", false);
+        var_SetBool(pl_Get(getIntf()), "fullscreen", false);
 
         vout_thread_t *p_vout = getVoutForActiveWindow();
         if (p_vout) {
     NSScreen *screen;
     NSRect screen_rect;
     NSRect rect;
-    BOOL blackout_other_displays = var_InheritBool(VLCIntf, "macosx-black");
+    BOOL blackout_other_displays = var_InheritBool(getIntf(), "macosx-black");
 
-    screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger(VLCIntf, "macosx-vdev")];
+    screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger(getIntf(), "macosx-vdev")];
 
     if (!screen) {
-        msg_Dbg(VLCIntf, "chosen screen isn't present, using current screen for fullscreen mode");
+        msg_Dbg(getIntf(), "chosen screen isn't present, using current screen for fullscreen mode");
         screen = [self screen];
     }
     if (!screen) {
-        msg_Dbg(VLCIntf, "Using deepest screen");
+        msg_Dbg(getIntf(), "Using deepest screen");
         screen = [NSScreen deepestScreen];
     }
 
 {
     NSMutableDictionary *dict1, *dict2;
     NSRect frame;
-    BOOL blackout_other_displays = var_InheritBool(VLCIntf, "macosx-black");
+    BOOL blackout_other_displays = var_InheritBool(getIntf(), "macosx-black");
 
     if (self.controlsBar)
         [self.controlsBar setFullscreenState:NO];
     [[[VLCMain sharedInstance] voutController] updateWindowLevelForHelperWindows: i_originalLevel];
     [self setLevel:i_originalLevel];
 
-    [self setAlphaValue: config_GetFloat(VLCIntf, "macosx-opaqueness")];
+    [self setAlphaValue: config_GetFloat(getIntf(), "macosx-opaqueness")];
 }
 
 - (void)animationDidEnd:(NSAnimation*)animation
index 45ea959..39c3e1a 100644 (file)
     [[self window] setMenu:nil];
     [[self window] setBackgroundColor: [NSColor colorWithCalibratedWhite:.96 alpha:1.]];
 
-    if (config_GetInt(VLCIntf, "macosx-icon-change")) {
+    if (config_GetInt(getIntf(), "macosx-icon-change")) {
         /* After day 354 of the year, the usual VLC cone is replaced by another cone
          * wearing a Father Xmas hat.
          * Note: this icon doesn't represent an endorsement of The Coca-Cola Company.
index 296c5e6..0f374f8 100644 (file)
@@ -46,7 +46,7 @@
             if (o_url != nil)
                 [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: o_url];
 
-            input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+            input_thread_t * p_input = pl_CurrentInput(getIntf());
             BOOL b_returned = NO;
 
             if (p_input) {
@@ -83,7 +83,7 @@
     NSString *o_command = [[self commandDescription] commandName];
     NSString *o_parameter = [self directParameter];
 
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
     playlist_t * p_playlist = pl_Get(p_intf);
 
     if ([o_command isEqualToString:@"play"])
 }
 
 - (BOOL) playing {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return NO;
 
 }
 
 - (int) audioDesync {
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     int i_delay = -1;
 
     if(!p_input)
 }
 
 - (void) setAudioDesync:(int)i_audioDesync {
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     if(!p_input)
         return;
 
 }
 
 - (int) currentTime {
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     int64_t i_currentTime = -1;
 
     if (!p_input)
 - (void) setCurrentTime:(int)i_currentTime {
     if (i_currentTime) {
         int64_t i64_value = (int64_t)i_currentTime;
-        input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+        input_thread_t * p_input = pl_CurrentInput(getIntf());
 
         if (!p_input)
             return;
index 9caaf26..eaeeecd 100644 (file)
 - (IBAction)add:(id)sender
 {
     /* add item to list */
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (!p_input)
         return;
 - (IBAction)clear:(id)sender
 {
     /* clear table */
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (!p_input)
         return;
     /* put values to the sheet's fields and show sheet */
     /* we take the values from the core and not the table, because we cannot
      * really trust it */
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     seekpoint_t **pp_bookmarks;
     int i_bookmarks;
     int row;
     /* save field contents and close sheet */
      seekpoint_t **pp_bookmarks;
     int i_bookmarks, i;
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (!p_input) {
         NSBeginCriticalAlertSheet(_NS("No input"), _NS("OK"), @"", @"", self.window, nil, nil, nil, nil, @"%@",_NS("No input found. A stream must be playing or paused for bookmarks to work."));
     else if (componentCount == 3)
         pp_bookmarks[i]->i_time_offset = 1000000LL * ([[components firstObject] longLongValue] * 3600 + [[components objectAtIndex:1] longLongValue] * 60 + [[components objectAtIndex:2] longLongValue]);
     else {
-        msg_Err(VLCIntf, "Invalid string format for time");
+        msg_Err(getIntf(), "Invalid string format for time");
         goto clear;
     }
 
     if (input_Control(p_input, INPUT_CHANGE_BOOKMARK, pp_bookmarks[i], i) != VLC_SUCCESS) {
-        msg_Warn(VLCIntf, "Unable to change the bookmark");
+        msg_Warn(getIntf(), "Unable to change the bookmark");
         goto clear;
     }
 
@@ -270,7 +270,7 @@ clear:
         NSBeginAlertSheet(_NS("Invalid selection"), _NS("OK"), @"", @"", self.window, nil, nil, nil, nil, @"%@",_NS("Two bookmarks have to be selected."));
         return;
     }
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     if (!p_input) {
         NSBeginCriticalAlertSheet(_NS("No input found"), _NS("OK"), @"", @"", self.window, nil, nil, nil, nil, @"%@",_NS("The stream must be playing or paused for bookmarks to work."));
         return;
@@ -295,7 +295,7 @@ clear:
 
     if (input_Control(p_input, INPUT_GET_BOOKMARKS, &pp_bookmarks, &i_bookmarks) != VLC_SUCCESS) {
         vlc_object_release(p_input);
-        msg_Err(VLCIntf, "already defined bookmarks couldn't be retrieved");
+        msg_Err(getIntf(), "already defined bookmarks couldn't be retrieved");
         return;
     }
 
@@ -313,7 +313,7 @@ clear:
 
 - (IBAction)goToBookmark:(id)sender
 {
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (!p_input)
         return;
@@ -325,7 +325,7 @@ clear:
 
 - (IBAction)remove:(id)sender
 {
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
 
     if (!p_input)
         return;
@@ -347,7 +347,7 @@ clear:
 - (NSInteger)numberOfRowsInTableView:(NSTableView *)theDataTable
 {
     /* return the number of bookmarks */
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     seekpoint_t **pp_bookmarks;
     int i_bookmarks;
 
@@ -370,7 +370,7 @@ clear:
 - (id)tableView:(NSTableView *)theDataTable objectValueForTableColumn: (NSTableColumn *)theTableColumn row: (NSInteger)row
 {
     /* return the corresponding data as NSString */
-    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    input_thread_t * p_input = pl_CurrentInput(getIntf());
     seekpoint_t **pp_bookmarks;
     int i_bookmarks;
     id ret = @"";
index 1e3d562..ce1393b 100644 (file)
@@ -93,10 +93,10 @@ static int DialogCallback(vlc_object_t *p_this, const char *type, vlc_value_t pr
     self = [super init];
 
     if (self) {
-        msg_Dbg(VLCIntf, "Register dialog provider");
+        msg_Dbg(getIntf(), "Register dialog provider");
         [NSBundle loadNibNamed:@"CoreDialogs" owner: self];
 
-        intf_thread_t *p_intf = VLCIntf;
+        intf_thread_t *p_intf = getIntf();
         /* subscribe to various interactive dialogues */
         var_Create(p_intf, "dialog-error", VLC_VAR_ADDRESS);
         var_AddCallback(p_intf, "dialog-error", DialogCallback, (__bridge void *)self);
@@ -116,9 +116,9 @@ static int DialogCallback(vlc_object_t *p_this, const char *type, vlc_value_t pr
 
 - (void)dealloc
 {
-    msg_Dbg(VLCIntf, "Deinitializing dialog provider");
+    msg_Dbg(getIntf(), "Deinitializing dialog provider");
 
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     var_DelCallback(p_intf, "dialog-error", DialogCallback, (__bridge void *)self);
     var_DelCallback(p_intf, "dialog-critical", DialogCallback, (__bridge void *)self);
     var_DelCallback(p_intf, "dialog-login", DialogCallback, (__bridge void *)self);
@@ -153,7 +153,7 @@ static int DialogCallback(vlc_object_t *p_this, const char *type, vlc_value_t pr
     else if ([o_type isEqualToString: @"dialog-progress-bar"])
         [self performSelectorOnMainThread:@selector(showProgressDialogOnMainThread:) withObject: o_value waitUntilDone:YES];
     else
-        msg_Err(VLCIntf, "unhandled dialog type: '%s'", type);
+        msg_Err(getIntf(), "unhandled dialog type: '%s'", type);
 }
 
 -(void)showFatalDialog: (NSValue *)o_value
@@ -242,7 +242,7 @@ static int DialogCallback(vlc_object_t *p_this, const char *type, vlc_value_t pr
 
     [o_prog_description_txt setStringValue: toNSStr(p_dialog->message)];
 
-    if (VLCIntf)
+    if (getIntf())
         [self performSelector:@selector(showProgressDialog:) withObject: o_value afterDelay:3.00];
 }
 
index d0594e7..41754ff 100644 (file)
@@ -76,7 +76,7 @@
 
     /* let the window sit on top of everything else and start out completely transparent */
     [win setLevel:NSModalPanelWindowLevel];
-    i_device = config_GetInt(VLCIntf, "macosx-vdev");
+    i_device = config_GetInt(getIntf(), "macosx-vdev");
     hideAgainTimer = fadeTimer = nil;
     [self setFrameAutosaveName:@"fspanel"];
     [self setNonActive:nil];
 - (void)mouseExited:(NSEvent *)theEvent
 {
     /* give up our focus, so the vout may show us again without letting the user clicking it */
-    if (o_vout_window && var_GetBool(pl_Get(VLCIntf), "fullscreen"))
+    if (o_vout_window && var_GetBool(pl_Get(getIntf()), "fullscreen"))
         [o_vout_window makeKeyWindow];
 }
 
 {
     /* in case that the user don't want us to appear, make sure we hide the mouse */
 
-    if (!config_GetInt(VLCIntf, "macosx-fspanel")) {
-        float time = (float)var_CreateGetInteger(VLCIntf, "mouse-hide-timeout") / 1000.;
+    if (!config_GetInt(getIntf(), "macosx-fspanel")) {
+        float time = (float)var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000.;
         [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:time target:self selector:@selector(hideMouse) userInfo:nil repeats:NO]];
         return;
     }
 
     /* get us a valid timer */
     if (!b_alreadyCounting) {
-        i_timeToKeepVisibleInSec = var_CreateGetInteger(VLCIntf, "mouse-hide-timeout") / 500;
+        i_timeToKeepVisibleInSec = var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 500;
         if (hideAgainTimer) {
             [hideAgainTimer invalidate];
         }
 - (void)updatePositionAndTime
 {
     input_thread_t * p_input;
-    p_input = pl_CurrentInput(VLCIntf);
+    p_input = pl_CurrentInput(getIntf());
     if (p_input) {
         
         vlc_value_t pos;
 - (IBAction)fsTimeSliderUpdate:(id)sender
 {
     input_thread_t * p_input;
-    p_input = pl_CurrentInput(VLCIntf);
+    p_input = pl_CurrentInput(getIntf());
     if (p_input != NULL) {
         vlc_value_t pos;
 
index 2ad49ff..1dfd82c 100644 (file)
@@ -28,7 +28,7 @@
 
 static inline input_thread_t *getInput(void)
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return NULL;
     return pl_CurrentInput(p_intf);
@@ -64,7 +64,7 @@ static inline vout_thread_t *getVoutForActiveWindow(void)
 
 static inline audio_output_t *getAout(void)
 {
-    intf_thread_t *p_intf = VLCIntf;
+    intf_thread_t *p_intf = getIntf();
     if (!p_intf)
         return NULL;
     return playlist_GetAout(pl_Get(p_intf));
index 89c7c3f..b27ec91 100644 (file)
@@ -74,7 +74,7 @@ static const int kCurrentPreferencesVersion = 3;
         if (![[VLCCoreInteraction sharedInstance] fixPreferences])
             return;
         else
-            config_SaveConfigFile(VLCIntf); // we need to do manually, since we won't quit libvlc cleanly
+            config_SaveConfigFile(getIntf()); // we need to do manually, since we won't quit libvlc cleanly
     } else if (version == 2) {
         /* version 2 (used by VLC 2.0.x and early versions of 2.1) can lead to exceptions within 2.1 or later
          * so we reset the OS X specific prefs here - in practice, no user will notice */
index 4204588..79fab85 100644 (file)
@@ -47,9 +47,6 @@
  * Local prototypes.
  *****************************************************************************/
 
-// deprecated macro
-#define VLCIntf getIntf()
-
 intf_thread_t *getIntf();
 
 static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
index 92beba5..f3822a6 100644 (file)
@@ -127,7 +127,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
     @autoreleasepool {
         dispatch_async(dispatch_get_main_queue(), ^{
 
-            intf_thread_t * p_intf = VLCIntf;
+            intf_thread_t * p_intf = getIntf();
             if (p_intf) {
                 playlist_t * p_playlist = pl_Get(p_intf);
                 BOOL b_fullscreen = var_GetBool(p_playlist, "fullscreen");
@@ -262,14 +262,14 @@ static VLCMain *sharedInstance = nil;
 
 - (void)dealloc
 {
-    msg_Dbg(VLCIntf, "Deinitializing VLCMain object");
+    msg_Dbg(getIntf(), "Deinitializing VLCMain object");
 }
 
 - (void)applicationWillFinishLaunching:(NSNotification *)aNotification
 {
     _coreinteraction = [VLCCoreInteraction sharedInstance];
 
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
     PL_LOCK;
     items_at_launch = p_playlist->p_local_category->i_children;
     PL_UNLOCK;
@@ -312,7 +312,7 @@ static VLCMain *sharedInstance = nil;
 
     // respect playlist-autostart
     // note that PLAYLIST_PLAY will not stop any playback if already started
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    playlist_t * p_playlist = pl_Get(getIntf());
     PL_LOCK;
     BOOL kidsAround = p_playlist->p_local_category->i_children != 0;
     if (kidsAround && var_GetBool(p_playlist, "playlist-autostart"))
@@ -437,7 +437,7 @@ static VLCMain *sharedInstance = nil;
 
     // try to add file as subtitle
     if ([o_names count] == 1 && psz_uri) {
-        input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+        input_thread_t * p_input = pl_CurrentInput(getIntf());
         if (p_input) {
             int i_result = input_AddSubtitleOSD(p_input, [[o_names firstObject] UTF8String], true, true);
             vlc_object_release(p_input);
index 0eab81d..e272ec7 100644 (file)
@@ -56,7 +56,7 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
     AudioObjectPropertyAddress deviceAddress = { kAudioHardwarePropertyDefaultOutputDevice, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
     err = AudioObjectGetPropertyData( kAudioObjectSystemObject, &deviceAddress, 0, NULL, &i_size, &i_device );
     if (err != noErr) {
-        msg_Warn( VLCIntf, "couldn't get main audio output device" );
+        msg_Warn( getIntf(), "couldn't get main audio output device" );
         return .0;
     }
 
@@ -64,7 +64,7 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
     i_size = sizeof( f_volume );
     err = AudioObjectGetPropertyData(i_device, &propertyAddress, 0, NULL, &i_size, &f_volume);
     if (err != noErr) {
-        msg_Warn( VLCIntf, "couldn't get volume value" );
+        msg_Warn( getIntf(), "couldn't get volume value" );
         return .0;
     }
 
@@ -84,7 +84,7 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
     AudioObjectPropertyAddress deviceAddress = { kAudioHardwarePropertyDefaultOutputDevice, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
     err = AudioObjectGetPropertyData( kAudioObjectSystemObject, &deviceAddress, 0, NULL, &i_size, &i_device );
     if (err != noErr) {
-        msg_Warn( VLCIntf, "couldn't get main audio output device" );
+        msg_Warn( getIntf(), "couldn't get main audio output device" );
         return NO;
     }
 
@@ -92,7 +92,7 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
     i_size = sizeof( f_volume );
     err = AudioObjectIsPropertySettable( i_device, &propertyAddress, &b_writeable );
     if (err != noErr || !b_writeable ) {
-        msg_Warn( VLCIntf, "we can't set the main audio devices' volume" );
+        msg_Warn( getIntf(), "we can't set the main audio devices' volume" );
         return NO;
     }
     err = AudioObjectSetPropertyData(i_device, &propertyAddress, 0, NULL, i_size, &f_volume);
@@ -540,7 +540,7 @@ void _drawFrameInRect(NSRect frameRect)
 
 - (void)awakeFromNib
 {
-    if (config_GetInt( VLCIntf, "macosx-interfacestyle" )) {
+    if (config_GetInt( getIntf(), "macosx-interfacestyle" )) {
         o_knob_img = imageFromRes(@"progression-knob_dark");
         b_dark = YES;
     } else {
@@ -691,7 +691,7 @@ void _drawFrameInRect(NSRect frameRect)
 
 - (void)awakeFromNib
 {
-    BOOL b_dark = config_GetInt( VLCIntf, "macosx-interfacestyle" );
+    BOOL b_dark = config_GetInt( getIntf(), "macosx-interfacestyle" );
     if (b_dark)
         img = imageFromRes(@"volume-slider-knob_dark");
     else
index 73b88ac..bd276b2 100644 (file)
@@ -175,8 +175,8 @@ struct display_info_t
     [[_netModeMatrix cellAtRow:0 column:0] setTitle: _NS("Unicast")];
     [[_netModeMatrix cellAtRow:1 column:0] setTitle: _NS("Multicast")];
 
-    [_netUDPPortTextField setIntValue: config_GetInt(VLCIntf, "server-port")];
-    [_netUDPPortStepper setIntValue: config_GetInt(VLCIntf, "server-port")];
+    [_netUDPPortTextField setIntValue: config_GetInt(getIntf(), "server-port")];
+    [_netUDPPortStepper setIntValue: config_GetInt(getIntf(), "server-port")];
 
     [_eyeTVChannelProgressBar setUsesThreadedAnimation: YES];
 
@@ -210,7 +210,7 @@ struct display_info_t
 
     [self updateQTKVideoDevices];
     [_qtkVideoDevicePopup removeAllItems];
-    msg_Dbg(VLCIntf, "Found %lu video capture devices", _qtkvideoDevices.count);
+    msg_Dbg(getIntf(), "Found %lu video capture devices", _qtkvideoDevices.count);
 
     if (_qtkvideoDevices.count >= 1) {
         if (!_qtkCurrentDeviceUID)
@@ -235,7 +235,7 @@ struct display_info_t
     [_screenqtkAudioPopup removeAllItems];
 
     [self updateQTKAudioDevices];
-    msg_Dbg(VLCIntf, "Found %lu audio capture devices", _qtkaudioDevices.count);
+    msg_Dbg(getIntf(), "Found %lu audio capture devices", _qtkaudioDevices.count);
 
     if (_qtkaudioDevices.count >= 1) {
         if (!_qtkCurrentAudioDeviceUID)
@@ -332,7 +332,7 @@ struct display_info_t
 {
     int i_index;
     module_config_t * p_item;
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
 
     [_fileSubCheckbox setTitle: _NS("Add Subtitle File:")];
     [_fileSubPathLabel setStringValue: _NS("Choose a file")];
@@ -429,7 +429,7 @@ struct display_info_t
             [options addObject: [NSString stringWithFormat:
                                  @"subsdec-align=%li", [_fileSubAlignPopup indexOfSelectedItem]]];
 
-            p_item = config_FindConfig(VLC_OBJECT(VLCIntf),
+            p_item = config_FindConfig(VLC_OBJECT(getIntf()),
                                        "freetype-rel-fontsize");
 
             if (p_item) {
@@ -842,8 +842,8 @@ struct display_info_t
         [self showOpticalMediaView: _discBDView withIcon: image];
         [self setMRL: [NSString stringWithFormat: @"bluray://%@", opticalDevicePath]];
     } else {
-        if (VLCIntf)
-            msg_Warn(VLCIntf, "unknown disk type, no idea what to display");
+        if (getIntf())
+            msg_Warn(getIntf(), "unknown disk type, no idea what to display");
 
         [self showOpticalMediaView: _discNoDiscView withIcon: [NSImage imageNamed:@"NSApplicationIcon"]];
     }
@@ -938,7 +938,7 @@ struct display_info_t
 
         [self discSelectorChanged:nil];
     } else {
-        msg_Dbg(VLCIntf, "no optical media found");
+        msg_Dbg(getIntf(), "no optical media found");
         [_discSelectorPopup setHidden: YES];
         [self showOpticalMediaView: _discNoDiscView withIcon: [NSImage imageNamed: @"NSApplicationIcon"]];
     }
@@ -1038,7 +1038,7 @@ struct display_info_t
         else if ([[sender selectedCell] tag] == 1)
             [self.window makeFirstResponder: _netUDPMAddressTextField];
         else
-            msg_Warn(VLCIntf, "Unknown sender tried to change UDP/RTP mode");
+            msg_Warn(getIntf(), "Unknown sender tried to change UDP/RTP mode");
     }
 
     [self openNetInfoChanged: nil];
@@ -1080,7 +1080,7 @@ struct display_info_t
             else
                 mrlString = @"rtp://";
 
-            if (port != config_GetInt(VLCIntf, "server-port")) {
+            if (port != config_GetInt(getIntf(), "server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @"@:%i", port];
             }
@@ -1094,7 +1094,7 @@ struct display_info_t
             else
                 mrlString = [NSString stringWithFormat: @"rtp://@%@", oAddress];
 
-            if (iPort != config_GetInt(VLCIntf, "server-port")) {
+            if (iPort != config_GetInt(getIntf(), "server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @":%i", iPort];
             }
@@ -1129,7 +1129,7 @@ struct display_info_t
             else
                 mrlString = @"rtp://";
 
-            if (port != config_GetInt(VLCIntf, "server-port")) {
+            if (port != config_GetInt(getIntf(), "server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @"@:%i", port];
             }
@@ -1143,7 +1143,7 @@ struct display_info_t
             else
                 mrlString = [NSString stringWithFormat: @"rtp://@%@", oAddress];
 
-            if (iPort != config_GetInt(VLCIntf, "server-port")) {
+            if (iPort != config_GetInt(getIntf(), "server-port")) {
                 mrlString =
                 [mrlString stringByAppendingFormat: @":%i", iPort];
             }
@@ -1173,7 +1173,7 @@ struct display_info_t
 
 - (IBAction)openCaptureModeChanged:(id)sender
 {
-    intf_thread_t * p_intf = VLCIntf;
+    intf_thread_t * p_intf = getIntf();
 
     if ([[[_captureModePopup selectedItem] title] isEqualToString: @"EyeTV"]) {
         if ([_eyeTVController eyeTVRunning] == YES) {
@@ -1276,7 +1276,7 @@ struct display_info_t
         [_eyeTVController setChannel:chanNum];
         [self setMRL: [NSString stringWithFormat:@"eyetv:// :eyetv-channel=%d", chanNum]];
     } else
-        msg_Err(VLCIntf, "eyetvSwitchChannel sent by unknown object");
+        msg_Err(getIntf(), "eyetvSwitchChannel sent by unknown object");
 }
 
 - (IBAction)eyetvLaunch:(id)sender
@@ -1292,21 +1292,21 @@ struct display_info_t
 - (void)eyetvChanged:(NSNotification *)notification
 {
     if ([[notification name] isEqualToString: @"DeviceAdded"]) {
-        msg_Dbg(VLCIntf, "eyetv device was added");
+        msg_Dbg(getIntf(), "eyetv device was added");
         [self showCaptureView: _eyeTVrunningView];
         [self setupChannelInfo];
     } else if ([[notification name] isEqualToString: @"DeviceRemoved"]) {
         /* leave the channel selection like that,
          * switch to our "no device" tab */
-        msg_Dbg(VLCIntf, "eyetv device was removed");
+        msg_Dbg(getIntf(), "eyetv device was removed");
         [self setEyeTVUnconnected];
     } else if ([[notification name] isEqualToString: @"PluginQuit"]) {
         /* switch to the "launch eyetv" tab */
-        msg_Dbg(VLCIntf, "eyetv was terminated");
+        msg_Dbg(getIntf(), "eyetv was terminated");
         [self showCaptureView: _eyeTVnotLaunchedView];
     } else if ([[notification name] isEqualToString: @"PluginInit"]) {
         /* we got no device yet */
-        msg_Dbg(VLCIntf, "eyetv was launched, no device yet");
+        msg_Dbg(getIntf(), "eyetv was launched, no device yet");
         [self setEyeTVUnconnected];
     }
 }
index 906ae12..31e6dbb 100644 (file)
 
 - (void)TTLChanged:(NSNotification *)notification
 {
-    config_PutInt(VLCIntf, "ttl", [self.streamTTLTextField intValue]);
+    config_PutInt(getIntf(), "ttl", [self.streamTTLTextField intValue]);
 }
 
 - (IBAction)outputFileBrowse:(id)sender
index 7d6b976..56c695b 100644 (file)
     /* TODO: call savePrefs on Root item */
     [_rootTreeItem applyChanges];
     [[VLCCoreInteraction sharedInstance] fixPreferences];
-    config_SaveConfigFile(VLCIntf);
+    config_SaveConfigFile(getIntf());
     [self.window orderOut:self];
 }
 
index 8ed1667..8a3e9a9 100644 (file)
@@ -872,20 +872,20 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
         case CONFIG_ITEM_MODULE_LIST:
         case CONFIG_ITEM_MODULE_LIST_CAT: {
             char *psz_val = [self stringValue];
-            config_PutPsz(VLCIntf, psz_name, psz_val);
+            config_PutPsz(getIntf(), psz_name, psz_val);
             free(psz_val);
             break;
         }
         case CONFIG_ITEM_KEY:
             /* So you don't need to restart to have the changes take effect */
             val.i_int = [self intValue];
-            var_Set(VLCIntf->p_libvlc, psz_name, val);
+            var_Set(getIntf()->p_libvlc, psz_name, val);
         case CONFIG_ITEM_INTEGER:
         case CONFIG_ITEM_BOOL:
-            config_PutInt(VLCIntf, psz_name, [self intValue]);
+            config_PutInt(getIntf(), psz_name, [self intValue]);
             break;
         case CONFIG_ITEM_FLOAT:
-            config_PutFloat(VLCIntf, psz_name, [self floatValue]);
+            config_PutFloat(getIntf(), psz_name, [self floatValue]);
             break;
     }
 }
@@ -983,7 +983,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 - (void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz(VLCIntf, self.p_item->psz_name);
+    char *psz_value = config_GetPsz(getIntf(), self.p_item->psz_name);
     if (psz_value)
         o_textfieldString = _NS(psz_value);
     else
@@ -1067,10 +1067,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     [o_popup removeAllItems];
 
-    char *psz_value = config_GetPsz(VLCIntf, self.p_item->psz_name);
+    char *psz_value = config_GetPsz(getIntf(), self.p_item->psz_name);
 
     char **values, **texts;
-    ssize_t count = config_GetPszChoices(VLC_OBJECT(VLCIntf), self.p_item->psz_name,
+    ssize_t count = config_GetPszChoices(VLC_OBJECT(getIntf()), self.p_item->psz_name,
                                          &values, &texts);
     for (ssize_t i = 0; i < count && texts; i++) {
         if (texts[i] == NULL || values[i] == NULL)
@@ -1185,7 +1185,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 -(void)resetValues
 {
     NSString *o_textfieldString;
-    char *psz_value = config_GetPsz(VLCIntf, self.p_item->psz_name);
+    char *psz_value = config_GetPsz(getIntf(), self.p_item->psz_name);
     if (psz_value)
         o_textfieldString = [NSString stringWithFormat: @"%s", psz_value];
     else
@@ -1416,7 +1416,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 -(void)resetValues
 {
-    [o_textfield setIntValue: config_GetInt(VLCIntf, self.p_item->psz_name)];
+    [o_textfield setIntValue: config_GetInt(getIntf(), self.p_item->psz_name)];
     [super resetValues];
 }
 
@@ -1495,10 +1495,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 {
     [o_popup removeAllItems];
 
-    int i_current_selection = config_GetInt(VLCIntf, self.p_item->psz_name);
+    int i_current_selection = config_GetInt(getIntf(), self.p_item->psz_name);
     int64_t *values;
     char **texts;
-    ssize_t count = config_GetIntChoices(VLC_OBJECT(VLCIntf), self.p_item->psz_name, &values, &texts);
+    ssize_t count = config_GetIntChoices(VLC_OBJECT(getIntf()), self.p_item->psz_name, &values, &texts);
     for (ssize_t i = 0; i < count; i++) {
         NSMenuItem *mi = [[NSMenuItem alloc] initWithTitle: toNSStr(texts[i]) action: NULL keyEquivalent: @""];
         [mi setRepresentedObject:[NSNumber numberWithInt:values[i]]];
@@ -1621,7 +1621,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    int value = config_GetInt(VLCIntf, self.p_item->psz_name);
+    int value = config_GetInt(getIntf(), self.p_item->psz_name);
     [o_textfield setIntValue:value];
     [o_slider setIntValue:value];
     [super resetValues];
@@ -1715,7 +1715,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_textfield setFloatValue: config_GetFloat(VLCIntf, self.p_item->psz_name)];
+    [o_textfield setFloatValue: config_GetFloat(getIntf(), self.p_item->psz_name)];
     [super resetValues];
 }
 @end
@@ -1828,8 +1828,8 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_textfield setFloatValue: config_GetFloat(VLCIntf, self.p_item->psz_name)];
-    [o_slider setFloatValue: config_GetFloat(VLCIntf, self.p_item->psz_name)];
+    [o_textfield setFloatValue: config_GetFloat(getIntf(), self.p_item->psz_name)];
+    [o_slider setFloatValue: config_GetFloat(getIntf(), self.p_item->psz_name)];
     [super resetValues];
 }
 @end
@@ -1880,7 +1880,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_checkbox setState: config_GetInt(VLCIntf, self.p_item->psz_name)];
+    [o_checkbox setState: config_GetInt(getIntf(), self.p_item->psz_name)];
     [super resetValues];
 }
 @end
@@ -1962,7 +1962,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (void)resetValues
 {
-    [o_popup selectItem:[[o_popup menu] itemWithTag:config_GetInt(VLCIntf, self.p_item->psz_name)]];
+    [o_popup selectItem:[[o_popup menu] itemWithTag:config_GetInt(getIntf(), self.p_item->psz_name)]];
     [super resetValues];
 }
 @end
@@ -2178,7 +2178,7 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
 -(void)resetValues
 {
 #warning Reset prefs of the module selector is broken atm.
-    msg_Err(VLCIntf, "don't forget about modulelistconfig");
+    msg_Err(getIntf(), "don't forget about modulelistconfig");
     [super resetValues];
 }
 
index aa50a85..97bf779 100644 (file)
@@ -209,7 +209,7 @@ static NSString* VLCHotkeysSettingToolbarIdentifier = @"Hotkeys Settings Item Id
 {
     self = [super initWithWindowNibName:@"SimplePreferences"];
     if (self) {
-        p_intf = VLCIntf;
+        p_intf = getIntf();
     }
 
     return self;
@@ -471,7 +471,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
     assert(p_item);
 
     char **values, **texts;
-    ssize_t count = config_GetPszChoices(VLC_OBJECT(VLCIntf), name,
+    ssize_t count = config_GetPszChoices(VLC_OBJECT(getIntf()), name,
                                          &values, &texts);
     if (count < 0) {
         msg_Err(p_intf, "Cannot get choices for %s", name);
@@ -522,7 +522,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
 
     int64_t *values;
     char **texts;
-    ssize_t count = config_GetIntChoices(VLC_OBJECT(VLCIntf), name, &values, &texts);
+    ssize_t count = config_GetIntChoices(VLC_OBJECT(getIntf()), name, &values, &texts);
     for (ssize_t i = 0; i < count; i++) {
         NSMenuItem *mi = [[NSMenuItem alloc] initWithTitle: toNSStr(texts[i]) action: NULL keyEquivalent: @""];
         [mi setRepresentedObject:[NSNumber numberWithInt:values[i]]];