1

I'm new to macOS development.

I was trying to put some attributed text on my video frame by frame,

but don't know how to deal with the CMSampleBuffer.

Googled some article but doesn't get anything,

should I convert it to something else like image, then add the text?

Here is my code:

        var samples = [CMSampleBuffer]()
        while let sample = readerOutput.copyNextSampleBuffer() {
            samples.append(sample)
        }

        .............

        for (index, sample) in samples.enumerated() {

            // Want to add text to each frame here

        }

Thanks!

Senjuti Mahapatra
  • 2,570
  • 4
  • 27
  • 38
Rice
  • 11
  • 4

0 Answers0