mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1133633: Part2. Enable async decoding on mac. r=mattmoodrow
This commit is contained in:
parent
624eb59f55
commit
a288b721e4
@ -211,7 +211,7 @@ AppleVTDecoder::SubmitFrame(mp4_demuxer::MP4Sample* aSample)
|
||||
// For some reason this gives me a double-free error with stagefright.
|
||||
AutoCFRelease<CMBlockBufferRef> block = nullptr;
|
||||
AutoCFRelease<CMSampleBufferRef> sample = nullptr;
|
||||
VTDecodeInfoFlags flags;
|
||||
VTDecodeInfoFlags infoFlags;
|
||||
OSStatus rv;
|
||||
|
||||
// FIXME: This copies the sample data. I think we can provide
|
||||
@ -237,12 +237,15 @@ AppleVTDecoder::SubmitFrame(mp4_demuxer::MP4Sample* aSample)
|
||||
NS_ERROR("Couldn't create CMSampleBuffer");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
VTDecodeFrameFlags decodeFlags =
|
||||
kVTDecodeFrame_EnableAsynchronousDecompression;
|
||||
rv = VTDecompressionSessionDecodeFrame(mSession,
|
||||
sample,
|
||||
0,
|
||||
decodeFlags,
|
||||
CreateAppleFrameRef(aSample),
|
||||
&flags);
|
||||
if (rv != noErr && !(flags & kVTDecodeInfo_FrameDropped)) {
|
||||
&infoFlags);
|
||||
if (rv != noErr && !(infoFlags & kVTDecodeInfo_FrameDropped)) {
|
||||
NS_WARNING("Couldn't pass frame to decoder");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -25,6 +25,12 @@ enum {
|
||||
kVTDecodeInfo_Asynchronous = 1UL << 0,
|
||||
kVTDecodeInfo_FrameDropped = 1UL << 1,
|
||||
};
|
||||
enum {
|
||||
kVTDecodeFrame_EnableAsynchronousDecompression = 1<<0,
|
||||
kVTDecodeFrame_DoNotOutputFrame = 1<<1,
|
||||
kVTDecodeFrame_1xRealTimePlayback = 1<<2,
|
||||
kVTDecodeFrame_EnableTemporalProcessing = 1<<3,
|
||||
};
|
||||
|
||||
typedef CFTypeRef VTSessionRef;
|
||||
typedef struct OpaqueVTDecompressionSession* VTDecompressionSessionRef;
|
||||
|
Loading…
Reference in New Issue
Block a user