johnboiles / coremediaio-dal-minimal-example

Intended to be the most minimalistic example of a macOS CoreMediaIO DAL plugin.
MIT License
211 stars 31 forks source link

Fix Stream.mm to record in QT Player, add constants for framerate #11

Closed iKenndac closed 4 years ago

iKenndac commented 4 years ago

This PR is borne from issue #10, and is inspired by the work done on the same issue over on the Swift port of this repo: https://github.com/seanchas116/SimpleDALPlugin/issues/2

The code changes here use a smaller timing scale than before to allow it to be recorded by QuickTime Player, but always uses a scale that roundly divides into our framerate (which a millisecond scale doesn't necessarily do). It also adds constants for the framerate so changing it later on is much easier if required.

johnboiles commented 4 years ago

BTW I like your implementation more than the one in seanchas116/SimpleDALPlugin#2 since it avoids adding another instance variable to Stream 🎉

Probably in practice this timestamp is going to come from some other process that sends frames, so it's nice to keep these classes as simple as possible ❤️

mizt commented 4 years ago

Fixed a problem with audio input when used in QT Player.