Reputation: 1
I am making video file on my Mac programmatically. I want to know that "CMtimeMake" is what's mean.
For example:
AVAssetWriterInputPixelBufferAdaptor * avAdaptor = [AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput:writerInput sourcePixelBufferAttributes:NULL];
[avAdaptor appendPixelBufferixelBuffer withPresentationTime:CMTimeMake(1, 10)];
Upvotes: 0
Views: 506
Reputation: 798
CMTimeMake
makes a valid CMTime
with value and timescale.
Here in your code:
CMTimeMake(1,10)
A CMTime
is represented as a rational number, with a numerator (an int64_t value), and a denominator (an int32_t timescale).
CMTimeMake
is called to create CMTime
representing times(either durations or timestamps).
1 is the value field of the resulting CMTime
and 10 means each unit represents a tenth of a second.
Upvotes: 1