[vlc-commits] macosx: Use avaudiocapture module instead of qtsound
David Fuhrmann
git at videolan.org
Sun Nov 18 14:40:55 CET 2018
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Nov 18 14:33:13 2018 +0100| [acef852aac51044b6663d9f86083529e8dfb88e4] | committer: David Fuhrmann
macosx: Use avaudiocapture module instead of qtsound
And remove some references of the old QTKit code.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=acef852aac51044b6663d9f86083529e8dfb88e4
---
extras/package/macosx/VLC.xcodeproj/project.pbxproj | 2 --
modules/gui/macosx/VLCOpenWindowController.m | 20 +++++++-------------
2 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index 84f28146d7..08d0ad2f97 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -541,7 +541,6 @@
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>"; };
@@ -1476,7 +1475,6 @@
children = (
1CCD8F9F2117957600407114 /* avaudiocapture.m */,
DCC8017816FCA036007FE736 /* avcapture.m */,
- DC1A176914E2778A001477C6 /* qtsound.m */,
);
name = access;
sourceTree = "<group>";
diff --git a/modules/gui/macosx/VLCOpenWindowController.m b/modules/gui/macosx/VLCOpenWindowController.m
index 80e98176d2..703a43f1f1 100644
--- a/modules/gui/macosx/VLCOpenWindowController.m
+++ b/modules/gui/macosx/VLCOpenWindowController.m
@@ -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]];
More information about the vlc-commits
mailing list