[vlc-commits] macosx: do not create VLCVoutController twice, remove singleton

David Fuhrmann git at videolan.org
Thu Jul 30 19:50:14 CEST 2015


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu Jul 30 18:58:00 2015 +0200| [cb8e4a6ddb651b33ba1923b5cfa9ac1500c60d93] | committer: David Fuhrmann

macosx: do not create VLCVoutController twice, remove singleton

The only valid instance of the vout controller is owned by VLCMain.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb8e4a6ddb651b33ba1923b5cfa9ac1500c60d93
---

 modules/gui/macosx/VLCVoutWindowController.h |    2 --
 modules/gui/macosx/VLCVoutWindowController.m |   12 ------------
 modules/gui/macosx/intf.m                    |    2 --
 3 files changed, 16 deletions(-)

diff --git a/modules/gui/macosx/VLCVoutWindowController.h b/modules/gui/macosx/VLCVoutWindowController.h
index 2381fb8..fbc81a5 100644
--- a/modules/gui/macosx/VLCVoutWindowController.h
+++ b/modules/gui/macosx/VLCVoutWindowController.h
@@ -32,8 +32,6 @@
 
 @interface VLCVoutWindowController : NSObject
 
-+ (VLCVoutWindowController *)sharedInstance;
-
 @property (readonly, atomic) NSLock *lock;
 
 @property (readonly, nonatomic) NSInteger currentStatusWindowLevel;
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index f000486..a588abf 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -211,18 +211,6 @@ void WindowClose(vout_window_t *p_wnd)
 
 @implementation VLCVoutWindowController
 
-+ (VLCVoutWindowController *)sharedInstance
-{
-    static VLCVoutWindowController *sharedInstance = nil;
-    static dispatch_once_t pred;
-
-    dispatch_once(&pred, ^{
-        sharedInstance = [VLCVoutWindowController new];
-    });
-
-    return sharedInstance;
-}
-
 - (id)init
 {
     self = [super init];
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 1cb6ad1..9860e67 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -86,8 +86,6 @@ int OpenIntf (vlc_object_t *p_this)
         [NSBundle loadNibNamed:@"MainWindow" owner:[VLCMain sharedInstance]];
         [[[VLCMain sharedInstance] mainWindow] makeKeyAndOrderFront:nil];
 
-        [VLCVoutWindowController sharedInstance];
-
         return VLC_SUCCESS;
     }
 }



More information about the vlc-commits mailing list