Platforms to show: All Mac Windows Linux Cross-Platform

Back to CMSampleBufferMBS class.

CMSampleBufferMBS.DataIsReady as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns whether or not a CMSampleBuffer's data is ready.

Whether or not the CMSampleBuffer's data is ready. True is returned for special marker buffers, even though they have no data. False is returned if there is an error.
(Read only property)

CMSampleBufferMBS.DecodeTimeStamp as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the numerically earliest decode timestamp of all the samples in a CMSampleBuffer.

The returned decode timestamp is always the decode timestamp of the first sample in the buffer, since even out-of-presentation-order samples are expected to be in decode order in the buffer.
Numerically earliest sample decode timestamp in the CMSampleBuffer. kCMTimeInvalid is returned if there is an error.
(Read only property)

CMSampleBufferMBS.Duration as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the total duration of a CMSampleBuffer.

If the buffer contains out-of-presentation-order samples, any gaps in the presentation timeline are not represented in the returned duration.
The returned duration is simply the sum of all the individual sample durations.
Returns the duration of the CMSampleBuffer. kCMTimeInvalid is returned if there is an error.
(Read only property)

CMSampleBufferMBS.FormatDescription as CMFormatDescriptionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the format description of the samples in a CMSampleBuffer.

Nil is returned if there is an error.
(Read only property)

CMSampleBufferMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal object reference.

(Read and Write property)

CMSampleBufferMBS.ImageBuffer as CVImageBufferMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a CMSampleBuffer's CVImageBuffer of media data.

The result will be nil if the CMSampleBuffer does not contain a CVImageBuffer, if the CMSampleBuffer contains a CMBlockBuffer, or if there is some other error.
(Read only property)

Some examples using this property:

CMSampleBufferMBS.IsValid as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Queries whether a sample buffer is still valid.

Returns false if buffer is nil or Invalidate was called, true otherwise.
Does not perform any kind of exhaustive validation of the sample buffer.
(Read only property)

CMSampleBufferMBS.Lasterror as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The last error code.

See error code constants.
Looking with debugger on properties of this class will change the lasterror code!
(Read and Write property)

CMSampleBufferMBS.NumberOfSamples as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the number of media samples in a CMSampleBuffer.

The number of media samples in the CMSampleBuffer. 0 is returned if there is an error.
(Read only property)

CMSampleBufferMBS.OutputDecodeTimeStamp as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the output decode timestamp of the CMSampleBuffer.

For consistency with OutputPresentationTimeStamp, this is calculated as: OutputPresentationTimeStamp + ((DecodeTimeStamp - PresentationTimeStamp) / SpeedMultiplier).
CMInvalidTime is returned if there is an error.
(Read only property)

CMSampleBufferMBS.OutputDuration as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the output duration of a CMSampleBuffer.

The OutputDuration is the duration minus any trimmed duration, all divided by the SpeedMultiplier: (Duration - TrimDurationAtStart - TrimDurationAtEnd) / SpeedMultiplier
Returns the output duration of the CMSampleBuffer. kCMTimeInvalid is returned if there is an error.
(Read only property)

CMSampleBufferMBS.OutputPresentationTimeStamp as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the output presentation timestamp of the CMSampleBuffer.

The output presentation timestamp is the time at which the decoded, trimmed, stretched and possibly reversed samples should commence being presented.
If CMSampleBufferSetOutputPresentationTimeStamp has been called to explicitly set the output PTS, CMSampleBufferGetOutputPresentationTimeStamp returns it.
If not, CMSampleBufferGetOutputPresentationTimeStamp calculates its result as (PresentationTimeStamp + TrimDurationAtStart) unless kCMSampleBufferAttachmentKey_Reverse is kCFBooleanTrue, in which case it calculates the result as (PresentationTimeStamp + Duration - TrimDurationAtEnd).
These are generally correct for un-stretched, un-shifted playback.
For general forward playback in a scaled edit, the OutputPresentationTimeStamp should be set to:
((PresentationTimeStamp + TrimDurationAtStart - EditStartMediaTime) / EditSpeedMultiplier) + EditStartTrackTime.
For general reversed playback:
((PresentationTimeStamp + Duration - TrimDurationAtEnd - EditStartMediaTime) / EditSpeedMultiplier) + EditStartTrackTime.
Returns kCMTimeInvalid is returned if there is an error.
(Read and Write property)

CMSampleBufferMBS.PresentationTimeStamp as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the numerically earliest presentation timestamp of all the samples in a CMSampleBuffer.

For in-presentation-order samples, this is the presentation timestamp of the first sample.
For out-of-presentation-order samples, this is the presentation timestamp of the sample that will be presented first, which is not necessarily the first sample in the buffer.
Returns numerically earliest sample presentation timestamp in the CMSampleBuffer. kCMTimeInvalid is returned if there is an error.
(Read only property)

CMSampleBufferMBS.Text as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 15.4 ✅ Yes ❌ No ❌ No ✅ Yes All
For text samples, provides the text.

(Read only property)

CMSampleBufferMBS.TotalSampleSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the total size in bytes of sample data in a CMSampleBuffer.

If there are no sample sizes in this CMSampleBuffer, a size of 0 will be returned.
(Read only property)

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


The biggest plugin in space...