Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications"
This commit is contained in:
@@ -303,7 +303,7 @@ private:
|
|||||||
bool flushPortAsync(OMX_U32 portIndex);
|
bool flushPortAsync(OMX_U32 portIndex);
|
||||||
|
|
||||||
void disablePortAsync(OMX_U32 portIndex);
|
void disablePortAsync(OMX_U32 portIndex);
|
||||||
void enablePortAsync(OMX_U32 portIndex);
|
status_t enablePortAsync(OMX_U32 portIndex);
|
||||||
|
|
||||||
static size_t countBuffersWeOwn(const Vector<BufferInfo> &buffers);
|
static size_t countBuffersWeOwn(const Vector<BufferInfo> &buffers);
|
||||||
static bool isIntermediateState(State state);
|
static bool isIntermediateState(State state);
|
||||||
|
|||||||
@@ -2452,13 +2452,16 @@ void OMXCodec::onCmdComplete(OMX_COMMANDTYPE cmd, OMX_U32 data) {
|
|||||||
mOutputPortSettingsHaveChanged = formatChanged;
|
mOutputPortSettingsHaveChanged = formatChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
enablePortAsync(portIndex);
|
status_t err = enablePortAsync(portIndex);
|
||||||
|
|
||||||
status_t err = allocateBuffersOnPort(portIndex);
|
|
||||||
|
|
||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
CODEC_LOGE("allocateBuffersOnPort failed (err = %d)", err);
|
CODEC_LOGE("enablePortAsync(%ld) failed (err = %d)", portIndex, err);
|
||||||
setState(ERROR);
|
setState(ERROR);
|
||||||
|
} else {
|
||||||
|
err = allocateBuffersOnPort(portIndex);
|
||||||
|
if (err != OK) {
|
||||||
|
CODEC_LOGE("allocateBuffersOnPort failed (err = %d)", err);
|
||||||
|
setState(ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2773,16 +2776,14 @@ void OMXCodec::disablePortAsync(OMX_U32 portIndex) {
|
|||||||
freeBuffersOnPort(portIndex, true);
|
freeBuffersOnPort(portIndex, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OMXCodec::enablePortAsync(OMX_U32 portIndex) {
|
status_t OMXCodec::enablePortAsync(OMX_U32 portIndex) {
|
||||||
CHECK(mState == EXECUTING || mState == RECONFIGURING);
|
CHECK(mState == EXECUTING || mState == RECONFIGURING);
|
||||||
|
|
||||||
CHECK_EQ((int)mPortStatus[portIndex], (int)DISABLED);
|
CHECK_EQ((int)mPortStatus[portIndex], (int)DISABLED);
|
||||||
mPortStatus[portIndex] = ENABLING;
|
mPortStatus[portIndex] = ENABLING;
|
||||||
|
|
||||||
CODEC_LOGV("sending OMX_CommandPortEnable(%ld)", portIndex);
|
CODEC_LOGV("sending OMX_CommandPortEnable(%ld)", portIndex);
|
||||||
status_t err =
|
return mOMX->sendCommand(mNode, OMX_CommandPortEnable, portIndex);
|
||||||
mOMX->sendCommand(mNode, OMX_CommandPortEnable, portIndex);
|
|
||||||
CHECK_EQ(err, (status_t)OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OMXCodec::fillOutputBuffers() {
|
void OMXCodec::fillOutputBuffers() {
|
||||||
|
|||||||
Reference in New Issue
Block a user