public final class VideoToolbox
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
VideoToolbox.Block_VTCompressionSessionEncodeFrameWithOutputHandler |
static interface |
VideoToolbox.Block_VTDecompressionSessionDecodeFrameWithOutputHandler |
static interface |
VideoToolbox.Block_VTFrameSiloCallBlockForEachSampleBuffer |
static interface |
VideoToolbox.Function_VTCompressionSessionCreate |
static interface |
VideoToolbox.Function_VTFrameSiloCallFunctionForEachSampleBuffer |
| Modifier and Type | Method and Description |
|---|---|
static CFStringRef |
kVTAlphaChannelMode_PremultipliedAlpha() |
static CFStringRef |
kVTAlphaChannelMode_StraightAlpha() |
static CFStringRef |
kVTCompressionPropertyKey_AllowFrameReordering()
Read/Write, CFBoolean, Optional, defaults to true
|
static CFStringRef |
kVTCompressionPropertyKey_AllowOpenGOP()
Read/Write, CFBoolean, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_AllowTemporalCompression()
Read/Write, CFBoolean, Optional, defaults to true
|
static CFStringRef |
kVTCompressionPropertyKey_AlphaChannelMode()
Read/write, Optional, CFString(kVTAlphaChannelMode_*); if property is not set, matches first source frame's attachment; if that's also not set, defaults to premultiplied alpha
|
static CFStringRef |
kVTCompressionPropertyKey_AspectRatio16x9()
Read/write, CFBoolean, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_AverageBitRate()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_BaseLayerBitRateFraction()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_BaseLayerFrameRate()
Read/write, CFNumber, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_BaseLayerFrameRateFraction()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_CleanAperture()
Read/write, CFDictionary (see CMFormatDescription.h), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_ColorPrimaries()
Read/write, CFString (see kCMFormatDescriptionExtension_ColorPrimaries), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_ContentLightLevelInfo()
Read/write, CFData(4 bytes) (see kCMFormatDescriptionExtension_ContentLightLevelInfo), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_DataRateLimits()
Read/write, CFArray[CFNumber], [bytes, seconds, bytes, seconds...], Optional
|
static CFStringRef |
kVTCompressionPropertyKey_Depth()
Read/write, CFNumber (CMPixelFormatType), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_EnableLTR()
Read/write, CFBoolean, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_EncoderID()
CFStringRef
|
static CFStringRef |
kVTCompressionPropertyKey_ExpectedDuration()
Read/write, CFNumber(seconds), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_ExpectedFrameRate()
Read/write, CFNumber, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_FieldCount()
Read/write, CFNumber (see kCMFormatDescriptionExtension_FieldCount), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_FieldDetail()
Read/write, CFString (see kCMFormatDescriptionExtension_FieldDetail), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_GammaLevel()
Read/write, CFNumber (see kCMFormatDescriptionExtension_GammaLevel), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_H264EntropyMode()
Read/write, CFString, optional
|
static CFStringRef |
kVTCompressionPropertyKey_HDRMetadataInsertionMode()
Read/write, CFString, Optional, default is kVTHDRMetadataInsertionMode_Auto
|
static CFStringRef |
kVTCompressionPropertyKey_ICCProfile()
Read/write, CFData (see kCMFormatDescriptionExtension_ICCProfile), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_MasteringDisplayColorVolume()
Read/write, CFData(24 bytes) (see kCMFormatDescriptionExtension_MasteringDisplayColorVolume), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_MaxAllowedFrameQP()
Read/write, CFNumberRef, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_MaxFrameDelayCount()
Read/write, CFNumber, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_MaxH264SliceBytes()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_MaximizePowerEfficiency()
Read/write, CFBoolean or NULL, Optional, default is false
|
static CFStringRef |
kVTCompressionPropertyKey_MaxKeyFrameInterval()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_MoreFramesAfterEnd()
Read/write, CFBoolean, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_MoreFramesBeforeStart()
Read/write, CFBoolean, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_MultiPassStorage()
VTMultiPassStorage, optional, default is NULL
|
static CFStringRef |
kVTCompressionPropertyKey_NumberOfPendingFrames()
Read-only, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_PixelAspectRatio()
Read/write, CFDictionary (see CMFormatDescription.h), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_PixelBufferPoolIsShared()
Read-only, CFBoolean
|
static CFStringRef |
kVTCompressionPropertyKey_PixelTransferProperties()
Read/Write, CFDictionary containing properties from VTPixelTransferProperties.h.
|
static CFStringRef |
kVTCompressionPropertyKey_PreserveDynamicHDRMetadata()
CFBoolean, Write, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality()
CFBoolean, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_ProfileLevel()
Read/write, CFString (enumeration), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_ProgressiveScan()
Read/write, CFBoolean, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_Quality()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_RealTime()
Read/write, CFBoolean or NULL, Optional, default NULL
|
static CFStringRef |
kVTCompressionPropertyKey_SourceFrameCount()
Read/write, CFNumber, Optional
|
static CFStringRef |
kVTCompressionPropertyKey_SupportsBaseFrameQP()
Read only, CFBoolean, Optional, false by default
|
static CFStringRef |
kVTCompressionPropertyKey_TargetQualityForAlpha()
Read/write, CFNumber
|
static CFStringRef |
kVTCompressionPropertyKey_TransferFunction()
Read/write, CFString (see kCMFormatDescriptionExtension_TransferFunction), Optional
|
static CFStringRef |
kVTCompressionPropertyKey_UsingGPURegistryID()
CFNumberRef, Read;
|
static CFStringRef |
kVTCompressionPropertyKey_VideoEncoderPixelBufferAttributes()
Read-only, CFDictionary
|
static CFStringRef |
kVTCompressionPropertyKey_YCbCrMatrix()
Read/write, CFString (see kCMFormatDescriptionExtension_YCbCrMatrix), Optional
|
static CFStringRef |
kVTDecompressionProperty_DeinterlaceMode_Temporal()
apply filter that makes use of a window of multiple frames to generate deinterlaced results, and provides a better result at the expense of a pipeline delay; this mode is only used if kVTDecodeFrame_EnableTemporalProcessing is set, otherwise a non-temporal mode (eg, VerticalFilter) will be used instead
|
static CFStringRef |
kVTDecompressionProperty_DeinterlaceMode_VerticalFilter()
apply 0.25-0.50-0.25 vertical filter to individual interlaced frames; default mode
|
static CFStringRef |
kVTDecompressionProperty_FieldMode_BothFields() |
static CFStringRef |
kVTDecompressionProperty_FieldMode_BottomFieldOnly() |
static CFStringRef |
kVTDecompressionProperty_FieldMode_DeinterlaceFields() |
static CFStringRef |
kVTDecompressionProperty_FieldMode_SingleField()
Most appropriate of either TopFieldOnly or BottomFieldOnly
|
static CFStringRef |
kVTDecompressionProperty_FieldMode_TopFieldOnly() |
static CFStringRef |
kVTDecompressionProperty_OnlyTheseFrames_AllFrames() |
static CFStringRef |
kVTDecompressionProperty_OnlyTheseFrames_IFrames() |
static CFStringRef |
kVTDecompressionProperty_OnlyTheseFrames_KeyFrames() |
static CFStringRef |
kVTDecompressionProperty_OnlyTheseFrames_NonDroppableFrames() |
static CFStringRef |
kVTDecompressionProperty_TemporalLevelLimit()
Read/write, CFNumber
|
static CFStringRef |
kVTDecompressionPropertyKey_ContentHasInterframeDependencies()
Read-only, CFBoolean
|
static CFStringRef |
kVTDecompressionPropertyKey_DeinterlaceMode()
Read/write, CFString; only applicable if kVTDecompressionPropertyKey_FieldMode is kVTDecompressionProperty_FieldMode_DeinterlaceFields; supported values may include:
|
static CFStringRef |
kVTDecompressionPropertyKey_FieldMode()
Read/write, CFString, one of
|
static CFStringRef |
kVTDecompressionPropertyKey_MaximizePowerEfficiency()
Read/write, CFBoolean or NULL, Optional, default is false
|
static CFStringRef |
kVTDecompressionPropertyKey_MaxOutputPresentationTimeStampOfFramesBeingDecoded()
Read-only, CMTime as CFDictionary.
|
static CFStringRef |
kVTDecompressionPropertyKey_MinOutputPresentationTimeStampOfFramesBeingDecoded()
Read-only, CMTime as CFDictionary.
|
static CFStringRef |
kVTDecompressionPropertyKey_NumberOfFramesBeingDecoded()
Read-only, CFNumber.
|
static CFStringRef |
kVTDecompressionPropertyKey_OnlyTheseFrames()
Read/write, CFString, supported values may include:
|
static CFStringRef |
kVTDecompressionPropertyKey_OutputPoolRequestedMinimumBufferCount()
Read/Write, CFNumberRef
|
static CFStringRef |
kVTDecompressionPropertyKey_PixelBufferPool()
Read-only, CVPixelBufferPool
|
static CFStringRef |
kVTDecompressionPropertyKey_PixelBufferPoolIsShared()
Read-only, CFBoolean
|
static CFStringRef |
kVTDecompressionPropertyKey_PixelFormatsWithReducedResolutionSupport()
Read-only, CFArray[CFNumber(CMPixelFormatType)], optional
|
static CFStringRef |
kVTDecompressionPropertyKey_PixelTransferProperties()
Read/Write, CFDictionary containing properties from VTPixelTransferProperties.h.
|
static CFStringRef |
kVTDecompressionPropertyKey_PropagatePerFrameHDRDisplayMetadata()
Read/write, CFBoolean, Optional, default is kCFBooleanTrue
|
static CFStringRef |
kVTDecompressionPropertyKey_RealTime()
Read/write, CFBoolean or NULL, Optional, default is true
|
static CFStringRef |
kVTDecompressionPropertyKey_ReducedCoefficientDecode()
Read/write, CFNumber
|
static CFStringRef |
kVTDecompressionPropertyKey_ReducedFrameDelivery()
Read/write, CFNumber in range [0.0,1.0].
|
static CFStringRef |
kVTDecompressionPropertyKey_ReducedResolutionDecode()
Read/write, CFDictionary containing width and height keys and CFNumber values:
|
static CFStringRef |
kVTDecompressionPropertyKey_SuggestedQualityOfServiceTiers()
Read-only, CFArray of CFDictionaries containing property key/value pairs
|
static CFStringRef |
kVTDecompressionPropertyKey_SupportedPixelFormatsOrderedByPerformance()
Read-only, CFArray[CFNumber(CMPixelFormatType)] ordered fast to slow, optional
|
static CFStringRef |
kVTDecompressionPropertyKey_SupportedPixelFormatsOrderedByQuality()
Read-only, CFArray[CFNumber(CMPixelFormatType)] ordered best to worst, optional
|
static CFStringRef |
kVTDecompressionPropertyKey_ThreadCount()
Read/write, CFNumber
|
static CFStringRef |
kVTDecompressionPropertyKey_UsingGPURegistryID()
CFNumberRef, Read;
|
static CFStringRef |
kVTDecompressionResolutionKey_Height()
CFNumber
|
static CFStringRef |
kVTDecompressionResolutionKey_Width()
CFNumber
|
static CFStringRef |
kVTDownsamplingMode_Average()
Average missing samples (default center)
|
static CFStringRef |
kVTDownsamplingMode_Decimate()
Default, decimate extra samples
|
static CFStringRef |
kVTEncodeFrameOptionKey_AcknowledgedLTRTokens()
CFArray[CFNumberRef], Optional
|
static CFStringRef |
kVTEncodeFrameOptionKey_BaseFrameQP()
CFNumberRef, Optional
|
static CFStringRef |
kVTEncodeFrameOptionKey_ForceKeyFrame()
CFBoolean
|
static CFStringRef |
kVTEncodeFrameOptionKey_ForceLTRRefresh()
CFNumberRef, Optional
|
static CFStringRef |
kVTH264EntropyMode_CABAC() |
static CFStringRef |
kVTH264EntropyMode_CAVLC() |
static CFStringRef |
kVTHDRMetadataInsertionMode_Auto() |
static CFStringRef |
kVTHDRMetadataInsertionMode_None() |
static CFStringRef |
kVTMultiPassStorageCreationOption_DoNotDelete()
CFBoolean, false by default.
|
static CFStringRef |
kVTPixelTransferPropertyKey_DestinationCleanAperture()
Read/write, CFDictionary with same keys as used in kCVImageBufferCleanApertureKey dictionary.
|
static CFStringRef |
kVTPixelTransferPropertyKey_DestinationColorPrimaries()
Read/write, CFString (see kCMFormatDescriptionExtension_ColorPrimaries), Optional
|
static CFStringRef |
kVTPixelTransferPropertyKey_DestinationICCProfile()
Read/write, CFData (see kCMFormatDescriptionExtension_ICCProfile), Optional
|
static CFStringRef |
kVTPixelTransferPropertyKey_DestinationPixelAspectRatio()
Read/write, CFDictionary with same keys as used in kCVImageBufferPixelAspectRatioKey dictionary.
|
static CFStringRef |
kVTPixelTransferPropertyKey_DestinationTransferFunction()
Read/write, CFString (see kCMFormatDescriptionExtension_TransferFunction), Optional
|
static CFStringRef |
kVTPixelTransferPropertyKey_DestinationYCbCrMatrix()
Read/write, CFString (see kCMFormatDescriptionExtension_YCbCrMatrix), Optional
|
static CFStringRef |
kVTPixelTransferPropertyKey_DownsamplingMode()
Read/write, CFStringRef, one of:
|
static CFStringRef |
kVTPixelTransferPropertyKey_RealTime()
Read/write, CFBoolean, default NULL
|
static CFStringRef |
kVTPixelTransferPropertyKey_ScalingMode()
Read/write, CFStringRef, one of kVTScalingMode_*
|
static CFStringRef |
kVTProfileLevel_H263_Profile0_Level10() |
static CFStringRef |
kVTProfileLevel_H263_Profile0_Level45() |
static CFStringRef |
kVTProfileLevel_H263_Profile3_Level45() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_1_3() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_3_0() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_3_1() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_3_2() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_4_0() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_4_1() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_4_2() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_5_0() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_5_1() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_5_2() |
static CFStringRef |
kVTProfileLevel_H264_Baseline_AutoLevel() |
static CFStringRef |
kVTProfileLevel_H264_ConstrainedBaseline_AutoLevel() |
static CFStringRef |
kVTProfileLevel_H264_ConstrainedHigh_AutoLevel() |
static CFStringRef |
kVTProfileLevel_H264_Extended_5_0() |
static CFStringRef |
kVTProfileLevel_H264_Extended_AutoLevel() |
static CFStringRef |
kVTProfileLevel_H264_High_3_0() |
static CFStringRef |
kVTProfileLevel_H264_High_3_1() |
static CFStringRef |
kVTProfileLevel_H264_High_3_2() |
static CFStringRef |
kVTProfileLevel_H264_High_4_0() |
static CFStringRef |
kVTProfileLevel_H264_High_4_1() |
static CFStringRef |
kVTProfileLevel_H264_High_4_2() |
static CFStringRef |
kVTProfileLevel_H264_High_5_0() |
static CFStringRef |
kVTProfileLevel_H264_High_5_1() |
static CFStringRef |
kVTProfileLevel_H264_High_5_2() |
static CFStringRef |
kVTProfileLevel_H264_High_AutoLevel() |
static CFStringRef |
kVTProfileLevel_H264_Main_3_0() |
static CFStringRef |
kVTProfileLevel_H264_Main_3_1() |
static CFStringRef |
kVTProfileLevel_H264_Main_3_2() |
static CFStringRef |
kVTProfileLevel_H264_Main_4_0() |
static CFStringRef |
kVTProfileLevel_H264_Main_4_1() |
static CFStringRef |
kVTProfileLevel_H264_Main_4_2() |
static CFStringRef |
kVTProfileLevel_H264_Main_5_0() |
static CFStringRef |
kVTProfileLevel_H264_Main_5_1() |
static CFStringRef |
kVTProfileLevel_H264_Main_5_2() |
static CFStringRef |
kVTProfileLevel_H264_Main_AutoLevel() |
static CFStringRef |
kVTProfileLevel_HEVC_Main_AutoLevel() |
static CFStringRef |
kVTProfileLevel_HEVC_Main10_AutoLevel() |
static CFStringRef |
kVTProfileLevel_MP4V_AdvancedSimple_L0() |
static CFStringRef |
kVTProfileLevel_MP4V_AdvancedSimple_L1() |
static CFStringRef |
kVTProfileLevel_MP4V_AdvancedSimple_L2() |
static CFStringRef |
kVTProfileLevel_MP4V_AdvancedSimple_L3() |
static CFStringRef |
kVTProfileLevel_MP4V_AdvancedSimple_L4() |
static CFStringRef |
kVTProfileLevel_MP4V_Main_L2() |
static CFStringRef |
kVTProfileLevel_MP4V_Main_L3() |
static CFStringRef |
kVTProfileLevel_MP4V_Main_L4() |
static CFStringRef |
kVTProfileLevel_MP4V_Simple_L0() |
static CFStringRef |
kVTProfileLevel_MP4V_Simple_L1() |
static CFStringRef |
kVTProfileLevel_MP4V_Simple_L2() |
static CFStringRef |
kVTProfileLevel_MP4V_Simple_L3() |
static CFStringRef |
kVTPropertyDocumentationKey()
a CFString for developer eyes only
|
static CFStringRef |
kVTPropertyReadWriteStatus_ReadOnly() |
static CFStringRef |
kVTPropertyReadWriteStatus_ReadWrite() |
static CFStringRef |
kVTPropertyReadWriteStatusKey() |
static CFStringRef |
kVTPropertyShouldBeSerializedKey()
CFBoolean, false by default
|
static CFStringRef |
kVTPropertySupportedValueListKey()
CFArray of appropriate values
|
static CFStringRef |
kVTPropertySupportedValueMaximumKey()
CFNumber
|
static CFStringRef |
kVTPropertySupportedValueMinimumKey()
CFNumber
|
static CFStringRef |
kVTPropertyType_Boolean()
value is a CFBoolean
|
static CFStringRef |
kVTPropertyType_Enumeration()
value is one of a list of CFStrings
|
static CFStringRef |
kVTPropertyType_Number()
value is a CFNumber
|
static CFStringRef |
kVTPropertyTypeKey()
value is CFStringRef, one of the following:
|
static CFStringRef |
kVTSampleAttachmentKey_RequireLTRAcknowledgementToken()
CFNumberRef, Optional
|
static CFStringRef |
kVTScalingMode_CropSourceToCleanAperture()
Crop to remove edge processing region; scale remainder to destination clean aperture.
|
static CFStringRef |
kVTScalingMode_Letterbox()
Preserve aspect ratio of the source, and fill remaining areas with black in to fit destination dimensions
|
static CFStringRef |
kVTScalingMode_Normal()
Copy full width and height.
|
static CFStringRef |
kVTScalingMode_Trim()
Preserve aspect ratio of the source, and crop picture to fit destination dimensions
|
static CFStringRef |
kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID()
CFNumber, Optional
|
static CFStringRef |
kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID()
CFNumber, Optional
|
static CFStringRef |
kVTVideoEncoderList_CodecName()
CFString, for display to user (eg, "H.264")
|
static CFStringRef |
kVTVideoEncoderList_CodecType()
CFNumber for four-char-code (eg, 'avc1')
|
static CFStringRef |
kVTVideoEncoderList_DisplayName()
CFString (same as CodecName if there is only one encoder for that format, otherwise same as EncoderName)
|
static CFStringRef |
kVTVideoEncoderList_EncoderID()
CFString, reverse-DNS-style unique identifier for this encoder; may be passed as kVTVideoEncoderSpecification_EncoderID
|
static CFStringRef |
kVTVideoEncoderList_EncoderName()
CFString, for display to user (eg, "Apple H.264")
|
static CFStringRef |
kVTVideoEncoderList_GPURegistryID()
optional.
|
static CFStringRef |
kVTVideoEncoderList_InstanceLimit()
optional.
|
static CFStringRef |
kVTVideoEncoderList_IsHardwareAccelerated()
optional.
|
static CFStringRef |
kVTVideoEncoderList_PerformanceRating()
optional.
|
static CFStringRef |
kVTVideoEncoderList_QualityRating()
optional.
|
static CFStringRef |
kVTVideoEncoderList_SupportedSelectionProperties()
optional.
|
static CFStringRef |
kVTVideoEncoderList_SupportsFrameReordering()
optional.
|
static CFStringRef |
kVTVideoEncoderListOption_IncludeStandardDefinitionDVEncoders()
optional.
|
static CFStringRef |
kVTVideoEncoderSpecification_EnableLowLatencyRateControl()
Read/write, CFBoolean, Optional
|
static CFStringRef |
kVTVideoEncoderSpecification_EncoderID()
CFString
|
static CFStringRef |
kVTVideoEncoderSpecification_PreferredEncoderGPURegistryID()
CFNumber, Optional
|
static CFStringRef |
kVTVideoEncoderSpecification_RequiredEncoderGPURegistryID()
CFNumber, Optional
|
static int |
VTCompressionSessionBeginPass(VTCompressionSessionRef session,
int beginPassFlags,
org.moe.natj.general.ptr.IntPtr reserved)
[@function] VTCompressionSessionBeginPass
|
static int |
VTCompressionSessionCompleteFrames(VTCompressionSessionRef session,
CMTime completeUntilPresentationTimeStamp)
[@function] VTCompressionSessionCompleteFrames
|
static int |
VTCompressionSessionCreate(CFAllocatorRef allocator,
int width,
int height,
int codecType,
CFDictionaryRef encoderSpecification,
CFDictionaryRef sourceImageBufferAttributes,
CFAllocatorRef compressedDataAllocator,
VideoToolbox.Function_VTCompressionSessionCreate outputCallback,
org.moe.natj.general.ptr.VoidPtr outputCallbackRefCon,
org.moe.natj.general.ptr.Ptr<VTCompressionSessionRef> compressionSessionOut)
[@function] VTCompressionSessionCreate
|
static int |
VTCompressionSessionEncodeFrame(VTCompressionSessionRef session,
CVBufferRef imageBuffer,
CMTime presentationTimeStamp,
CMTime duration,
CFDictionaryRef frameProperties,
org.moe.natj.general.ptr.VoidPtr sourceFrameRefcon,
org.moe.natj.general.ptr.IntPtr infoFlagsOut)
[@function] VTCompressionSessionEncodeFrame
|
static int |
VTCompressionSessionEncodeFrameWithOutputHandler(VTCompressionSessionRef session,
CVBufferRef imageBuffer,
CMTime presentationTimeStamp,
CMTime duration,
CFDictionaryRef frameProperties,
org.moe.natj.general.ptr.IntPtr infoFlagsOut,
VideoToolbox.Block_VTCompressionSessionEncodeFrameWithOutputHandler outputHandler)
[@function] VTCompressionSessionEncodeFrameWithOutputHandler
|
static int |
VTCompressionSessionEndPass(VTCompressionSessionRef session,
org.moe.natj.general.ptr.BytePtr furtherPassesRequestedOut,
org.moe.natj.general.ptr.IntPtr reserved)
[@function] VTCompressionSessionEndPass
|
static CVPixelBufferPoolRef |
VTCompressionSessionGetPixelBufferPool(VTCompressionSessionRef session)
[@function] VTCompressionSessionGetPixelBufferPool
|
static int |
VTCompressionSessionGetTimeRangesForNextPass(VTCompressionSessionRef session,
org.moe.natj.general.ptr.NIntPtr timeRangeCountOut,
org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.ConstPtr<CMTimeRange>> timeRangeArrayOut)
[@function] VTCompressionSessionGetTimeRangesForNextPass
|
static long |
VTCompressionSessionGetTypeID()
[@function] VTCompressionSessionGetTypeID
|
static void |
VTCompressionSessionInvalidate(VTCompressionSessionRef session)
[@function] VTCompressionSessionInvalidate
|
static int |
VTCompressionSessionPrepareToEncodeFrames(VTCompressionSessionRef session)
[@function] VTCompressionSessionPrepareToEncodeFrames
|
static int |
VTCopySupportedPropertyDictionaryForEncoder(int width,
int height,
int codecType,
CFDictionaryRef encoderSpecification,
org.moe.natj.general.ptr.Ptr<CFStringRef> encoderIDOut,
org.moe.natj.general.ptr.Ptr<CFDictionaryRef> supportedPropertiesOut)
[@function] VTCopySupportedPropertyDictionaryForEncoder
|
static int |
VTCopyVideoEncoderList(CFDictionaryRef options,
org.moe.natj.general.ptr.Ptr<CFArrayRef> listOfVideoEncodersOut)
[@function] VTCopyVideoEncoderList
|
static int |
VTCreateCGImageFromCVPixelBuffer(CVBufferRef pixelBuffer,
CFDictionaryRef options,
org.moe.natj.general.ptr.Ptr<CGImageRef> imageOut)
[@function] VTCreateCGImageFromCVPixelBuffer
|
static byte |
VTDecompressionSessionCanAcceptFormatDescription(VTDecompressionSessionRef session,
CMFormatDescriptionRef newFormatDesc)
[@function] VTDecompressionSessionCanAcceptFormatDescription
|
static int |
VTDecompressionSessionCopyBlackPixelBuffer(VTDecompressionSessionRef session,
org.moe.natj.general.ptr.Ptr<CVBufferRef> pixelBufferOut)
[@function] VTDecompressionSessionCopyBlackPixelBuffer
|
static int |
VTDecompressionSessionCreate(CFAllocatorRef allocator,
CMFormatDescriptionRef videoFormatDescription,
CFDictionaryRef videoDecoderSpecification,
CFDictionaryRef destinationImageBufferAttributes,
VTDecompressionOutputCallbackRecord outputCallback,
org.moe.natj.general.ptr.Ptr<VTDecompressionSessionRef> decompressionSessionOut)
[@function] VTDecompressionSessionCreate
|
static int |
VTDecompressionSessionDecodeFrame(VTDecompressionSessionRef session,
CMSampleBufferRef sampleBuffer,
int decodeFlags,
org.moe.natj.general.ptr.VoidPtr sourceFrameRefCon,
org.moe.natj.general.ptr.IntPtr infoFlagsOut)
[@function] VTDecompressionSessionDecodeFrame
|
static int |
VTDecompressionSessionDecodeFrameWithOutputHandler(VTDecompressionSessionRef session,
CMSampleBufferRef sampleBuffer,
int decodeFlags,
org.moe.natj.general.ptr.IntPtr infoFlagsOut,
VideoToolbox.Block_VTDecompressionSessionDecodeFrameWithOutputHandler outputHandler)
[@function] VTDecompressionSessionDecodeFrameWithOutputHandler
|
static int |
VTDecompressionSessionFinishDelayedFrames(VTDecompressionSessionRef session)
[@function] VTDecompressionSessionFinishDelayedFrames
|
static long |
VTDecompressionSessionGetTypeID()
[@function] VTDecompressionSessionGetTypeID
|
static void |
VTDecompressionSessionInvalidate(VTDecompressionSessionRef session)
[@function] VTDecompressionSessionInvalidate
|
static int |
VTDecompressionSessionWaitForAsynchronousFrames(VTDecompressionSessionRef session)
[@function] VTDecompressionSessionWaitForAsynchronousFrames
|
static int |
VTFrameSiloAddSampleBuffer(VTFrameSiloRef silo,
CMSampleBufferRef sampleBuffer)
[@function] VTFrameSiloAddSampleBuffer
|
static int |
VTFrameSiloCallBlockForEachSampleBuffer(VTFrameSiloRef silo,
CMTimeRange timeRange,
VideoToolbox.Block_VTFrameSiloCallBlockForEachSampleBuffer handler)
[@function] VTFrameSiloCallBlockForEachSampleBuffer
|
static int |
VTFrameSiloCallFunctionForEachSampleBuffer(VTFrameSiloRef silo,
CMTimeRange timeRange,
org.moe.natj.general.ptr.VoidPtr refcon,
VideoToolbox.Function_VTFrameSiloCallFunctionForEachSampleBuffer callback)
[@function] VTFrameSiloCallFunctionForEachSampleBuffer
|
static int |
VTFrameSiloCreate(CFAllocatorRef allocator,
CFURLRef fileURL,
CMTimeRange timeRange,
CFDictionaryRef options,
org.moe.natj.general.ptr.Ptr<VTFrameSiloRef> frameSiloOut)
[@function] VTFrameSiloCreate
|
static int |
VTFrameSiloGetProgressOfCurrentPass(VTFrameSiloRef silo,
org.moe.natj.general.ptr.FloatPtr progressOut)
[@function] VTFrameSiloGetProgressOfCurrentPass
|
static long |
VTFrameSiloGetTypeID() |
static int |
VTFrameSiloSetTimeRangesForNextPass(VTFrameSiloRef silo,
long timeRangeCount,
CMTimeRange timeRangeArray)
[@function] VTFrameSiloSetTimeRangesForNextPass
|
static byte |
VTIsHardwareDecodeSupported(int codecType)
[@function] VTIsHardwareDecodeSupported
|
static int |
VTMultiPassStorageClose(VTMultiPassStorageRef multiPassStorage)
[@function] VTMultiPassStorageClose
|
static int |
VTMultiPassStorageCreate(CFAllocatorRef allocator,
CFURLRef fileURL,
CMTimeRange timeRange,
CFDictionaryRef options,
org.moe.natj.general.ptr.Ptr<VTMultiPassStorageRef> multiPassStorageOut)
[@function] VTMultiPassStorageCreate
|
static long |
VTMultiPassStorageGetTypeID() |
static int |
VTSessionCopyProperty(org.moe.natj.general.ptr.ConstVoidPtr session,
CFStringRef propertyKey,
CFAllocatorRef allocator,
org.moe.natj.general.ptr.VoidPtr propertyValueOut)
[@function] VTSessionCopyProperty
|
static int |
VTSessionCopySerializableProperties(org.moe.natj.general.ptr.ConstVoidPtr session,
CFAllocatorRef allocator,
org.moe.natj.general.ptr.Ptr<CFDictionaryRef> dictionaryOut)
[@function] VTSessionCopySerializableProperties
|
static int |
VTSessionCopySupportedPropertyDictionary(org.moe.natj.general.ptr.ConstVoidPtr session,
org.moe.natj.general.ptr.Ptr<CFDictionaryRef> supportedPropertyDictionaryOut)
[@function] VTSessionCopySupportedPropertyDictionary
|
static int |
VTSessionSetProperties(org.moe.natj.general.ptr.ConstVoidPtr session,
CFDictionaryRef propertyDictionary)
[@function] VTSessionSetProperties
|
static int |
VTSessionSetProperty(org.moe.natj.general.ptr.ConstVoidPtr session,
CFStringRef propertyKey,
org.moe.natj.general.ptr.ConstVoidPtr propertyValue)
[@function] VTSessionSetProperty
|
public static int VTSessionCopySupportedPropertyDictionary(org.moe.natj.general.ptr.ConstVoidPtr session,
org.moe.natj.general.ptr.Ptr<CFDictionaryRef> supportedPropertyDictionaryOut)
Returns a dictionary enumerating all the supported properties of a video toolbox session.
The keys of the returned dictionary are the supported property keys. The values are themselves dictionaries, each containing the following optional fields:
public static int VTSessionSetProperty(org.moe.natj.general.ptr.ConstVoidPtr session,
CFStringRef propertyKey,
org.moe.natj.general.ptr.ConstVoidPtr propertyValue)
Sets a property on a video toolbox session.
Setting a property value to NULL restores the default value.
public static int VTSessionCopyProperty(org.moe.natj.general.ptr.ConstVoidPtr session,
CFStringRef propertyKey,
CFAllocatorRef allocator,
org.moe.natj.general.ptr.VoidPtr propertyValueOut)
Retrieves a property on a video toolbox session.
The caller must release the retrieved property value.
Note: for most types of property, the returned values should be considered immutable.
In particular, for CFPropertyList types, sharing of mutable property value
objects between the client, session and codec should be avoided.
However, some properties will be used for exchanging service objects that are inherently
mutable (eg, CVPixelBufferPool).
propertyValueOut - Points to a variable to receive the property value, which must be a CF-registered type --
the caller may call CFGetTypeID() on it to identify which specific type.
The caller must release the this property value.propertyKey - The key for the property to retrieve.allocator - An allocator suitable for use when copying property values.public static int VTSessionSetProperties(org.moe.natj.general.ptr.ConstVoidPtr session,
CFDictionaryRef propertyDictionary)
Sets multiple properties at once.
Sets the properties specified by keys in propertyDictionary to the corresponding values.
public static int VTSessionCopySerializableProperties(org.moe.natj.general.ptr.ConstVoidPtr session,
CFAllocatorRef allocator,
org.moe.natj.general.ptr.Ptr<CFDictionaryRef> dictionaryOut)
Retrieves the set of serializable property keys and their current values.
The serializable properties are those which can be saved and applied to a different session. The caller must release the returned dictionary.
public static int VTCompressionSessionCreate(CFAllocatorRef allocator, int width, int height, int codecType, CFDictionaryRef encoderSpecification, CFDictionaryRef sourceImageBufferAttributes, CFAllocatorRef compressedDataAllocator, VideoToolbox.Function_VTCompressionSessionCreate outputCallback, org.moe.natj.general.ptr.VoidPtr outputCallbackRefCon, org.moe.natj.general.ptr.Ptr<VTCompressionSessionRef> compressionSessionOut)
Creates a session for compressing video frames.
Compressed frames will be emitted through calls to outputCallback.
allocator - An allocator for the session. Pass NULL to use the default allocator.width - The width of frames, in pixels.
If the video encoder cannot support the provided width and height it may change them.height - The height of frames in pixels.cType - The codec type.encoderSpecification - Specifies a particular video encoder that must be used.
Pass NULL to let the video toolbox choose a encoder.sourceImageBufferAttributes - Required attributes for source pixel buffers, used when creating a pixel buffer pool
for source frames. If you do not want the Video Toolbox to create one for you, pass NULL.
(Using pixel buffers not allocated by the Video Toolbox may increase the chance that
it will be necessary to copy image data.)compressedDataAllocator - An allocator for the compressed data. Pass NULL to use the default allocator.
Note: on MacOS 10.12 and later, using a compressedDataAllocator may trigger an extra buffer copy.outputCallback - The callback to be called with compressed frames.
This function may be called asynchronously, on a different thread from the one that calls VTCompressionSessionEncodeFrame.
Pass NULL if and only if you will be calling VTCompressionSessionEncodeFrameWithOutputHandler for encoding frames.outputCallbackRefCon - Client-defined reference value for the output callback.compressionSessionOut - Points to a variable to receive the new compression session.public static void VTCompressionSessionInvalidate(VTCompressionSessionRef session)
Tears down a compression session.
When you are done with a compression session you created, call VTCompressionSessionInvalidate to tear it down and then CFRelease to release your object reference. When a compression session's retain count reaches zero, it is automatically invalidated, but since sessions may be retained by multiple parties, it can be hard to predict when this will happen. Calling VTCompressionSessionInvalidate ensures a deterministic, orderly teardown.
public static long VTCompressionSessionGetTypeID()
Returns the CFTypeID for compression sessions.
public static CVPixelBufferPoolRef VTCompressionSessionGetPixelBufferPool(VTCompressionSessionRef session)
Returns a pool that can provide ideal source pixel buffers for a compression session.
The compression session creates this pixel buffer pool based on
the compressor's pixel buffer attributes and any pixel buffer
attributes passed in to VTCompressionSessionCreate. If the
source pixel buffer attributes and the compressor pixel buffer
attributes cannot be reconciled, the pool is based on the source
pixel buffer attributes and the Video Toolbox converts each CVImageBuffer
internally.
While clients can call VTCompressionSessionGetPixelBufferPool once
and retain the resulting pool, the call is cheap enough that it's OK
to call it once per frame. If a change of session properties causes
the compressor's pixel buffer attributes to change, it's possible that
VTCompressionSessionGetPixelBufferPool might return a different pool.
public static int VTCompressionSessionPrepareToEncodeFrames(VTCompressionSessionRef session)
You can optionally call this function to provide the encoder with an opportunity to perform any necessary resource allocation before it begins encoding frames.
This optional call can be used to provide the encoder an opportunity to allocate any resources necessary before it begins encoding frames. If this isn't called, any necessary resources will be allocated on the first VTCompressionSessionEncodeFrame call. Extra calls to this function will have no effect.
session - The compression session.public static int VTCompressionSessionEncodeFrame(VTCompressionSessionRef session, CVBufferRef imageBuffer, CMTime presentationTimeStamp, CMTime duration, CFDictionaryRef frameProperties, org.moe.natj.general.ptr.VoidPtr sourceFrameRefcon, org.moe.natj.general.ptr.IntPtr infoFlagsOut)
Call this function to present frames to the compression session. Encoded frames may or may not be output before the function returns.
The client should not modify the pixel data after making this call. The session and/or encoder will retain the image buffer as long as necessary.
session - The compression session.imageBuffer - A CVImageBuffer containing a video frame to be compressed.
Must have a nonzero reference count.presentationTimeStamp - The presentation timestamp for this frame, to be attached to the sample buffer.
Each presentation timestamp passed to a session must be greater than the previous one.duration - The presentation duration for this frame, to be attached to the sample buffer.
If you do not have duration information, pass kCMTimeInvalid.frameProperties - Contains key/value pairs specifying additional properties for encoding this frame.
Note that some session properties may also be changed between frames.
Such changes have effect on subsequently encoded frames.sourceFrameRefcon - Your reference value for the frame, which will be passed to the output callback function.infoFlagsOut - Points to a VTEncodeInfoFlags to receive information about the encode operation.
The kVTEncodeInfo_Asynchronous bit may be set if the encode is (or was) running
asynchronously.
The kVTEncodeInfo_FrameDropped bit may be set if the frame was dropped (synchronously).
Pass NULL if you do not want to receive this information.public static int VTCompressionSessionEncodeFrameWithOutputHandler(VTCompressionSessionRef session, CVBufferRef imageBuffer, CMTime presentationTimeStamp, CMTime duration, CFDictionaryRef frameProperties, org.moe.natj.general.ptr.IntPtr infoFlagsOut, VideoToolbox.Block_VTCompressionSessionEncodeFrameWithOutputHandler outputHandler)
Call this function to present frames to the compression session. Encoded frames may or may not be output before the function returns.
The client should not modify the pixel data after making this call. The session and/or encoder will retain the image buffer as long as necessary. Cannot be called with a session created with a VTCompressionOutputCallback.
session - The compression session.imageBuffer - A CVImageBuffer containing a video frame to be compressed.
Must have a nonzero reference count.presentationTimeStamp - The presentation timestamp for this frame, to be attached to the sample buffer.
Each presentation timestamp passed to a session must be greater than the previous one.duration - The presentation duration for this frame, to be attached to the sample buffer.
If you do not have duration information, pass kCMTimeInvalid.frameProperties - Contains key/value pairs specifying additional properties for encoding this frame.
Note that some session properties may also be changed between frames.
Such changes have effect on subsequently encoded frames.infoFlagsOut - Points to a VTEncodeInfoFlags to receive information about the encode operation.
The kVTEncodeInfo_Asynchronous bit may be set if the encode is (or was) running
asynchronously.
The kVTEncodeInfo_FrameDropped bit may be set if the frame was dropped (synchronously).
Pass NULL if you do not want to receive this information.outputHandler - The block to be called when encoding the frame is completed.
This block may be called asynchronously, on a different thread from the one that calls VTCompressionSessionEncodeFrameWithOutputHandler.public static int VTCompressionSessionCompleteFrames(VTCompressionSessionRef session, CMTime completeUntilPresentationTimeStamp)
Forces the compression session to complete encoding frames.
If completeUntilPresentationTimeStamp is numeric, frames with presentation timestamps up to and including this timestamp will be emitted before the function returns. If completeUntilPresentationTimeStamp is non-numeric, all pending frames will be emitted before the function returns.
public static int VTCompressionSessionBeginPass(VTCompressionSessionRef session, int beginPassFlags, org.moe.natj.general.ptr.IntPtr reserved)
Call to announce the start of a specific compression pass.
During multi-pass encoding, this function must be called before VTCompressionSessionEncodeFrame. It is an error to call this function when multi-pass encoding has not been enabled by setting kVTCompressionPropertyKey_MultiPassStorage.
beginPassFlags - Pass kVTCompressionSessionBeginFinalPass to inform the encoder that the pass must be the final pass.public static int VTCompressionSessionEndPass(VTCompressionSessionRef session, org.moe.natj.general.ptr.BytePtr furtherPassesRequestedOut, org.moe.natj.general.ptr.IntPtr reserved)
Call to announce the end of a pass.
VTCompressionSessionEndPass can take a long time, since the video encoder may perform significant processing between passes. VTCompressionSessionEndPass will indicate via the furtherPassesRequestedOut argument whether the video encoder would like to perform another pass. There is no particular bound on the number of passes the video encoder may request, but the client is free to disregard this request and use the last-emitted set of frames. It is an error to call this function when multi-pass encoding has not been enabled by setting kVTCompressionPropertyKey_MultiPassStorage.
furtherPassesRequestedOut - Points to a Boolean that will be set to true if the video encoder would like to perform another pass, false otherwise.
You may pass NULL to indicate that the client is certain to use this as the final pass, in which case the video encoder can skip that evaluation step.public static int VTCompressionSessionGetTimeRangesForNextPass(VTCompressionSessionRef session, org.moe.natj.general.ptr.NIntPtr timeRangeCountOut, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.ConstPtr<CMTimeRange>> timeRangeArrayOut)
Retrieves the time ranges for the next pass.
If VTCompressionSessionEndPass sets *furtherPassesRequestedOut to true, call VTCompressionSessionGetTimeRangesForNextPass to find out the time ranges for the next pass. Source frames outside these time ranges should be skipped. Each time range is considered to include any frame at its start time and not to include any frame at its end time. It is an error to call this function when multi-pass encoding has not been enabled by setting kVTCompressionPropertyKey_MultiPassStorage, or when VTCompressionSessionEndPass did not set *furtherPassesRequestedOut to true.
timeRangeCountOut - Points to a CMItemCount to receive the number of CMTimeRanges.timeRangeArrayOut - Points to a const CMTimeRange * to receive a pointer to a C array of CMTimeRanges.
The storage for this array belongs to the VTCompressionSession and should not be modified.
The pointer will be valid until the next call to VTCompressionSessionEndPass, or until the VTCompressionSession is invalidated or finalized.public static int VTDecompressionSessionCreate(CFAllocatorRef allocator, CMFormatDescriptionRef videoFormatDescription, CFDictionaryRef videoDecoderSpecification, CFDictionaryRef destinationImageBufferAttributes, VTDecompressionOutputCallbackRecord outputCallback, org.moe.natj.general.ptr.Ptr<VTDecompressionSessionRef> decompressionSessionOut)
Creates a session for decompressing video frames.
Decompressed frames will be emitted through calls to outputCallback.
allocator - An allocator for the session. Pass NULL to use the default allocator.videoFormatDescription - Describes the source video frames.videoDecoderSpecification - Specifies a particular video decoder that must be used.
Pass NULL to let the video toolbox choose a decoder.destinationImageBufferAttributes - Describes requirements for emitted pixel buffers.
Pass NULL to set no requirements.outputCallback - The callback to be called with decompressed frames.
Pass NULL if and only if you will be calling VTDecompressionSessionDecodeFrameWithOutputHandler for decoding frames.decompressionSessionOut - Points to a variable to receive the new decompression session.public static void VTDecompressionSessionInvalidate(VTDecompressionSessionRef session)
Tears down a decompression session.
When you are done with a decompression session you created, call VTDecompressionSessionInvalidate to tear it down and then CFRelease to release your object reference. When a decompression session's retain count reaches zero, it is automatically invalidated, but since sessions may be retained by multiple parties, it can be hard to predict when this will happen. Calling VTDecompressionSessionInvalidate ensures a deterministic, orderly teardown.
public static long VTDecompressionSessionGetTypeID()
Returns the CFTypeID for decompression sessions.
public static int VTDecompressionSessionDecodeFrame(VTDecompressionSessionRef session, CMSampleBufferRef sampleBuffer, int decodeFlags, org.moe.natj.general.ptr.VoidPtr sourceFrameRefCon, org.moe.natj.general.ptr.IntPtr infoFlagsOut)
Decompresses a video frame.
If an error is returned from this function, there will be no callback. Otherwise the callback provided during VTDecompressionSessionCreate will be called.
session - The decompression session.sampleBuffer - A CMSampleBuffer containing one or more video frames.decodeFlags - A bitfield of directives to the decompression session and decoder.
The kVTDecodeFrame_EnableAsynchronousDecompression bit indicates whether the video decoder
may decompress the frame asynchronously.
The kVTDecodeFrame_EnableTemporalProcessing bit indicates whether the decoder may delay calls to the output callback
so as to enable processing in temporal (display) order.
If both flags are clear, the decompression shall complete and your output callback function will be called
before VTDecompressionSessionDecodeFrame returns.
If either flag is set, VTDecompressionSessionDecodeFrame may return before the output callback function is called.sourceFrameRefCon - Your reference value for the frame.
Note that if sampleBuffer contains multiple frames, the output callback function will be called
multiple times with this sourceFrameRefCon.infoFlagsOut - Points to a VTDecodeInfoFlags to receive information about the decode operation.
The kVTDecodeInfo_Asynchronous bit may be set if the decode is (or was) running
asynchronously.
The kVTDecodeInfo_FrameDropped bit may be set if the frame was dropped (synchronously).
Pass NULL if you do not want to receive this information.public static int VTDecompressionSessionDecodeFrameWithOutputHandler(VTDecompressionSessionRef session, CMSampleBufferRef sampleBuffer, int decodeFlags, org.moe.natj.general.ptr.IntPtr infoFlagsOut, VideoToolbox.Block_VTDecompressionSessionDecodeFrameWithOutputHandler outputHandler)
Decompresses a video frame.
Cannot be called with a session created with a VTDecompressionOutputCallbackRecord. If the VTDecompressionSessionDecodeFrameWithOutputHandler call returns an error, the block will not be called.
session - The decompression session.sampleBuffer - A CMSampleBuffer containing one or more video frames.decodeFlags - A bitfield of directives to the decompression session and decoder.
The kVTDecodeFrame_EnableAsynchronousDecompression bit indicates whether the video decoder
may decompress the frame asynchronously.
The kVTDecodeFrame_EnableTemporalProcessing bit indicates whether the decoder may delay calls to the output callback
so as to enable processing in temporal (display) order.
If both flags are clear, the decompression shall complete and your output callback function will be called
before VTDecompressionSessionDecodeFrame returns.
If either flag is set, VTDecompressionSessionDecodeFrame may return before the output callback function is called.infoFlagsOut - Points to a VTDecodeInfoFlags to receive information about the decode operation.
The kVTDecodeInfo_Asynchronous bit may be set if the decode is (or was) running
asynchronously.
The kVTDecodeInfo_FrameDropped bit may be set if the frame was dropped (synchronously).
Pass NULL if you do not want to receive this information.outputHandler - The block to be called when decoding the frame is completed. If the VTDecompressionSessionDecodeFrameWithOutputHandler
call returns an error, the block will not be called.public static int VTDecompressionSessionFinishDelayedFrames(VTDecompressionSessionRef session)
Directs the decompression session to emit all delayed frames.
By default, the decompression session may not delay frames indefinitely; frames may only be indefinitely delayed if the client opts in via kVTDecodeFrame_EnableTemporalProcessing. IMPORTANT NOTE: This function may return before all delayed frames are emitted. To wait for them, call VTDecompressionSessionWaitForAsynchronousFrames instead.
public static byte VTDecompressionSessionCanAcceptFormatDescription(VTDecompressionSessionRef session, CMFormatDescriptionRef newFormatDesc)
Indicates whether the session can decode frames with the given format description.
Some video decoders are able to accommodate minor changes in format without needing to be completely reset in a new session. This function can be used to test whether a format change is sufficiently minor.
public static int VTDecompressionSessionWaitForAsynchronousFrames(VTDecompressionSessionRef session)
Waits for any and all outstanding asynchronous and delayed frames to complete, then returns.
This function automatically calls VTDecompressionSessionFinishDelayedFrames, so clients don't have to call both.
public static int VTDecompressionSessionCopyBlackPixelBuffer(VTDecompressionSessionRef session, org.moe.natj.general.ptr.Ptr<CVBufferRef> pixelBufferOut)
Copies a black pixel buffer from the decompression session.
The pixel buffer is in the same format that the session is decompressing to.
session - The decompression session.pixelBufferOut - Points to a variable to receive the copied pixel buffer.public static long VTFrameSiloGetTypeID()
public static int VTFrameSiloCreate(CFAllocatorRef allocator, CFURLRef fileURL, CMTimeRange timeRange, CFDictionaryRef options, org.moe.natj.general.ptr.Ptr<VTFrameSiloRef> frameSiloOut)
Creates a VTFrameSilo object using a temporary file.
The returned VTFrameSilo object may be used to gather frames produced by multi-pass encoding.
fileURL - Specifies where to put the backing file for the VTFrameSilo object.
If you pass NULL for fileURL, the video toolbox will pick a unique temporary file name.options - Reserved, pass NULL.timeRange - The valid time range for the frame silo. Must be valid for progress reporting.frameSiloOut - Points to a VTFrameSiloRef to receive the newly created object.
Call CFRelease to release your retain on the created VTFrameSilo object when you are done with it.public static int VTFrameSiloAddSampleBuffer(VTFrameSiloRef silo, CMSampleBufferRef sampleBuffer)
Adds a sample buffer to a VTFrameSilo object.
Within each pass, sample buffers must have strictly increasing decode timestamps. Passes after the first pass are begun with a call to VTFrameSiloSetTimeRangesForNextPass. After a call to VTFrameSiloSetTimeRangesForNextPass, sample buffer decode timestamps must also be within the stated time ranges. Note that CMTimeRanges are considered to contain their start times but not their end times.
public static int VTFrameSiloSetTimeRangesForNextPass(VTFrameSiloRef silo, long timeRangeCount, CMTimeRange timeRangeArray)
Begins a new pass of samples to be added to a VTFrameSilo object.
Previously-added sample buffers with decode timestamps within the time ranges will be deleted from the VTFrameSilo. It is not necessary to call VTFrameSiloSetTimeRangesForNextPass before adding the first pass' sample buffers.
public static int VTFrameSiloGetProgressOfCurrentPass(VTFrameSiloRef silo, org.moe.natj.general.ptr.FloatPtr progressOut)
Gets the progress of the current pass.
Calculates the current progress based on the most recent sample buffer added and the current pass time ranges.
public static int VTFrameSiloCallFunctionForEachSampleBuffer(VTFrameSiloRef silo, CMTimeRange timeRange, org.moe.natj.general.ptr.VoidPtr refcon, VideoToolbox.Function_VTFrameSiloCallFunctionForEachSampleBuffer callback)
Retrieves sample buffers from a VTFrameSilo object.
You call this function to retrieve sample buffers at the end of a multi-pass compression session.
timeRange - The decode time range of sample buffers to retrieve.
Pass kCMTimeRangeInvalid to retrieve all sample buffers from the VTFrameSilo.callback - A function to be called, in decode order, with each sample buffer that was added.
To abort iteration early, return a nonzero status.
The VTFrameSilo may write sample buffers and data to the backing file between addition and retrieval;
do not expect to get identical object pointers back.public static int VTFrameSiloCallBlockForEachSampleBuffer(VTFrameSiloRef silo, CMTimeRange timeRange, VideoToolbox.Block_VTFrameSiloCallBlockForEachSampleBuffer handler)
Retrieves sample buffers from a VTFrameSilo object.
You call this function to retrieve sample buffers at the end of a multi-pass compression session.
timeRange - The decode time range of sample buffers to retrieve.
Pass kCMTimeRangeInvalid to retrieve all sample buffers from the VTFrameSilo.handler - A block to be called, in decode order, with each sample buffer that was added.
To abort iteration early, return a nonzero status.
The VTFrameSilo may write sample buffers and data to the backing file between addition and retrieval;
do not expect to get identical object pointers back.public static long VTMultiPassStorageGetTypeID()
public static int VTMultiPassStorageCreate(CFAllocatorRef allocator, CFURLRef fileURL, CMTimeRange timeRange, CFDictionaryRef options, org.moe.natj.general.ptr.Ptr<VTMultiPassStorageRef> multiPassStorageOut)
Creates a VTMultiPassStorage object using a temporary file.
The returned VTMultiPassStorage object may be used to perform multi-pass encoding; see kVTCompressionPropertyKey_MultiPassStorage. Call CFRelease to release your retain on the created VTMultiPassStorage object when you are done with it.
fileURL - Specifies where to put the backing file for the VTMultiPassStorage object.
If you pass NULL for fileURL, the video toolbox will pick a unique temporary file name.timeRange - Gives a hint to the multi pass storage about valid time stamps for data.options - If the file did not exist when the storage was created, the file will be deleted when the VTMultiPassStorage object is finalized, unless you set the kVTMultiPassStorageCreationOption_DoNotDelete option to kCFBooleanTrue in the options dictionary.public static int VTMultiPassStorageClose(VTMultiPassStorageRef multiPassStorage)
Ensures that any pending data is written to the multipass storage file and closes the file.
After this function is called, all methods on the multipass storage object will fail. It is still necessary to release the object by calling CFRelease.
public static int VTCopyVideoEncoderList(CFDictionaryRef options, org.moe.natj.general.ptr.Ptr<CFArrayRef> listOfVideoEncodersOut)
Builds a list of available video encoders.
The caller must CFRelease the returned list.
public static int VTCreateCGImageFromCVPixelBuffer(CVBufferRef pixelBuffer, CFDictionaryRef options, org.moe.natj.general.ptr.Ptr<CGImageRef> imageOut)
Creates a CGImage using the provided CVPixelBuffer
This routine creates a CGImage representation of the image data contained in the provided CVPixelBuffer. The source CVPixelBuffer may be retained for the lifetime of the CGImage. Changes to the CVPixelBuffer after making this call (other than releasing it) will have undefined results. Not all CVPixelBuffer pixel formats will support conversion into a CGImage compatible pixel format.
pixelBuffer - The pixelBuffer to be used as the image data source for the CGImage.options - no options currently. pass NULL.imageOut - pointer to an address to receive the newly created CGImage.public static CFStringRef kVTCompressionPropertyKey_NumberOfPendingFrames()
public static CFStringRef kVTCompressionPropertyKey_PixelBufferPoolIsShared()
public static CFStringRef kVTCompressionPropertyKey_VideoEncoderPixelBufferAttributes()
public static CFStringRef kVTCompressionPropertyKey_MaxKeyFrameInterval()
public static CFStringRef kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration()
public static CFStringRef kVTCompressionPropertyKey_AllowTemporalCompression()
public static CFStringRef kVTCompressionPropertyKey_AllowFrameReordering()
public static CFStringRef kVTCompressionPropertyKey_AverageBitRate()
public static CFStringRef kVTCompressionPropertyKey_DataRateLimits()
public static CFStringRef kVTCompressionPropertyKey_Quality()
public static CFStringRef kVTCompressionPropertyKey_MoreFramesBeforeStart()
public static CFStringRef kVTCompressionPropertyKey_MoreFramesAfterEnd()
public static CFStringRef kVTCompressionPropertyKey_ProfileLevel()
public static CFStringRef kVTProfileLevel_H264_Baseline_1_3()
public static CFStringRef kVTProfileLevel_H264_Baseline_3_0()
public static CFStringRef kVTProfileLevel_H264_Baseline_3_1()
public static CFStringRef kVTProfileLevel_H264_Baseline_3_2()
public static CFStringRef kVTProfileLevel_H264_Baseline_4_0()
public static CFStringRef kVTProfileLevel_H264_Baseline_4_1()
public static CFStringRef kVTProfileLevel_H264_Baseline_4_2()
public static CFStringRef kVTProfileLevel_H264_Baseline_5_0()
public static CFStringRef kVTProfileLevel_H264_Baseline_5_1()
public static CFStringRef kVTProfileLevel_H264_Baseline_5_2()
public static CFStringRef kVTProfileLevel_H264_Baseline_AutoLevel()
public static CFStringRef kVTProfileLevel_H264_Main_3_0()
public static CFStringRef kVTProfileLevel_H264_Main_3_1()
public static CFStringRef kVTProfileLevel_H264_Main_3_2()
public static CFStringRef kVTProfileLevel_H264_Main_4_0()
public static CFStringRef kVTProfileLevel_H264_Main_4_1()
public static CFStringRef kVTProfileLevel_H264_Main_4_2()
public static CFStringRef kVTProfileLevel_H264_Main_5_0()
public static CFStringRef kVTProfileLevel_H264_Main_5_1()
public static CFStringRef kVTProfileLevel_H264_Main_5_2()
public static CFStringRef kVTProfileLevel_H264_Main_AutoLevel()
public static CFStringRef kVTProfileLevel_H264_Extended_5_0()
public static CFStringRef kVTProfileLevel_H264_Extended_AutoLevel()
public static CFStringRef kVTProfileLevel_H264_High_3_0()
public static CFStringRef kVTProfileLevel_H264_High_3_1()
public static CFStringRef kVTProfileLevel_H264_High_3_2()
public static CFStringRef kVTProfileLevel_H264_High_4_0()
public static CFStringRef kVTProfileLevel_H264_High_4_1()
public static CFStringRef kVTProfileLevel_H264_High_4_2()
public static CFStringRef kVTProfileLevel_H264_High_5_0()
public static CFStringRef kVTProfileLevel_H264_High_5_1()
public static CFStringRef kVTProfileLevel_H264_High_5_2()
public static CFStringRef kVTProfileLevel_H264_High_AutoLevel()
public static CFStringRef kVTProfileLevel_MP4V_Simple_L0()
public static CFStringRef kVTProfileLevel_MP4V_Simple_L1()
public static CFStringRef kVTProfileLevel_MP4V_Simple_L2()
public static CFStringRef kVTProfileLevel_MP4V_Simple_L3()
public static CFStringRef kVTProfileLevel_MP4V_Main_L2()
public static CFStringRef kVTProfileLevel_MP4V_Main_L3()
public static CFStringRef kVTProfileLevel_MP4V_Main_L4()
public static CFStringRef kVTProfileLevel_MP4V_AdvancedSimple_L0()
public static CFStringRef kVTProfileLevel_MP4V_AdvancedSimple_L1()
public static CFStringRef kVTProfileLevel_MP4V_AdvancedSimple_L2()
public static CFStringRef kVTProfileLevel_MP4V_AdvancedSimple_L3()
public static CFStringRef kVTProfileLevel_MP4V_AdvancedSimple_L4()
public static CFStringRef kVTProfileLevel_H263_Profile0_Level10()
public static CFStringRef kVTProfileLevel_H263_Profile0_Level45()
public static CFStringRef kVTProfileLevel_H263_Profile3_Level45()
public static CFStringRef kVTCompressionPropertyKey_H264EntropyMode()
public static CFStringRef kVTH264EntropyMode_CAVLC()
public static CFStringRef kVTH264EntropyMode_CABAC()
public static CFStringRef kVTCompressionPropertyKey_Depth()
public static CFStringRef kVTCompressionPropertyKey_MaxFrameDelayCount()
public static CFStringRef kVTCompressionPropertyKey_MaxH264SliceBytes()
public static CFStringRef kVTCompressionPropertyKey_RealTime()
public static CFStringRef kVTCompressionPropertyKey_SourceFrameCount()
public static CFStringRef kVTCompressionPropertyKey_ExpectedFrameRate()
public static CFStringRef kVTCompressionPropertyKey_ExpectedDuration()
public static CFStringRef kVTEncodeFrameOptionKey_ForceKeyFrame()
public static CFStringRef kVTCompressionPropertyKey_CleanAperture()
public static CFStringRef kVTCompressionPropertyKey_PixelAspectRatio()
public static CFStringRef kVTCompressionPropertyKey_FieldCount()
public static CFStringRef kVTCompressionPropertyKey_FieldDetail()
public static CFStringRef kVTCompressionPropertyKey_AspectRatio16x9()
public static CFStringRef kVTCompressionPropertyKey_ProgressiveScan()
public static CFStringRef kVTCompressionPropertyKey_ColorPrimaries()
public static CFStringRef kVTCompressionPropertyKey_TransferFunction()
public static CFStringRef kVTCompressionPropertyKey_YCbCrMatrix()
public static CFStringRef kVTCompressionPropertyKey_ICCProfile()
public static CFStringRef kVTCompressionPropertyKey_PixelTransferProperties()
public static CFStringRef kVTCompressionPropertyKey_MultiPassStorage()
public static CFStringRef kVTPropertyTypeKey()
public static CFStringRef kVTPropertyType_Enumeration()
public static CFStringRef kVTPropertyType_Boolean()
public static CFStringRef kVTPropertyType_Number()
public static CFStringRef kVTPropertyReadWriteStatusKey()
public static CFStringRef kVTPropertyReadWriteStatus_ReadOnly()
public static CFStringRef kVTPropertyReadWriteStatus_ReadWrite()
public static CFStringRef kVTPropertyShouldBeSerializedKey()
public static CFStringRef kVTPropertySupportedValueMinimumKey()
public static CFStringRef kVTPropertySupportedValueMaximumKey()
public static CFStringRef kVTPropertySupportedValueListKey()
public static CFStringRef kVTPropertyDocumentationKey()
public static CFStringRef kVTVideoEncoderSpecification_EncoderID()
public static CFStringRef kVTDecompressionPropertyKey_PixelBufferPool()
public static CFStringRef kVTDecompressionPropertyKey_PixelBufferPoolIsShared()
public static CFStringRef kVTDecompressionPropertyKey_OutputPoolRequestedMinimumBufferCount()
public static CFStringRef kVTDecompressionPropertyKey_NumberOfFramesBeingDecoded()
public static CFStringRef kVTDecompressionPropertyKey_MinOutputPresentationTimeStampOfFramesBeingDecoded()
public static CFStringRef kVTDecompressionPropertyKey_MaxOutputPresentationTimeStampOfFramesBeingDecoded()
public static CFStringRef kVTDecompressionPropertyKey_ContentHasInterframeDependencies()
public static CFStringRef kVTDecompressionPropertyKey_RealTime()
public static CFStringRef kVTDecompressionPropertyKey_ThreadCount()
public static CFStringRef kVTDecompressionPropertyKey_FieldMode()
public static CFStringRef kVTDecompressionProperty_FieldMode_BothFields()
public static CFStringRef kVTDecompressionProperty_FieldMode_TopFieldOnly()
public static CFStringRef kVTDecompressionProperty_FieldMode_BottomFieldOnly()
public static CFStringRef kVTDecompressionProperty_FieldMode_SingleField()
public static CFStringRef kVTDecompressionProperty_FieldMode_DeinterlaceFields()
public static CFStringRef kVTDecompressionPropertyKey_DeinterlaceMode()
public static CFStringRef kVTDecompressionProperty_DeinterlaceMode_VerticalFilter()
public static CFStringRef kVTDecompressionProperty_DeinterlaceMode_Temporal()
public static CFStringRef kVTDecompressionPropertyKey_ReducedResolutionDecode()
public static CFStringRef kVTDecompressionResolutionKey_Width()
public static CFStringRef kVTDecompressionResolutionKey_Height()
public static CFStringRef kVTDecompressionPropertyKey_ReducedCoefficientDecode()
public static CFStringRef kVTDecompressionPropertyKey_ReducedFrameDelivery()
public static CFStringRef kVTDecompressionPropertyKey_OnlyTheseFrames()
public static CFStringRef kVTDecompressionProperty_OnlyTheseFrames_AllFrames()
public static CFStringRef kVTDecompressionProperty_OnlyTheseFrames_NonDroppableFrames()
public static CFStringRef kVTDecompressionProperty_OnlyTheseFrames_IFrames()
public static CFStringRef kVTDecompressionProperty_OnlyTheseFrames_KeyFrames()
public static CFStringRef kVTDecompressionPropertyKey_SuggestedQualityOfServiceTiers()
public static CFStringRef kVTDecompressionPropertyKey_SupportedPixelFormatsOrderedByQuality()
public static CFStringRef kVTDecompressionPropertyKey_SupportedPixelFormatsOrderedByPerformance()
public static CFStringRef kVTDecompressionPropertyKey_PixelFormatsWithReducedResolutionSupport()
public static CFStringRef kVTDecompressionPropertyKey_PixelTransferProperties()
public static CFStringRef kVTMultiPassStorageCreationOption_DoNotDelete()
public static CFStringRef kVTVideoEncoderList_CodecType()
public static CFStringRef kVTVideoEncoderList_EncoderID()
public static CFStringRef kVTVideoEncoderList_CodecName()
public static CFStringRef kVTVideoEncoderList_EncoderName()
public static CFStringRef kVTVideoEncoderList_DisplayName()
public static CFStringRef kVTPixelTransferPropertyKey_ScalingMode()
public static CFStringRef kVTScalingMode_Normal()
public static CFStringRef kVTScalingMode_CropSourceToCleanAperture()
public static CFStringRef kVTScalingMode_Letterbox()
public static CFStringRef kVTScalingMode_Trim()
public static CFStringRef kVTPixelTransferPropertyKey_DestinationCleanAperture()
public static CFStringRef kVTPixelTransferPropertyKey_DestinationPixelAspectRatio()
public static CFStringRef kVTPixelTransferPropertyKey_DownsamplingMode()
public static CFStringRef kVTDownsamplingMode_Decimate()
public static CFStringRef kVTDownsamplingMode_Average()
public static CFStringRef kVTPixelTransferPropertyKey_DestinationColorPrimaries()
public static CFStringRef kVTPixelTransferPropertyKey_DestinationTransferFunction()
public static CFStringRef kVTPixelTransferPropertyKey_DestinationICCProfile()
public static CFStringRef kVTPixelTransferPropertyKey_DestinationYCbCrMatrix()
public static byte VTIsHardwareDecodeSupported(int codecType)
Indicates whether the current system supports hardware decode for a given codec
This routine reports whether the current system supports hardware decode. Using this information, clients can make informed decisions regarding remote assets to load, favoring alternate encodings when hardware decode is not supported. This call returning true does not guarantee that hardware decode resources will be available at all times.
public static int VTCopySupportedPropertyDictionaryForEncoder(int width,
int height,
int codecType,
CFDictionaryRef encoderSpecification,
org.moe.natj.general.ptr.Ptr<CFStringRef> encoderIDOut,
org.moe.natj.general.ptr.Ptr<CFDictionaryRef> supportedPropertiesOut)
Builds a list of supported properties and encoder ID for an encoder
The caller must CFRelease the returned supported properties and encoder ID.
public static CFStringRef kVTProfileLevel_HEVC_Main_AutoLevel()
public static CFStringRef kVTProfileLevel_HEVC_Main10_AutoLevel()
public static CFStringRef kVTCompressionPropertyKey_BaseLayerFrameRate()
public static CFStringRef kVTCompressionPropertyKey_MasteringDisplayColorVolume()
public static CFStringRef kVTCompressionPropertyKey_ContentLightLevelInfo()
public static CFStringRef kVTCompressionPropertyKey_EncoderID()
public static CFStringRef kVTDecompressionProperty_TemporalLevelLimit()
public static CFStringRef kVTCompressionPropertyKey_AllowOpenGOP()
public static CFStringRef kVTCompressionPropertyKey_TargetQualityForAlpha()
public static CFStringRef kVTCompressionPropertyKey_MaximizePowerEfficiency()
public static CFStringRef kVTVideoEncoderSpecification_RequiredEncoderGPURegistryID()
public static CFStringRef kVTVideoEncoderSpecification_PreferredEncoderGPURegistryID()
public static CFStringRef kVTCompressionPropertyKey_UsingGPURegistryID()
public static CFStringRef kVTCompressionPropertyKey_GammaLevel()
public static CFStringRef kVTCompressionPropertyKey_AlphaChannelMode()
public static CFStringRef kVTAlphaChannelMode_StraightAlpha()
public static CFStringRef kVTAlphaChannelMode_PremultipliedAlpha()
public static CFStringRef kVTDecompressionPropertyKey_MaximizePowerEfficiency()
public static CFStringRef kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID()
public static CFStringRef kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID()
public static CFStringRef kVTDecompressionPropertyKey_UsingGPURegistryID()
public static CFStringRef kVTVideoEncoderList_GPURegistryID()
public static CFStringRef kVTVideoEncoderList_SupportedSelectionProperties()
public static CFStringRef kVTVideoEncoderList_PerformanceRating()
public static CFStringRef kVTVideoEncoderList_QualityRating()
public static CFStringRef kVTVideoEncoderList_InstanceLimit()
public static CFStringRef kVTVideoEncoderList_IsHardwareAccelerated()
public static CFStringRef kVTPixelTransferPropertyKey_RealTime()
public static CFStringRef kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality()
public static CFStringRef kVTCompressionPropertyKey_HDRMetadataInsertionMode()
public static CFStringRef kVTHDRMetadataInsertionMode_None()
public static CFStringRef kVTHDRMetadataInsertionMode_Auto()
public static CFStringRef kVTCompressionPropertyKey_PreserveDynamicHDRMetadata()
public static CFStringRef kVTDecompressionPropertyKey_PropagatePerFrameHDRDisplayMetadata()
public static CFStringRef kVTVideoEncoderList_SupportsFrameReordering()
public static CFStringRef kVTProfileLevel_H264_ConstrainedBaseline_AutoLevel()
public static CFStringRef kVTProfileLevel_H264_ConstrainedHigh_AutoLevel()
public static CFStringRef kVTCompressionPropertyKey_BaseLayerFrameRateFraction()
public static CFStringRef kVTCompressionPropertyKey_BaseLayerBitRateFraction()
public static CFStringRef kVTCompressionPropertyKey_SupportsBaseFrameQP()
public static CFStringRef kVTEncodeFrameOptionKey_BaseFrameQP()
public static CFStringRef kVTVideoEncoderSpecification_EnableLowLatencyRateControl()
public static CFStringRef kVTCompressionPropertyKey_MaxAllowedFrameQP()
public static CFStringRef kVTCompressionPropertyKey_EnableLTR()
public static CFStringRef kVTEncodeFrameOptionKey_AcknowledgedLTRTokens()
public static CFStringRef kVTEncodeFrameOptionKey_ForceLTRRefresh()
public static CFStringRef kVTSampleAttachmentKey_RequireLTRAcknowledgementToken()
public static CFStringRef kVTVideoEncoderListOption_IncludeStandardDefinitionDVEncoders()