summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-06-04 19:35:18 -0700
committerLajos Molnar <lajos@google.com>2013-06-05 19:33:33 +0000
commit7f616d3cc5366a4b8af20d3d0c768e3de1df0666 (patch)
tree3e0ec5b23d861c03b8342c114649b1688cbe9909 /media/libstagefright/codecs/on2/h264dec/SoftAVC.h
parent50bdb73e04cbdf5a8da647f8830cd88663f20f14 (diff)
downloadframeworks_av-7f616d3cc5366a4b8af20d3d0c768e3de1df0666.zip
frameworks_av-7f616d3cc5366a4b8af20d3d0c768e3de1df0666.tar.gz
frameworks_av-7f616d3cc5366a4b8af20d3d0c768e3de1df0666.tar.bz2
stagefright: created SoftVideoDecoderOMXComponent
Created common base class for all software video decoders to make adding new features easier. Change-Id: Id89964e572d5cc5add02662273e6ae96c6b7eb12 Signed-off-by: Lajos Molnar <lajos@google.com>
Diffstat (limited to 'media/libstagefright/codecs/on2/h264dec/SoftAVC.h')
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.h28
1 files changed, 3 insertions, 25 deletions
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.h b/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
index 8c104c5..0ed7ebe 100644
--- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
+++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
@@ -18,7 +18,7 @@
#define SOFT_AVC_H_
-#include "SimpleSoftOMXComponent.h"
+#include "SoftVideoDecoderOMXComponent.h"
#include <utils/KeyedVector.h>
#include "H264SwDecApi.h"
@@ -26,7 +26,7 @@
namespace android {
-struct SoftAVC : public SimpleSoftOMXComponent {
+struct SoftAVC : public SoftVideoDecoderOMXComponent {
SoftAVC(const char *name,
const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData,
@@ -35,23 +35,12 @@ struct SoftAVC : public SimpleSoftOMXComponent {
protected:
virtual ~SoftAVC();
- virtual OMX_ERRORTYPE internalGetParameter(
- OMX_INDEXTYPE index, OMX_PTR params);
-
- virtual OMX_ERRORTYPE internalSetParameter(
- OMX_INDEXTYPE index, const OMX_PTR params);
-
- virtual OMX_ERRORTYPE getConfig(OMX_INDEXTYPE index, OMX_PTR params);
-
virtual void onQueueFilled(OMX_U32 portIndex);
virtual void onPortFlushCompleted(OMX_U32 portIndex);
- virtual void onPortEnableCompleted(OMX_U32 portIndex, bool enabled);
virtual void onReset();
private:
enum {
- kInputPortIndex = 0,
- kOutputPortIndex = 1,
kNumInputBuffers = 8,
kNumOutputBuffers = 2,
};
@@ -66,9 +55,7 @@ private:
size_t mInputBufferCount;
- uint32_t mWidth, mHeight, mPictureSize;
- uint32_t mCropLeft, mCropTop;
- uint32_t mCropWidth, mCropHeight;
+ uint32_t mPictureSize;
uint8_t *mFirstPicture;
int32_t mFirstPictureId;
@@ -82,18 +69,9 @@ private:
EOSStatus mEOSStatus;
- enum OutputPortSettingChange {
- NONE,
- AWAITING_DISABLED,
- AWAITING_ENABLED
- };
- OutputPortSettingChange mOutputPortSettingsChange;
-
bool mSignalledError;
- void initPorts();
status_t initDecoder();
- void updatePortDefinitions();
bool drainAllOutputBuffers();
void drainOneOutputBuffer(int32_t picId, uint8_t *data);
void saveFirstOutputBuffer(int32_t pidId, uint8_t *data);