Commit fabe8243 authored by David Fuhrmann's avatar David Fuhrmann

macosx: Replace VLCIntf by getIntf()

The old VLCIntf macro is deprecated, getIntf() should be used
instead.
parent 2771bbc4
......@@ -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;
......
......@@ -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;
......
......@@ -155,7 +155,7 @@
- (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) {
......@@ -210,7 +210,7 @@
- (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));
......@@ -257,7 +257,7 @@
- (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
......
......@@ -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];
......@@ -120,7 +120,7 @@
[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];
......@@ -166,7 +166,7 @@
[o_fullscreen_btn removeFromSuperviewWithoutNeedingDisplay];
}
if (config_GetInt(VLCIntf, "macosx-show-playback-buttons"))
if (config_GetInt(getIntf(), "macosx-show-playback-buttons"))
[self toggleForwardBackwardMode: YES];
}
......@@ -300,7 +300,7 @@
default:
return;
}
p_input = pl_CurrentInput(VLCIntf);
p_input = pl_CurrentInput(getIntf());
if (p_input != NULL) {
vlc_value_t pos;
NSString * o_time;
......@@ -326,7 +326,7 @@
- (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;
......@@ -393,7 +393,7 @@
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;
......
......@@ -274,7 +274,7 @@
}
}
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)
......@@ -296,7 +296,7 @@
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);
......@@ -621,7 +621,7 @@
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;
......@@ -694,7 +694,7 @@
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;
}
......@@ -801,7 +801,7 @@
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
......
......@@ -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;