AppleScript名:AVCapture Deviceの情報を取得する |
— Created 2017-10-24 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "AVFoundation" –https://github.com/pombredanne/osx_headers/blob/master/Frameworks/AVFoundation/AVCaptureHALDevice.h set inputDevs to current application’s AVCaptureDevice’s devices() set a1Res to (inputDevs’s valueForKeyPath:"manufacturer") as list –> {"ma++ ingalls for Cycling ’74", "Shape Services", "Apple Inc.", "Shape Services", "ma++ ingalls for Cycling ’74", "Allocinit.com", "Allocinit.com", "Apple Inc."} set a2Res to (inputDevs’s valueForKeyPath:"localizedName") as list –> {"Soundflower (64ch)", "Mobiola Headphone", "内蔵マイク", "Mobiola Microphone", "Soundflower (2ch)", "CamTwist", "CamTwist (2VUY)", "FaceTime HDカメラ(内蔵)"} set a3Res to (inputDevs’s valueForKeyPath:"isConnected") as list –> {1, 1, 1, 1, 1, 1, 1, 1} set a4Res to (inputDevs’s valueForKeyPath:"activeFormat") as list –> {(AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000605a30> ’soun’/’lpcm’ SR=44100,FF=30,BPP=256,FPP=1,BPF=256,CH=64,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x618000407a90> ’soun’/’lpcm’ SR=48000,FF=30,BPP=4,FPP=1,BPF=4,CH=1,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x608000c171f0> ’soun’/’lpcm’ SR=44100,FF=4,BPP=8,FPP=1,BPF=8,CH=2,BPC=24, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x600000c0ba40> ’soun’/’lpcm’ SR=48000,FF=30,BPP=4,FPP=1,BPF=4,CH=1,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000606310> ’soun’/’lpcm’ SR=44100,FF=30,BPP=8,FPP=1,BPF=8,CH=2,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x618000a07010> ’vide’/’BGRA’ enc dims = 720×480, pres dims = 720×480 { 30.00 fps }, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x608000a15070> ’vide’/’2vuy’ enc dims = 720×480, pres dims = 720×480 { 30.00 fps }, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000605bb0> ’vide’/’2vuy’ enc dims = 160×120, pres dims = 160×120 { 29.97 25.00 24.00 15.00 fps }} set a5Res to (inputDevs’s valueForKeyPath:"transportType") as list –> {0, 0, 1.651274862E+9, 0, 0, 1.651274862E+9, 1.651274862E+9, 1.651274862E+9} set a6Res to (inputDevs’s valueForKeyPath:"modelID") as list –> {"com_cycling74_driver_SoundflowerDevice:Soundflower", "com_ShapeServices_driver_HSAudioDevice:Headset Audio Device", "AppleHDA:40", "com_ShapeServices_driver_HSAudioDevice:Headset Audio Device", "com_cycling74_driver_SoundflowerDevice:Soundflower", "Stiltskin", "Stiltskin", "UVC Camera VendorID_1452 ProductID_34064"} set a7Res to (inputDevs’s valueForKeyPath:"formats") as list –> {{(AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000606240> ’soun’/’lpcm’ SR=192000,FF=30,BPP=256,FPP=1,BPF=256,CH=64,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000605d30> ’soun’/’lpcm’ SR=176400,FF=30,BPP=256,FPP=1,BPF=256,CH=64,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000605020> ’soun’/’lpcm’ SR=96000,FF=30,BPP=256,FPP=1,BPF=256,CH=64,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000605a90> ’soun’/’lpcm’ SR=88200,FF=30,BPP=256,FPP=1,BPF=256,CH=64,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000601b70> ’soun’/’lpcm’ SR=48000,FF=30,BPP=256,FPP=1,BPF=256,CH=64,BPC=32, (AVCaptureDeviceFormat) <AVCaptureDeviceFormat: 0x610000605a30> ’soun’/’lpcm’ SR=44100,FF=30,BPP=256,FPP=1,BPF=256,CH=64,BPC=32}, set a8Res to (inputDevs’s valueForKeyPath:"connectionID") as list –> {65, 40, 200, 47, 54, 33, 36, 39} set a9Res to (inputDevs’s valueForKeyPath:"connectionUnitComponentSubType") –> (NSArray) {1751215136, 1751215136, 1751215136, 1751215136, 1751215136, 1684106272, 1684106272, 1684106272} set a10Res to (inputDevs’s valueForKeyPath:"deviceID") as list –> {65, 40, 200, 47, 54, 33, 36, 39} set a11Res to (inputDevs’s valueForKeyPath:"deviceSystem") as list –> {2, 2, 2, 2, 2, 1, 1, 1} set a12Res to (inputDevs’s valueForKeyPath:"isInUseByAnotherApplication") as list –> {0, 0, 0, 0, 0, 0, 0, 0} set a13Res to (inputDevs’s valueForKeyPath:"activeInputSource") as list –> {missing value, missing value, (AVCaptureDeviceInputSource) <AVCaptureDeviceInputSource: 0x610000606290 ’imic’ "内蔵マイク">, missing value, missing value, missing value, missing value, missing value} set a14Res to (inputDevs’s valueForKeyPath:"uniqueID") as list –> {"SoundflowerEngine:1", "HSAudioPipeEngine:0", "AppleHDAEngineInput:1B,0,1,0:1", "HSAudioPipeEngine:1", "SoundflowerEngine:0", "CDC85FD0-E73A-4FC2-B3A8-EA237D6990E0", "CDC85FD0-E73A-4FC2-B3A8-EA237D6990E1", "0x1a11000005ac8510"} set a15Res to (inputDevs’s valueForKeyPath:"inputSources") as list –> {{}, {}, {(AVCaptureDeviceInputSource) <AVCaptureDeviceInputSource: 0x610000606290 ’imic’ "内蔵マイク">}, {}, {}, {}, {}, {}} set a16Res to (inputDevs’s valueForKeyPath:"description") as list –> {"<AVCaptureHALDevice: 0x6180002f6d80 [Soundflower (64ch)][SoundflowerEngine:1]>", "<AVCaptureHALDevice: 0x6000002fba00 [Mobiola Headphone][HSAudioPipeEngine:0]>", "<AVCaptureHALDevice: 0x6180002fbe80 [内蔵マイク][AppleHDAEngineInput:1B,0,1,0:1]>", "<AVCaptureHALDevice: 0x6180002e8900 [Mobiola Microphone][HSAudioPipeEngine:1]>", "<AVCaptureHALDevice: 0x6100004f2c00 [Soundflower (2ch)][SoundflowerEngine:0]>", "<AVCaptureDALDevice: 0x7f804e6bae00 [CamTwist][CDC85FD0-E73A-4FC2-B3A8-EA237D6990E0]>", "<AVCaptureDALDevice: 0x7f804e5a3fa0 [CamTwist (2VUY)][CDC85FD0-E73A-4FC2-B3A8-EA237D6990E1]>", "<AVCaptureDALDevice: 0x7f804e5a24c0 [FaceTime HDカメラ(内蔵)][0x1a11000005ac8510]>"} |
More from my site
(Visited 97 times, 2 visits today)