diff options
author | wjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 17:46:05 +0000 |
---|---|---|
committer | wjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 17:46:05 +0000 |
commit | d3291d979e224c6c5fbad3b577297302f13bb7d8 (patch) | |
tree | c2dd3f643a79dc129675a09d60aa44d78cc78b0a /media | |
parent | b6ab13fda73f81f7fa93dcc3ad33cd4cd8cdb82b (diff) | |
download | chromium_src-d3291d979e224c6c5fbad3b577297302f13bb7d8.zip chromium_src-d3291d979e224c6c5fbad3b577297302f13bb7d8.tar.gz chromium_src-d3291d979e224c6c5fbad3b577297302f13bb7d8.tar.bz2 |
temporary fix for OMX port setting change event
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/2868050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/omx_video_decode_engine.cc | 20 | ||||
-rw-r--r-- | media/filters/omx_video_decode_engine.h | 2 |
2 files changed, 15 insertions, 7 deletions
diff --git a/media/filters/omx_video_decode_engine.cc b/media/filters/omx_video_decode_engine.cc index 8110cd8..db5b402 100644 --- a/media/filters/omx_video_decode_engine.cc +++ b/media/filters/omx_video_decode_engine.cc @@ -672,8 +672,8 @@ void OmxVideoDecodeEngine::FillThisBuffer( } // Reconfigure port -void OmxVideoDecodeEngine::OnPortSettingsChangedRun(OMX_INDEXTYPE index, - int port) { +void OmxVideoDecodeEngine::OnPortSettingsChangedRun(int port, + OMX_INDEXTYPE index) { DCHECK_EQ(message_loop_, MessageLoop::current()); DCHECK_EQ(client_state_, kClientRunning); DCHECK_EQ(port, output_port_); @@ -684,8 +684,11 @@ void OmxVideoDecodeEngine::OnPortSettingsChangedRun(OMX_INDEXTYPE index, return; } - if (index != OMX_IndexParamPortDefinition) - return; + // TODO(wjia): remove this checking when all vendors observe same spec. + if (index > OMX_IndexComponentStartUnused) { + if (index != OMX_IndexParamPortDefinition) + return; + } OMX_PARAM_PORTDEFINITIONTYPE port_format; ResetParamHeader(*this, &port_format); @@ -1297,8 +1300,13 @@ void OmxVideoDecodeEngine::EventHandlerCompleteTask(OMX_EVENTTYPE event, StopOnError(); break; case OMX_EventPortSettingsChanged: - OnPortSettingsChangedRun(static_cast<OMX_INDEXTYPE>(data1), - static_cast<int>(data2)); + // TODO(wjia): remove this hack when all vendors observe same spec. + if (data1 < OMX_IndexComponentStartUnused) + OnPortSettingsChangedRun(static_cast<int>(data1), + static_cast<OMX_INDEXTYPE>(data2)); + else + OnPortSettingsChangedRun(static_cast<int>(data2), + static_cast<OMX_INDEXTYPE>(data1)); break; default: LOG(ERROR) << "Warning - Unknown event received\n"; diff --git a/media/filters/omx_video_decode_engine.h b/media/filters/omx_video_decode_engine.h index 24ee407..7c1644f 100644 --- a/media/filters/omx_video_decode_engine.h +++ b/media/filters/omx_video_decode_engine.h @@ -105,7 +105,7 @@ class OmxVideoDecodeEngine : bool CreateComponent(); void DoneSetStateIdle(OMX_STATETYPE state); void DoneSetStateExecuting(OMX_STATETYPE state); - void OnPortSettingsChangedRun(OMX_INDEXTYPE index, int port); + void OnPortSettingsChangedRun(int port, OMX_INDEXTYPE index); void OnPortDisableEventRun(int port); void SetupOutputPort(); void OnPortEnableEventRun(int port); |