diff options
| author | Yuanjun Huang <yuanjun.huang@intel.com> | 2015-07-01 02:41:11 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2015-07-01 08:34:37 -0700 |
| commit | 11c1c17fed35585f9256031ee70db1c6c18d0219 (patch) | |
| tree | 03775ce24bfe08f6aad7a476f9e1efa6e6271228 /videocodec/OMXVideoEncoderVP8.cpp | |
| parent | 94dc18063f6f0f60d99feaa0ffb1fc103d49c2c8 (diff) | |
| download | android_hardware_intel_common_omx-components-11c1c17fed35585f9256031ee70db1c6c18d0219.tar.gz android_hardware_intel_common_omx-components-11c1c17fed35585f9256031ee70db1c6c18d0219.tar.bz2 android_hardware_intel_common_omx-components-11c1c17fed35585f9256031ee70db1c6c18d0219.zip | |
Revert "omx-component: Adding media resource management support"
Bug: 20165724
A more comprehensive codec level resource manager is
implemented.
This reverts commit f832fbe64172f3dcde2bf8d7f960375efd8a30d9.
Change-Id: Ia45655873c9b7e9d57bed6c8d5dad29e219a2e3c
Diffstat (limited to 'videocodec/OMXVideoEncoderVP8.cpp')
| -rw-r--r-- | videocodec/OMXVideoEncoderVP8.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/videocodec/OMXVideoEncoderVP8.cpp b/videocodec/OMXVideoEncoderVP8.cpp index c78a0ad..ec1062d 100644 --- a/videocodec/OMXVideoEncoderVP8.cpp +++ b/videocodec/OMXVideoEncoderVP8.cpp @@ -4,10 +4,6 @@ static const char *VP8_MIME_TYPE = "video/x-vnd.on2.vp8"; -// VP8 encoder instance limitation -#define INSTANCE_LIMITATION 3 -static int gInstanceNumber = 0; - OMXVideoEncoderVP8::OMXVideoEncoderVP8() { LOGV("OMXVideoEncoderVP8 is constructed."); mLastTimestamp = 0x7FFFFFFFFFFFFFFFLL; @@ -18,7 +14,6 @@ OMXVideoEncoderVP8::OMXVideoEncoderVP8() { OMXVideoEncoderVP8::~OMXVideoEncoderVP8() { LOGV("OMXVideoEncoderVP8 is destructed."); - gInstanceNumber --; } OMX_ERRORTYPE OMXVideoEncoderVP8::InitOutputPortFormatSpecific(OMX_PARAM_PORTDEFINITIONTYPE *paramPortDefinitionOutput) { @@ -326,25 +321,4 @@ OMX_ERRORTYPE OMXVideoEncoderVP8::SetConfigVp8MaxFrameSizeRatio(OMX_PTR pStructu return OMX_ErrorNone; } -#define DECLARE_OMX_COMPONENT_VP8(NAME, ROLE, CLASS) \ - static const char *gName = (const char *)(NAME);\ - static const char *gRole = (const char *)(ROLE);\ - OMX_ERRORTYPE CreateInstance(OMX_PTR *instance) {\ - *instance = NULL;\ - if (gInstanceNumber + 1 > INSTANCE_LIMITATION) {\ - return OMX_ErrorInsufficientResources;\ - } else {\ - gInstanceNumber ++;\ - }\ - ComponentBase *inst = new CLASS;\ - if (!inst) {\ - return OMX_ErrorInsufficientResources;\ - }\ - *instance = inst;\ - return OMX_ErrorNone;\ - }\ - struct wrs_omxil_cmodule_ops_s gOps = {CreateInstance};\ - struct wrs_omxil_cmodule_s WRS_OMXIL_CMODULE_SYMBOL = {gName, &gRole, 1, &gOps}; - - -DECLARE_OMX_COMPONENT_VP8("OMX.Intel.VideoEncoder.VP8", "video_encoder.vp8", OMXVideoEncoderVP8); +DECLARE_OMX_COMPONENT("OMX.Intel.VideoEncoder.VP8", "video_encoder.vp8", OMXVideoEncoderVP8); |
