macosx: Use avaudiocapture module instead of qtsound
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 18 Nov 2018 13:33:13 +0000 (14:33 +0100)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 18 Nov 2018 13:33:13 +0000 (14:33 +0100)
And remove some references of the old QTKit code.

extras/package/macosx/VLC.xcodeproj/project.pbxproj
modules/gui/macosx/VLCOpenWindowController.m

index 84f2814..08d0ad2 100644 (file)
                CCDDF1AD172FF4C4007729A1 /* dirs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = dirs.c; path = ../../../src/darwin/dirs.c; sourceTree = "<group>"; };
                CCF0777B13659A8000AF19FD /* SPMediaKeyTap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPMediaKeyTap.h; sourceTree = "<group>"; };
                CCF0777C13659A8000AF19FD /* SPMediaKeyTap.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPMediaKeyTap.m; sourceTree = "<group>"; };
-               DC1A176914E2778A001477C6 /* qtsound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = qtsound.m; path = ../../../modules/access/qtsound.m; sourceTree = "<group>"; };
                DCC8017816FCA036007FE736 /* avcapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = avcapture.m; path = ../../../modules/access/avcapture.m; sourceTree = "<group>"; };
                DCC8017916FCA0DA007FE736 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
                DCE7BD0608A5724D007B10AE /* VLCBookmarksWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCBookmarksWindowController.m; sourceTree = "<group>"; };
                        children = (
                                1CCD8F9F2117957600407114 /* avaudiocapture.m */,
                                DCC8017816FCA036007FE736 /* avcapture.m */,
-                               DC1A176914E2778A001477C6 /* qtsound.m */,
                        );
                        name = access;
                        sourceTree = "<group>";
index 80e9817..703a43f 100644 (file)
@@ -214,12 +214,6 @@ static NSString *kCaptureTabViewId  = @"capture";
     [_screenFollowMouseCheckbox setTitle: _NS("Follow the mouse")];
     [_screenqtkAudioCheckbox setTitle: _NS("Capture Audio")];
 
-#warning QTKit stuff is deprecated and broken!
-    /* The QTKit audio capture does not work anymore since 3.x, it has to be
-     * replaced with AVFoundation audio capture stuff and things have to be
-     * changed here to not try to use the qtkit module anymore.
-     */
-
     // setup start / stop time fields
     [_fileStartTimeTextField setFormatter:[[PositionFormatter alloc] init]];
     [_fileStopTimeTextField setFormatter:[[PositionFormatter alloc] init]];
@@ -227,7 +221,7 @@ static NSString *kCaptureTabViewId  = @"capture";
     // Auto collapse MRL field
     self.mrlViewHeightConstraint.constant = 0;
 
-    [self updateQTKVideoDevices];
+    [self updateVideoDevices];
     [_qtkVideoDevicePopup removeAllItems];
     msg_Dbg(getIntf(), "Found %lu video capture devices", _avvideoDevices.count);
 
@@ -252,7 +246,7 @@ static NSString *kCaptureTabViewId  = @"capture";
     [_qtkAudioDevicePopup removeAllItems];
     [_screenqtkAudioPopup removeAllItems];
 
-    [self updateQTKAudioDevices];
+    [self updateAudioDevices];
     msg_Dbg(getIntf(), "Found %lu audio capture devices", _avaudioDevices.count);
 
     if (_avaudioDevices.count >= 1) {
@@ -503,12 +497,12 @@ static NSString *kCaptureTabViewId  = @"capture";
             else
                 [options addObject: @"no-screen-follow-mouse"];
             if ([_screenqtkAudioCheckbox state] && _avCurrentAudioDeviceUID)
-                [options addObject: [NSString stringWithFormat: @"input-slave=qtsound://%@", _avCurrentAudioDeviceUID]];
+                [options addObject: [NSString stringWithFormat: @"input-slave=avaudiocapture://%@", _avCurrentAudioDeviceUID]];
         }
         else if ([[[_captureModePopup selectedItem] title] isEqualToString: _NS("Input Devices")]) {
             if ([_qtkVideoCheckbox state]) {
                 if ([_qtkAudioCheckbox state] && _avCurrentAudioDeviceUID)
-                    [options addObject: [NSString stringWithFormat: @"input-slave=qtsound://%@", _avCurrentAudioDeviceUID]];
+                    [options addObject: [NSString stringWithFormat: @"input-slave=avaudiocapture://%@", _avCurrentAudioDeviceUID]];
             }
         }
     }
@@ -1174,7 +1168,7 @@ static NSString *kCaptureTabViewId  = @"capture";
         if ([_qtkVideoCheckbox state] && _avCurrentDeviceUID)
             [self setMRL:[NSString stringWithFormat:@"avcapture://%@", _avCurrentDeviceUID]];
         else if ([_qtkAudioCheckbox state] && _avCurrentAudioDeviceUID)
-            [self setMRL:[NSString stringWithFormat:@"qtsound://%@", _avCurrentAudioDeviceUID]];
+            [self setMRL:[NSString stringWithFormat:@"avaudiocapture://%@", _avCurrentAudioDeviceUID]];
     }
 }
 
@@ -1316,13 +1310,13 @@ static NSString *kCaptureTabViewId  = @"capture";
         NSBeep();
 }
 
-- (void)updateQTKVideoDevices
+- (void)updateVideoDevices
 {
     _avvideoDevices = [[AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]
                          arrayByAddingObjectsFromArray:[AVCaptureDevice devicesWithMediaType:AVMediaTypeMuxed]];
 }
 
-- (void)updateQTKAudioDevices
+- (void)updateAudioDevices
 {
     _avaudioDevices = [[AVCaptureDevice devicesWithMediaType:AVMediaTypeAudio]
                         arrayByAddingObjectsFromArray:[AVCaptureDevice devicesWithMediaType:AVMediaTypeMuxed]];