I am trying to calculate frame rate of a video format based on CMFormatDescription but I'm getting strange output that I do not know what to do with. According to the documentation, "value/timescale = seconds". This is also the answer in this question.
The code is being called while getting a video stream from FaceTime camera:
let av = device.activeFormat
let fd = av.formatDescription
print("time scale",fd.frameDuration.timescale)
print("value",fd.frameDuration.value)
print("value/timescale=",fd.frameDuration.value)/Int64(fd.frameDuration.timescale))
This is the output:
time scale 480
value 2749654773878
value/timescale= 5728447445.579166
Time scale is always == height (of the format description) - I also tried with another usb camera.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
In the example of the Core Media IO there is a mach server that is providing the samples to the plugin (in the example it is a getting the samples from a yuv file). The architecture of OBS is similar. The mach server is reading from a camera or from from a file and provides the samples to the plugin.
Why do we need the mach server? I've implemented a virtual webcam where the plugin is capturing samples from a webcam (either the built in webcam or a USB one). It seems to be more efficient though I guess that there is a reason for doing this with a mach server. What is the reason?
I have a virtual camera (DAL plugin) and I need to read and write an ini file (the ini file may be updated by another application).
If I save an ini file manually at /Library/CoreMediaIO/Plug-Ins/DAL/ I can read it.
But when I try to write to a file I get an error because the writing is done from the process of the application that is using the virtual webcam which cannot write to /Library/CoreMediaIO/Plug-Ins/DAL/
Making a setting app to write a new ini file is not helpful because the plugin cannot read from other places (unless I am missing something).
Is there any thing I am missing?
Is there any macOS storage method other than files to write and read from?