diff options
author | jiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-27 16:38:55 +0000 |
---|---|---|
committer | jiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-27 16:38:55 +0000 |
commit | f8bb2b0094c03e6e75d05bcc963719430cdb5f23 (patch) | |
tree | d4880134030566d2bc25fe9e3c549b6c673de937 /media/tools/omx_test/omx_test.cc | |
parent | 238049450762af7812c709f14c623a6419f8cf81 (diff) | |
download | chromium_src-f8bb2b0094c03e6e75d05bcc963719430cdb5f23.zip chromium_src-f8bb2b0094c03e6e75d05bcc963719430cdb5f23.tar.gz chromium_src-f8bb2b0094c03e6e75d05bcc963719430cdb5f23.tar.bz2 |
Remove OmxSink interface because Buffer Allocation will go through Allocator in the future, and all allocation required parameters will be passed to "Allocator factory" during intiailized phase of render/decoder.
Remove OMX_BUFFERHEADERTYPE merge logic, this is based on assumptions that all vendor will use one frame per buffer scheme instead of one slice(multiple rows) per buffer which is specified by OpenMAX IL Spec.
Review URL: http://codereview.chromium.org/1786001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools/omx_test/omx_test.cc')
-rw-r--r-- | media/tools/omx_test/omx_test.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/media/tools/omx_test/omx_test.cc b/media/tools/omx_test/omx_test.cc index 947147e..284572f 100644 --- a/media/tools/omx_test/omx_test.cc +++ b/media/tools/omx_test/omx_test.cc @@ -20,7 +20,6 @@ #include "media/filters/bitstream_converter.h" #include "media/omx/omx_codec.h" #include "media/base/data_buffer.h" -#include "media/omx/omx_output_sink.h" #include "media/tools/omx_test/color_space_util.h" #include "media/tools/omx_test/file_reader_util.h" #include "media/tools/omx_test/file_sink.h" @@ -34,7 +33,6 @@ using media::OmxCodec; using media::OmxConfigurator; using media::OmxDecoderConfigurator; using media::OmxEncoderConfigurator; -using media::OmxOutputSink; using media::YuvFileReader; using media::Buffer; using media::DataBuffer; @@ -111,8 +109,7 @@ class TestApp { FeedInputBuffer(); } - void ReadCompleteCallback(int buffer, - FileSink::BufferUsedCallback* callback) { + void ReadCompleteCallback(OMX_BUFFERHEADERTYPE* buffer) { // This callback is received when the decoder has completed a decoding // task and given us some output data. The buffer is owned by the decoder. if (stopped_ || error_) @@ -122,7 +119,7 @@ class TestApp { first_sample_delivered_time_ = base::TimeTicks::HighResNow(); // If we are readding to the end, then stop. - if (buffer == OmxCodec::kEosBuffer) { + if (buffer == NULL) { codec_->Stop(NewCallback(this, &TestApp::StopCallback)); return; } @@ -131,7 +128,7 @@ class TestApp { codec_->Read(NewCallback(this, &TestApp::ReadCompleteCallback)); if (file_sink_.get()) - file_sink_->BufferReady(buffer, callback); + file_sink_->BufferReady(buffer->nFilledLen, buffer->pBuffer); // could OMX IL return patial sample for decoder? frame_count_++; @@ -151,7 +148,7 @@ 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(), file_sink_.get()); + codec_->Setup(configurator_.get()); codec_->SetErrorCallback(NewCallback(this, &TestApp::ErrorCallback)); codec_->SetFormatCallback(NewCallback(this, &TestApp::FormatCallback)); |