Platforms to show: All Mac Windows Linux Cross-Platform

Back to CMSampleBufferMBS class.

CMSampleBufferMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

CMSampleBufferMBS.Copy as CMSampleBufferMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a copy of the object.

CMSampleBufferMBS.CopySampleBufferForRange(pos as Integer, len as Integer) as CMSampleBufferMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a CMSampleBuffer containing a range of samples from an existing CMSampleBuffer.

Samples containing non-interleaved audio are currently not supported.

CMSampleBufferMBS.Invalidate

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Makes the sample buffer invalid, calling any installed invalidation callback.

An invalid sample buffer cannot be used -- all accessors will return kCMSampleBufferError_Invalidated.
It is not a good idea to do this to a sample buffer that another module may be accessing concurrently.
Example of use: the invalidation callback could cancel pending I/O.

CMSampleBufferMBS.MakeDataReady

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Makes a CMSampleBuffer's data ready, by calling the client's MakeDataReadyCallback.

The CMSampleBufferMakeDataReadyCallback is passed in by the client during creation. It must return 0 if successful, and in that case, CMSampleBufferMakeDataReady will set the data readiness of the CMSampleBuffer to true. Example of usage: when it is time to actually use the data. Example of callback routine: a routine to force a scheduled read to complete. If the CMSampleBuffer is not ready, and there is no CMSampleBufferMakeDataReadyCallback to call, kCMSampleBufferError_BufferNotReady will be returned. Similarly, if the CMSampleBuffer is not ready, and the CMSampleBufferMakeDataReadyCallback fails and returns an error, kCMSampleBufferError_BufferNotReady will be returned.

CMSampleBufferMBS.SampleSize(index as Integer) as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the size in bytes of a specified sample in a CMSampleBuffer.

Size in bytes of the specified sample in the CMSampleBuffer.
If the sample index is not in the range 0 .. numSamples-1, a size of 0 will be returned. If there are no sample sizes in this CMSampleBuffer, a size of 0 will be returned. This will be true, for example, if the samples in the buffer are non-contiguous (eg. non-interleaved audio, where the channel values for a single sample are scattered through the buffer), or if this CMSampleBuffer contains a CVImageBuffer.

CMSampleBufferMBS.SetDataReady

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Marks a CMSampleBuffer's data as "ready".

There is no way to undo this operation. The only way to get an "unready" CMSampleBuffer is to call CMSampleBufferCreate with the dataReady parameter set to false. Example of usage: in a read completion routine.

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...