public final class MediaToolbox
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
MTAudioProcessingTapCreate(CFAllocatorRef allocator,
MTAudioProcessingTapCallbacks callbacks,
int flags,
org.moe.natj.general.ptr.Ptr<MTAudioProcessingTapRef> tapOut)
[@function] MTAudioProcessingTapCreate
|
static int |
MTAudioProcessingTapGetSourceAudio(MTAudioProcessingTapRef tap,
long numberFrames,
AudioBufferList bufferListInOut,
org.moe.natj.general.ptr.IntPtr flagsOut,
CMTimeRange timeRangeOut,
org.moe.natj.general.ptr.NIntPtr numberFramesOut)
[@function] MTAudioProcessingTapGetSourceAudio
|
static org.moe.natj.general.ptr.VoidPtr |
MTAudioProcessingTapGetStorage(MTAudioProcessingTapRef tap)
[@function] MTAudioProcessingTapGetStorage
|
static long |
MTAudioProcessingTapGetTypeID() |
static CFStringRef |
MTCopyLocalizedNameForMediaSubType(int mediaType,
int mediaSubType) |
static CFStringRef |
MTCopyLocalizedNameForMediaType(int mediaType) |
public static long MTAudioProcessingTapGetTypeID()
public static int MTAudioProcessingTapCreate(CFAllocatorRef allocator, MTAudioProcessingTapCallbacks callbacks, int flags, org.moe.natj.general.ptr.Ptr<MTAudioProcessingTapRef> tapOut)
Create a new processing tap.
This function creates a processing tap. The processing tap will then be used to process decoded data. The processing is performed on audio either before or after any effects or other processing (varispeed, etc) is applied by the audio queue.
allocator - The allocator to use to allocate memory for the new tap. Pass NULL or kCFAllocatorDefault to use the current default allocator.callbacks - Callbacks struct. MTAudioProcessingTap will make a copy of this struct.flags - Flags that are used to control aspects of the processing tap.
Valid flags are:
- kMTAudioProcessingTapCreationFlag_PreEffects:
processing is done before any further effects are applied by the audio queue to the audio.
- kMTAudioProcessingTapCreationFlag_PostEffects:
processing is done after all processing is done, including that of other taps.tapOut - The processing tap object.public static org.moe.natj.general.ptr.VoidPtr MTAudioProcessingTapGetStorage(MTAudioProcessingTapRef tap)
Used by a processing tap to retrieve a custom storage pointer.
tap - The processing tap.public static int MTAudioProcessingTapGetSourceAudio(MTAudioProcessingTapRef tap, long numberFrames, AudioBufferList bufferListInOut, org.moe.natj.general.ptr.IntPtr flagsOut, CMTimeRange timeRangeOut, org.moe.natj.general.ptr.NIntPtr numberFramesOut)
Used by a processing tap to retrieve source audio.
This function may only be called from the processing tap's callback.
tap - The processing tap.numberFrames - The number of frames the processing tap requires for its processing.bufferListInOut - The audio buffer list which will contain the source data.
On input, all fields except for the buffer pointers must be filled in.
If the buffer pointers are NULL (recommended), non-NULL pointers will be
returned and system owns the source buffers; these buffers are only applicable
for the duration of the processing tap callback.
If the buffer pointers are non-NULL, then they must be big enough to hold
numberFrames, and the source data will be copied into these buffers.flagsOut - Flags to describe state about the input requested, e.g., discontinuity/complete. Can be NULL.timeRangeOut - The asset time range corresponding to the provided source audio frames. Can be NULL.numberFramesOut - The number of source frames that have been provided. Can be NULL.
This can be less than the number of requested frames specified in numberFrames.public static CFStringRef MTCopyLocalizedNameForMediaType(int mediaType)
public static CFStringRef MTCopyLocalizedNameForMediaSubType(int mediaType, int mediaSubType)