diff options
Diffstat (limited to 'include/media/stagefright/OMXCodec.h')
-rw-r--r-- | include/media/stagefright/OMXCodec.h | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index e541c18..392ea87 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -26,6 +26,7 @@ namespace android { +struct MediaCodecList; class MemoryDealer; struct OMXCodecObserver; struct CodecProfileLevel; @@ -82,12 +83,35 @@ struct OMXCodec : public MediaSource, // from MediaBufferObserver virtual void signalBufferReturned(MediaBuffer *buffer); + enum Quirks { + kNeedsFlushBeforeDisable = 1, + kWantsNALFragments = 2, + kRequiresLoadedToIdleAfterAllocation = 4, + kRequiresAllocateBufferOnInputPorts = 8, + kRequiresFlushCompleteEmulation = 16, + kRequiresAllocateBufferOnOutputPorts = 32, + kRequiresFlushBeforeShutdown = 64, + kDefersOutputBufferAllocation = 128, + kDecoderLiesAboutNumberOfChannels = 256, + kInputBufferSizesAreBogus = 512, + kSupportsMultipleFramesPerInputBuffer = 1024, + kAvoidMemcopyInputRecordingFrames = 2048, + kRequiresLargerEncoderOutputBuffer = 4096, + kOutputBuffersAreUnreadable = 8192, + }; + // for use by ACodec static void findMatchingCodecs( const char *mime, bool createEncoder, const char *matchComponentName, uint32_t flags, - Vector<String8> *matchingCodecs); + Vector<String8> *matchingCodecs, + Vector<uint32_t> *matchingCodecQuirks = NULL); + + static uint32_t getComponentQuirks( + const MediaCodecList *list, size_t index); + + static bool findCodecQuirks(const char *componentName, uint32_t *quirks); protected: virtual ~OMXCodec(); @@ -125,23 +149,6 @@ private: SHUTTING_DOWN, }; - enum Quirks { - kNeedsFlushBeforeDisable = 1, - kWantsNALFragments = 2, - kRequiresLoadedToIdleAfterAllocation = 4, - kRequiresAllocateBufferOnInputPorts = 8, - kRequiresFlushCompleteEmulation = 16, - kRequiresAllocateBufferOnOutputPorts = 32, - kRequiresFlushBeforeShutdown = 64, - kDefersOutputBufferAllocation = 128, - kDecoderLiesAboutNumberOfChannels = 256, - kInputBufferSizesAreBogus = 512, - kSupportsMultipleFramesPerInputBuffer = 1024, - kAvoidMemcopyInputRecordingFrames = 2048, - kRequiresLargerEncoderOutputBuffer = 4096, - kOutputBuffersAreUnreadable = 8192, - }; - enum BufferStatus { OWNED_BY_US, OWNED_BY_COMPONENT, @@ -327,9 +334,6 @@ private: status_t configureCodec(const sp<MetaData> &meta); - static uint32_t getComponentQuirks( - const char *componentName, bool isEncoder); - void restorePatchedDataPointer(BufferInfo *info); status_t applyRotation(); |