diff options
author | jiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 23:01:21 +0000 |
---|---|---|
committer | jiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 23:01:21 +0000 |
commit | 982e22ecdae6f67bc618de5c9b901c6ffdde9155 (patch) | |
tree | 16ff2f2edbee151956284ed0bfffc98c18c0b663 /media/tools | |
parent | e462cf5a08877ea4588e28221a5c03bca45ba67b (diff) | |
download | chromium_src-982e22ecdae6f67bc618de5c9b901c6ffdde9155.zip chromium_src-982e22ecdae6f67bc618de5c9b901c6ffdde9155.tar.gz chromium_src-982e22ecdae6f67bc618de5c9b901c6ffdde9155.tar.bz2 |
1. decoder interface now looks a little strange, until we refactoring.
2. first step to merge omx_decoder_engine/omx_codec by making omx_decoder_engine as simple as possible. Disable omx_codec_unittests during this process.
Review URL: http://codereview.chromium.org/2117020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r-- | media/tools/omx_test/omx_test.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/media/tools/omx_test/omx_test.cc b/media/tools/omx_test/omx_test.cc index 284572f..f12db14 100644 --- a/media/tools/omx_test/omx_test.cc +++ b/media/tools/omx_test/omx_test.cc @@ -98,7 +98,7 @@ class TestApp { input_format.video_header.height); } - void FeedCallback(Buffer* buffer) { + void FeedCompleteCallback(scoped_refptr<Buffer> buffer) { // We receive this callback when the decoder has consumed an input buffer. // In this case, delete the previous buffer and enqueue a new one. // There are some conditions we don't want to enqueue, for example when @@ -124,9 +124,6 @@ class TestApp { return; } - // Read one more from the decoder. - codec_->Read(NewCallback(this, &TestApp::ReadCompleteCallback)); - if (file_sink_.get()) file_sink_->BufferReady(buffer->nFilledLen, buffer->pBuffer); @@ -138,8 +135,7 @@ class TestApp { uint8* data; int read; file_reader_->Read(&data, &read); - codec_->Feed(new DataBuffer(data, read), - NewCallback(this, &TestApp::FeedCallback)); + codec_->Feed(new DataBuffer(data, read)); } void Run() { @@ -148,7 +144,9 @@ class TestApp { // Setup the |codec_| with the message loop of the current thread. Also // setup component name, codec format and callbacks. codec_ = new OmxCodec(&message_loop_); - codec_->Setup(configurator_.get()); + codec_->Setup(configurator_.get(), + NewCallback(this, &TestApp::FeedCompleteCallback), + NewCallback(this, &TestApp::ReadCompleteCallback)); codec_->SetErrorCallback(NewCallback(this, &TestApp::ErrorCallback)); codec_->SetFormatCallback(NewCallback(this, &TestApp::FormatCallback)); @@ -156,7 +154,6 @@ class TestApp { codec_->Start(); for (int i = 0; i < 20; ++i) FeedInputBuffer(); - codec_->Read(NewCallback(this, &TestApp::ReadCompleteCallback)); // Execute the message loop so that we can run tasks on it. This call // will return when we call message_loop_.Quit(). |