[vlc-devel] [vlc-commits] macosx: remove legacy helpers to hold vout and aout

David Fuhrmann david.fuhrmann at gmail.com
Mon Mar 11 21:50:50 CET 2019



> Am 11.03.2019 um 11:14 schrieb Felix Paul Kühne <git at videolan.org>:
> 
> vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Mon Mar 11 10:44:35 2019 +0100| [35af5e166e1338dc1194b4f220c3e177fcbcadff] | committer: Felix Paul Kühne
> 
> macosx: remove legacy helpers to hold vout and aout
> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35af5e166e1338dc1194b4f220c3e177fcbcadff
> ---
> 
> .../package/macosx/VLC.xcodeproj/project.pbxproj   |  2 -
> .../macosx/coreinteraction/VLCCoreInteraction.m    | 45 ++++------
> .../macosx/coreinteraction/VLCVideoFilterHelper.m  |  7 +-
> modules/gui/macosx/extensions/helpers.h            | 98 ----------------------
> modules/gui/macosx/menus/VLCMainMenu.m             | 16 ++--
> .../panels/VLCAudioEffectsWindowController.m       | 32 +++----
> .../VLCTrackSynchronizationWindowController.m      |  7 +-
> .../panels/VLCVideoEffectsWindowController.m       |  8 +-
> .../macosx/windows/video/VLCVideoWindowCommon.m    |  7 +-
> po/POTFILES.in                                     |  1 -
> 10 files changed, 56 insertions(+), 167 deletions(-)
> 
> diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
> index 86ea6d57f5..5622664cfd 100644
> --- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
> +++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
> @@ -479,7 +479,6 @@
> 		7D713D332201BB130042BEB7 /* VLCLibraryWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCLibraryWindow.xib; sourceTree = "<group>"; };
> 		7D871D371B5E6844000B56C0 /* VLCMain+OldPrefs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VLCMain+OldPrefs.h"; sourceTree = "<group>"; };
> 		7D871D381B5E6844000B56C0 /* VLCMain+OldPrefs.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "VLCMain+OldPrefs.m"; sourceTree = "<group>"; };
> -		7D871D391B5E684D000B56C0 /* helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = helpers.h; sourceTree = "<group>"; };
> 		7D8BB0B318302AC000FAE9B7 /* VLCLogWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLogWindowController.h; sourceTree = "<group>"; };
> 		7D8BB0B418302AC000FAE9B7 /* VLCLogWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLogWindowController.m; sourceTree = "<group>"; };
> 		7DB40D2820CBCEB500F63173 /* VLCMainMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainMenu.h; sourceTree = "<group>"; };
> @@ -903,7 +902,6 @@
> 		1C1ED5112204B08E00811EC0 /* extensions */ = {
> 			isa = PBXGroup;
> 			children = (
> -				7D871D391B5E684D000B56C0 /* helpers.h */,
> 				8ED6C27F03E2EB1C0059A3A7 /* misc.h */,
> 				8ED6C28003E2EB1C0059A3A7 /* misc.m */,
> 				6B4D50A51E7AB52C004479B5 /* NSScreen+VLCAdditions.h */,
> diff --git a/modules/gui/macosx/coreinteraction/VLCCoreInteraction.m b/modules/gui/macosx/coreinteraction/VLCCoreInteraction.m
> index 57ba42b16c..85fb334939 100644
> --- a/modules/gui/macosx/coreinteraction/VLCCoreInteraction.m
> +++ b/modules/gui/macosx/coreinteraction/VLCCoreInteraction.m
> @@ -37,8 +37,6 @@
> #import "playlist/VLCPlaylistModel.h"
> #import "windows/VLCOpenWindowController.h"
> 
> -#import "extensions/helpers.h"
> -
> static int BossCallback(vlc_object_t *p_this, const char *psz_var,
>                         vlc_value_t oldval, vlc_value_t new_val, void *param)
> {
> @@ -383,7 +381,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
>     }
>     config_PutInt("random", on);
> 
> -    vout_thread_t *p_vout = getVout();
> +    vout_thread_t *p_vout = [[_playlistController playerController] mainVideoOutputThread];
>     if (!p_vout) {
>         return;
>     }
> @@ -400,7 +398,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
> {
>     _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_ALL;
> 
> -    vout_thread_t *p_vout = getVout();
> +    vout_thread_t *p_vout = [[_playlistController playerController] mainVideoOutputThread];
>     if (p_vout) {
>         vout_OSDMessage(p_vout, VOUT_SPU_CHANNEL_OSD, "%s", _("Repeat All"));
>         vout_Release(p_vout);
> @@ -411,7 +409,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
> {
>     _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT;
> 
> -    vout_thread_t *p_vout = getVout();
> +    vout_thread_t *p_vout = [[_playlistController playerController] mainVideoOutputThread];
>     if (p_vout) {
>         vout_OSDMessage(p_vout, VOUT_SPU_CHANNEL_OSD, "%s", _("Repeat One"));
>         vout_Release(p_vout);
> @@ -422,7 +420,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
> {
>     _playlistController.playbackRepeat = VLC_PLAYLIST_PLAYBACK_REPEAT_NONE;
> 
> -    vout_thread_t *p_vout = getVout();
> +    vout_thread_t *p_vout = [[_playlistController playerController] mainVideoOutputThread];
>     if (p_vout) {
>         vout_OSDMessage(p_vout, VOUT_SPU_CHANNEL_OSD, "%s", _("Repeat Off"));
>         vout_Release(p_vout);
> @@ -576,14 +574,10 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
> 
> - (void)showPosition
> {
> -    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(vlc_object_instance(getIntf()), "key-action", ACTIONID_POSITION);
> -            vout_Release(p_vout);
> -        }
> -        input_Release(p_input);
> +    vout_thread_t *p_vout = [[_playlistController playerController] mainVideoOutputThread];
> +    if (p_vout != NULL) {
> +        var_SetInteger(vlc_object_instance(getIntf()), "key-action", ACTIONID_POSITION);
> +        vout_Release(p_vout);
>     }
> }
> 
> @@ -605,7 +599,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
>     if (!p_intf)
>         return;
> 
> -    vout_thread_t *p_vout = getVoutForActiveWindow();
> +    vout_thread_t *p_vout = [[[[VLCMain sharedInstance] playlistController] playerController] videoOutputThreadForKeyWindow];
>     if (p_vout) {
>         BOOL b_fs = var_ToggleBool(p_vout, "fullscreen");
>         var_SetBool(pl_Get(p_intf), "fullscreen", b_fs);
> @@ -684,21 +678,16 @@ 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(getIntf());
> -            if (p_input != NULL) {
> -                vout_thread_t *p_vout = input_GetVout(p_input);
> -
> -                if (p_vout != NULL) {
> -                    /* Escape */
> -                    if (key == (unichar) 0x1b) {
> -                        if (var_GetBool(p_vout, "fullscreen")) {
> -                            [self toggleFullscreen];
> -                            eventHandled = YES;
> -                        }
> +            vout_thread_t *p_vout = [[_playlistController playerController] mainVideoOutputThread];
> +            if (p_vout != NULL) {
> +                /* Escape */
> +                if (key == (unichar) 0x1b) {
> +                    if (var_GetBool(p_vout, "fullscreen")) {
> +                        [self toggleFullscreen];
> +                        eventHandled = YES;
>                     }
> -                    vout_Release(p_vout);
>                 }
> -                input_Release(p_input);
> +                vout_Release(p_vout);
>             }
>         }
>     }
> diff --git a/modules/gui/macosx/coreinteraction/VLCVideoFilterHelper.m b/modules/gui/macosx/coreinteraction/VLCVideoFilterHelper.m
> index 3ddbf4a08a..b3dd9b801b 100644
> --- a/modules/gui/macosx/coreinteraction/VLCVideoFilterHelper.m
> +++ b/modules/gui/macosx/coreinteraction/VLCVideoFilterHelper.m
> @@ -27,7 +27,8 @@
> #import <vlc_playlist_legacy.h>
> 
> #import "main/VLCMain.h"
> -#import "extensions/helpers.h"
> +#import "playlist/VLCPlaylistController.h"
> +#import "playlist/VLCPlayerController.h"
> 
> @implementation VLCVideoFilterHelper
> 
> @@ -103,7 +104,7 @@
> 
>     /* Try to set non splitter filters on the fly */
>     if (strcmp(psz_filter_type, "video-splitter")) {
> -        NSArray<NSValue *> *vouts = getVouts();
> +        NSArray<NSValue *> *vouts = [[[[VLCMain sharedInstance] playlistController] playerController] allVideoOutputThreads];
>         if (vouts)
>             for (NSValue * val in vouts) {
>                 vout_thread_t *p_vout = [val pointerValue];
> @@ -119,7 +120,7 @@
>                      forFilter: (char const *)psz_filter
>                      withValue: (vlc_value_t)value
> {
> -    NSArray<NSValue *> *vouts = getVouts();
> +    NSArray<NSValue *> *vouts = [[[[VLCMain sharedInstance] playlistController] playerController] allVideoOutputThreads];
>     intf_thread_t *p_intf = getIntf();
>     if (!p_intf)
>         return;
> diff --git a/modules/gui/macosx/extensions/helpers.h b/modules/gui/macosx/extensions/helpers.h
> deleted file mode 100644
> index b28e54161e..0000000000
> --- a/modules/gui/macosx/extensions/helpers.h
> +++ /dev/null
> @@ -1,98 +0,0 @@
> -/*****************************************************************************
> - * helpers.h
> - *****************************************************************************
> - * Copyright (C) 2009-2015 VLC authors and VideoLAN
> - *
> - * Authors: Pierre d'Herbemont <pdherbemont # videolan org>
> - *          Felix Paul Kühne <fkuehne at videolan dot org>
> - *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
> - *****************************************************************************/
> -
> -#import "windows/video/VLCVoutView.h"
> -
> -static inline input_thread_t *getInput(void)
> -{
> -    intf_thread_t *p_intf = getIntf();
> -    if (!p_intf)
> -        return NULL;
> -    return pl_CurrentInput(p_intf);
> -}
> -
> -static inline vout_thread_t *getVout(void)
> -{
> -    input_thread_t *p_input = getInput();
> -    if (!p_input)
> -        return NULL;
> -    vout_thread_t *p_vout = input_GetVout(p_input);
> -    input_Release(p_input);
> -    return p_vout;
> -}
> -
> -/**
> - * Returns an array containing all the vouts.
> - *
> - * \return all vouts or nil if none is found
> - */
> -static inline NSArray<NSValue *> *getVouts(void)
> -{
> -    input_thread_t *p_input = getInput();
> -    vout_thread_t **pp_vouts;
> -    size_t i_num_vouts;
> -
> -    if (!p_input
> -        || input_Control(p_input, INPUT_GET_VOUTS, &pp_vouts, &i_num_vouts)
> -        || !i_num_vouts)
> -        return nil;
> -
> -    NSMutableArray<NSValue *> *vouts =
> -        [NSMutableArray arrayWithCapacity:i_num_vouts];
> -
> -    for (size_t i = 0; i < i_num_vouts; ++i)
> -    {
> -        assert(pp_vouts[i]);
> -        [vouts addObject:[NSValue valueWithPointer:pp_vouts[i]]];
> -    }
> -
> -    free(pp_vouts);
> -    return vouts;
> -}
> -
> -static inline vout_thread_t *getVoutForActiveWindow(void)
> -{
> -    vout_thread_t *p_vout = nil;
> -
> -    id currentWindow = [NSApp keyWindow];
> -    if ([currentWindow respondsToSelector:@selector(videoView)]) {
> -        VLCVoutView *videoView = [currentWindow videoView];
> -        if (videoView) {
> -            p_vout = [videoView voutThread];
> -        }
> -    }
> -
> -    if (!p_vout)
> -        p_vout = getVout();
> -
> -    return p_vout;
> -}
> -
> -static inline audio_output_t *getAout(void)
> -{
> -    intf_thread_t *p_intf = getIntf();
> -    if (!p_intf)
> -        return NULL;
> -    return playlist_GetAout(pl_Get(p_intf));
> -}
> diff --git a/modules/gui/macosx/menus/VLCMainMenu.m b/modules/gui/macosx/menus/VLCMainMenu.m
> index f69d92ea81..f96363a09d 100644
> --- a/modules/gui/macosx/menus/VLCMainMenu.m
> +++ b/modules/gui/macosx/menus/VLCMainMenu.m
> @@ -58,8 +58,6 @@
> #import "windows/logging/VLCLogWindowController.h"
> #import "windows/addons/VLCAddonsWindowController.h"
> 
> -#import "extensions/helpers.h"
> -
> #ifdef HAVE_SPARKLE
> #import <Sparkle/Sparkle.h>
> #endif
> @@ -586,7 +584,7 @@
>         [self setupVarMenuItem:_subtitle_track target: (vlc_object_t *)p_input
>                                  var:"spu-es" selector: @selector(toggleVar:)];
> 
> -        audio_output_t *p_aout = playlist_GetAout(p_playlist);
> +        audio_output_t *p_aout = _playlistController.playerController.mainAudioOutput;
>         if (p_aout != NULL) {
>             [self setupVarMenuItem:_channels target: (vlc_object_t *)p_aout
>                                      var:"stereo-mode" selector: @selector(toggleVar:)];
> @@ -596,7 +594,7 @@
>             aout_Release(p_aout);
>         }
> 
> -        vout_thread_t *p_vout = getVoutForActiveWindow();
> +        vout_thread_t *p_vout = [[[[VLCMain sharedInstance] playlistController] playerController] videoOutputThreadForKeyWindow];

Hi,

This is now far longer. Why removing the helpers?

> 
>         if (p_vout != NULL) {
>             [self setupVarMenuItem:_aspect_ratio target: (vlc_object_t *)p_vout
> @@ -887,7 +885,7 @@
> 
>     [_audioDeviceMenu removeAllItems];
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = _playlistController.playerController.mainAudioOutput;
>     if (!p_aout)
>         return;
> 
> @@ -924,7 +922,7 @@
> 
> - (void)toggleAudioDevice:(id)sender
> {
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = _playlistController.playerController.mainAudioOutput;
>     if (!p_aout)
>         return;
> 
> @@ -951,7 +949,7 @@
> 
> - (IBAction)resizeVideoWindow:(id)sender
> {
> -    vout_thread_t *p_vout = getVoutForActiveWindow();
> +    vout_thread_t *p_vout = [[[[VLCMain sharedInstance] playlistController] playerController] videoOutputThreadForKeyWindow];

You already have _playlistController in this file, you should uniformly use it.

>     if (p_vout) {
>         if (sender == _half_window)
>             var_SetFloat(p_vout, "zoom", 0.5);
> @@ -972,7 +970,7 @@
>     // FIXME re-write using VLCPlayerController
>     input_thread_t *p_input = pl_CurrentInput(getIntf());
>     if (p_input) {
> -        vout_thread_t *p_vout = getVoutForActiveWindow();
> +        vout_thread_t *p_vout = [[[[VLCMain sharedInstance] playlistController] playerController] videoOutputThreadForKeyWindow];
>         if (p_vout) {
>             BOOL b_fs = var_ToggleBool(p_vout, "video-on-top");
>             var_SetBool(pl_Get(getIntf()), "video-on-top", b_fs);
> @@ -1665,7 +1663,7 @@
>                mi == _floatontop
>                ) {
> 
> -        vout_thread_t *p_vout = getVoutForActiveWindow();
> +        vout_thread_t *p_vout = [[[[VLCMain sharedInstance] playlistController] playerController] videoOutputThreadForKeyWindow];
>         if (p_vout != NULL) {
>             // FIXME: re-write using VLCPlayerController
>             if (mi == _floatontop)
> diff --git a/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m b/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m
> index 3190320a4a..87ee801b92 100644
> --- a/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m
> +++ b/modules/gui/macosx/panels/VLCAudioEffectsWindowController.m
> @@ -1,7 +1,7 @@
> /*****************************************************************************
>  * VLCAudioEffectsWindowController.m: MacOS X interface module
>  *****************************************************************************
> - * Copyright (C) 2004-2017 VLC authors and VideoLAN
> + * Copyright (C) 2004-2019 VLC authors and VideoLAN
>  *
>  * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
>  *          Jérôme Decoodt <djc at videolan.org>
> @@ -38,8 +38,8 @@
> #import "main/CompatibilityFixes.h"
> #import "panels/dialogs/VLCPopupPanelController.h"
> #import "panels/dialogs/VLCTextfieldPanelController.h"
> -
> -#import "extensions/helpers.h"
> +#import "playlist/VLCPlaylistController.h"
> +#import "playlist/VLCPlayerController.h"
> 
> 
> #pragma mark -
> @@ -153,7 +153,7 @@
> 
>     /* eq preset */
>     char const *psz_eq_preset = [B64DecNSStr([items firstObject]) UTF8String];
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];

Again, this is awfully long. Why did you remove the helpers, and not just switched them to use the new object?

>     if (p_aout)
>         var_SetString(p_aout, "equalizer-preset", psz_eq_preset);
>     var_SetString(p_playlist, "equalizer-preset", psz_eq_preset);
> @@ -612,7 +612,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
>                                char *psz_name)
> {
>     char *psz_parser, *psz_string = NULL;
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (!p_aout)
>         return false;
> 
> @@ -654,7 +654,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
>         [[_equalizerPresetsPopup lastItem] setAction: @selector(deletePresetAction:)];
>     }
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
> 
>     NSString *currentPreset = nil;
>     if (p_aout) {
> @@ -758,7 +758,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> 
> - (IBAction)equalizerBandSliderUpdated:(id)sender
> {
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     char const *psz_preset_values = [[self generatePresetString] UTF8String];
>     if (p_aout) {
>         var_SetString(p_aout, "equalizer-bands", psz_preset_values);
> @@ -776,7 +776,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
>     float f_eq_preamp = [[[defaults objectForKey:@"EQPreampValues"] objectAtIndex:numberOfChosenPreset] floatValue];
>     char const *psz_eq_preset = [[[defaults objectForKey:@"EQNames"] objectAtIndex:numberOfChosenPreset] UTF8String];
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (p_aout) {
>         var_SetString(p_aout, "equalizer-bands", psz_eq_bands);
>         var_SetFloat(p_aout, "equalizer-preamp", f_eq_preamp);
> @@ -796,7 +796,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> {
>     float fPreamp = [sender floatValue] ;
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (p_aout) {
>         var_SetFloat(p_aout, "equalizer-preamp", fPreamp);
>         aout_Release(p_aout);
> @@ -808,7 +808,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> {
>     bool b_2p = [sender state] ? true : false;
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (p_aout) {
>         var_SetBool(p_aout, "equalizer-2pass", b_2p);
>         aout_Release(p_aout);
> @@ -850,7 +850,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> 
>         /* update VLC internals */
>         char const *psz_eq_preset = [decomposedStringWithCanonicalMapping UTF8String];
> -        audio_output_t *p_aout = getAout();
> +        audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>         if (p_aout) {
>             var_SetString(p_aout, "equalizer-preset", psz_eq_preset);
>             aout_Release(p_aout);
> @@ -943,7 +943,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
>     var_SetFloat(p_playlist, "compressor-knee", 2.500000);
>     var_SetFloat(p_playlist, "compressor-makeup-gain", 7.000000);
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (p_aout) {
>         var_SetFloat(p_aout, "compressor-rms-peak", 0.000000);
>         var_SetFloat(p_aout, "compressor-attack", 25.000000);
> @@ -985,7 +985,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> 
>     assert(psz_property);
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (p_aout) {
>         var_SetFloat(p_aout, psz_property, f_value);
>         aout_Release(p_aout);
> @@ -1047,7 +1047,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
>     var_SetFloat(p_playlist, "spatializer-dry", .5);
>     var_SetFloat(p_playlist, "spatializer-damp", .5);
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (p_aout) {
>         var_SetFloat(p_aout, "spatializer-roomsize", .85);
>         var_SetFloat(p_aout, "spatializer-width", 1.);
> @@ -1083,7 +1083,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> 
>     assert(psz_property);
> 
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     if (p_aout) {
>         var_SetFloat(p_aout, psz_property, f_value / 10.f);
>         aout_Release(p_aout);
> @@ -1145,7 +1145,7 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
> 
> - (IBAction)filterVolumeNormSliderUpdated:(id)sender
> {
> -    audio_output_t *p_aout = getAout();
> +    audio_output_t *p_aout = [[[[VLCMain sharedInstance] playlistController] playerController] mainAudioOutput];
>     float f_value = [_filterNormLevelSlider floatValue];
> 
>     if (p_aout) {
> diff --git a/modules/gui/macosx/panels/VLCTrackSynchronizationWindowController.m b/modules/gui/macosx/panels/VLCTrackSynchronizationWindowController.m
> index 6f58bcdc83..31ccbd07a0 100644
> --- a/modules/gui/macosx/panels/VLCTrackSynchronizationWindowController.m
> +++ b/modules/gui/macosx/panels/VLCTrackSynchronizationWindowController.m
> @@ -24,12 +24,13 @@
> #import "VLCTrackSynchronizationWindowController.h"
> 
> #import <vlc_common.h>
> +#import <vlc_playlist_legacy.h>
> 
> #import "coreinteraction/VLCVideoFilterHelper.h"
> #import "main/CompatibilityFixes.h"
> #import "main/VLCMain.h"
> -#import <vlc_playlist_legacy.h>
> -#import "extensions/helpers.h"
> +#import "playlist/VLCPlaylistController.h"
> +#import "playlist/VLCPlayerController.h"
> 
> #define SUBSDELAY_CFG_MODE                     "subsdelay-mode"
> #define SUBSDELAY_CFG_FACTOR                   "subsdelay-factor"
> @@ -200,7 +201,7 @@
> 
>     if (p_input) {
>         float f_factor = [_sv_durTextField floatValue];
> -        NSArray<NSValue *> *vouts = getVouts();
> +        NSArray<NSValue *> *vouts = [[[[VLCMain sharedInstance] playlistController] playerController] allVideoOutputThreads];
> 
>         if (vouts)
>             for (NSValue *ptr in vouts) {
> diff --git a/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m b/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m
> index da54d5629a..3779afc949 100644
> --- a/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m
> +++ b/modules/gui/macosx/panels/VLCVideoEffectsWindowController.m
> @@ -29,16 +29,16 @@
> #import "main/VLCMain.h"
> #import "panels/dialogs/VLCPopupPanelController.h"
> #import "panels/dialogs/VLCTextfieldPanelController.h"
> +#import "playlist/VLCPlaylistController.h"
> +#import "playlist/VLCPlayerController.h"
> 
> #import <vlc_playlist_legacy.h>
> -#import "extensions/helpers.h"
> 
> #define getWidgetBoolValue(w)   ((vlc_value_t){ .b_bool = [w state] })
> #define getWidgetIntValue(w)    ((vlc_value_t){ .i_int = [w intValue] })
> #define getWidgetFloatValue(w)  ((vlc_value_t){ .f_float = [w floatValue] })
> #define getWidgetStringValue(w) ((vlc_value_t){ .psz_string = (char *)[[w stringValue] UTF8String] })
> 
> -
> #pragma mark -
> #pragma mark Initialization
> 
> @@ -111,7 +111,7 @@
> 
>     /* filter handling */
>     NSString *tempString = B64DecNSStr([items firstObject]);
> -    NSArray<NSValue *> *vouts = getVouts();
> +    NSArray<NSValue *> *vouts = [[[[VLCMain sharedInstance] playlistController] playerController] allVideoOutputThreads];
> 
>     /* enable the new filters */
>     var_SetString(p_playlist, "video-filter", [tempString UTF8String]);
> @@ -1018,7 +1018,7 @@
>             [self setCropRightValue: [self cropLeftValue]];
>     }
> 
> -    NSArray<NSValue *> *vouts = getVouts();
> +    NSArray<NSValue *> *vouts = [[[[VLCMain sharedInstance] playlistController] playerController] allVideoOutputThreads];
>     if (vouts)
>         for (NSValue *ptr in vouts) {
>             vout_thread_t *p_vout = [ptr pointerValue];
> diff --git a/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m b/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
> index c90a9cc91a..0010023c4d 100644
> --- a/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
> +++ b/modules/gui/macosx/windows/video/VLCVideoWindowCommon.m
> @@ -30,8 +30,9 @@
> #import "windows/mainwindow/VLCControlsBarCommon.h"
> #import "windows/mainwindow/VLCMainWindow.h"
> #import "windows/video/VLCVoutView.h"
> +#import "playlist/VLCPlaylistController.h"
> +#import "playlist/VLCPlayerController.h"
> #import <vlc_playlist_legacy.h>
> -#import "extensions/helpers.h"
> 
> /*****************************************************************************
>  * VLCVideoWindowCommon
> @@ -452,7 +453,7 @@
>     frameBeforeLionFullscreen = [self frame];
> 
>     if ([self hasActiveVideo]) {
> -        vout_thread_t *p_vout = getVoutForActiveWindow();
> +        vout_thread_t *p_vout = [[[[VLCMain sharedInstance] playlistController] playerController] videoOutputThreadForKeyWindow];
>         if (p_vout) {
>             var_SetBool(p_vout, "fullscreen", true);
>             vout_Release(p_vout);
> @@ -498,7 +499,7 @@
>     if ([self hasActiveVideo]) {
>         var_SetBool(pl_Get(getIntf()), "fullscreen", false);
> 
> -        vout_thread_t *p_vout = getVoutForActiveWindow();
> +        vout_thread_t *p_vout = [[[[VLCMain sharedInstance] playlistController] playerController] videoOutputThreadForKeyWindow];
>         if (p_vout) {
>             var_SetBool(p_vout, "fullscreen", false);
>             vout_Release(p_vout);
> diff --git a/po/POTFILES.in b/po/POTFILES.in
> index 69798e3154..5f26937ac2 100644
> --- a/po/POTFILES.in
> +++ b/po/POTFILES.in
> @@ -466,7 +466,6 @@ modules/gui/macosx/extensions/NSString+Helpers.h
> modules/gui/macosx/extensions/NSString+Helpers.m
> modules/gui/macosx/extensions/VLCHexNumberFormatter.h
> modules/gui/macosx/extensions/VLCHexNumberFormatter.m
> -modules/gui/macosx/extensions/helpers.h
> modules/gui/macosx/extensions/misc.h
> modules/gui/macosx/extensions/misc.m
> modules/gui/macosx/library/VLCLibraryCollectionViewItem.h
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits



More information about the vlc-devel mailing list