summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/codecs/on2/h264dec/SoftAVC.h')
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.h31
1 files changed, 5 insertions, 26 deletions
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.h b/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
index 879b014..ee69926 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,22 +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,
};
@@ -65,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;
@@ -81,19 +69,10 @@ private:
EOSStatus mEOSStatus;
- enum OutputPortSettingChange {
- NONE,
- AWAITING_DISABLED,
- AWAITING_ENABLED
- };
- OutputPortSettingChange mOutputPortSettingsChange;
-
bool mSignalledError;
- void initPorts();
status_t initDecoder();
- void updatePortDefinitions();
- bool drainAllOutputBuffers();
+ void drainAllOutputBuffers(bool eos);
void drainOneOutputBuffer(int32_t picId, uint8_t *data);
void saveFirstOutputBuffer(int32_t pidId, uint8_t *data);
bool handleCropRectEvent(const CropParams* crop);