[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Do not double-instantiate VLCMainVideoViewController when creating video windows

Thomas Guillem (@tguillem) gitlab at videolan.org
Fri Dec 22 12:23:41 UTC 2023



Thomas Guillem pushed to branch master at VideoLAN / VLC


Commits:
a31afa22 by Claudio Cambra at 2023-12-22T12:04:59+00:00
macosx: Do not double-instantiate VLCMainVideoViewController when creating video windows

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
3d1dd29a by Claudio Cambra at 2023-12-22T12:04:59+00:00
macosx: Add convenience update method to VLCControlsBarCommon

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
46a99f0b by Claudio Cambra at 2023-12-22T12:04:59+00:00
macosx: Ensure control bar gets updated on instantiation within VLCMainVideoViewController

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


4 changed files:

- modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.h
- modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
- modules/gui/macosx/windows/video/VLCMainVideoViewController.m
- modules/gui/macosx/windows/video/VLCVideoOutputProvider.m


Changes:

=====================================
modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.h
=====================================
@@ -73,6 +73,7 @@
 - (IBAction)volumeAction:(id)sender;
 - (IBAction)fullscreen:(id)sender;
 
+- (void)update;
 - (void)updateMuteVolumeButtonImage;
 
 - (void)updateTimeSlider:(NSNotification *)aNotification;


=====================================
modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
=====================================
@@ -324,6 +324,15 @@
 #pragma mark -
 #pragma mark Updaters
 
+- (void)update 
+{
+    [self updateTimeSlider:nil];
+    [self updateVolumeSlider:nil];
+    [self updateMuteVolumeButtonImage];
+    [self updatePlaybackControls:nil];
+    [self updateCurrentItemDisplayControls:nil];
+}
+
 - (void)updateTimeSlider:(NSNotification *)aNotification;
 {
     VLCInputItem *inputItem = _playerController.currentMedia;


=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -145,6 +145,7 @@
     _playlistButtonBottomConstraint.active = NO;
 
     [self setupAudioDecorativeView];
+    [self.controlsBar update];
 }
 
 - (void)playerCurrentMediaItemChanged:(NSNotification *)notification


=====================================
modules/gui/macosx/windows/video/VLCVideoOutputProvider.m
=====================================
@@ -245,7 +245,6 @@ int WindowOpen(vlc_window_t *p_wnd)
     newVideoWindow.acceptsMouseMovedEvents = !asVideoWallpaper;
     newVideoWindow.movableByWindowBackground = !asVideoWallpaper;
 
-    newVideoWindow.videoViewController = [[VLCMainVideoViewController alloc] init];
     newVideoWindow.videoViewController.displayLibraryControls = NO;
     newVideoWindow.videoViewController.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
     newVideoWindow.videoViewController.view.frame = newVideoWindow.contentView.frame;
@@ -300,7 +299,6 @@ int WindowOpen(vlc_window_t *p_wnd)
     newVideoWindow.minSize = NSMakeSize(VLCVideoWindowCommonMinimalHeight, VLCVideoWindowCommonMinimalHeight);
     newVideoWindow.titlebarAppearsTransparent = YES;
 
-    newVideoWindow.videoViewController = [[VLCMainVideoViewController alloc] init];
     newVideoWindow.videoViewController.displayLibraryControls = NO;
     newVideoWindow.videoViewController.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
     newVideoWindow.videoViewController.view.frame = newVideoWindow.contentView.frame;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/88e6f2580a35433a84fff59f8d77e8764ba37968...46a99f0b73dac93896ed02b05aee2cb879bd2b37

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/88e6f2580a35433a84fff59f8d77e8764ba37968...46a99f0b73dac93896ed02b05aee2cb879bd2b37
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list