diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 18:35:45 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 18:35:45 +0000 |
commit | 15d511800510aeac104d1123d2a68bf4b5ba7331 (patch) | |
tree | 45d432467cd852f666fc7e1bd07a99684a1eea3b /media/tools/omx_test/omx_test.cc | |
parent | 79c2b56bcad7b23ccc25d2bc934887ea080b7a9d (diff) | |
download | chromium_src-15d511800510aeac104d1123d2a68bf4b5ba7331.zip chromium_src-15d511800510aeac104d1123d2a68bf4b5ba7331.tar.gz chromium_src-15d511800510aeac104d1123d2a68bf4b5ba7331.tar.bz2 |
Remove 2 memcpy() in the OpenMAX code path
Reviewed: http://codereview.chromium.org/1620012
Submitted for: wjia@chromium.org
This also fixes new/delete mismatch in the last commit by
using scoped_array for data.
Review URL: http://codereview.chromium.org/1630026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44677 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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/media/tools/omx_test/omx_test.cc b/media/tools/omx_test/omx_test.cc index e90f150..947147e 100644 --- a/media/tools/omx_test/omx_test.cc +++ b/media/tools/omx_test/omx_test.cc @@ -19,7 +19,7 @@ #include "media/ffmpeg/file_protocol.h" #include "media/filters/bitstream_converter.h" #include "media/omx/omx_codec.h" -#include "media/omx/omx_input_buffer.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" @@ -34,9 +34,10 @@ using media::OmxCodec; using media::OmxConfigurator; using media::OmxDecoderConfigurator; using media::OmxEncoderConfigurator; -using media::OmxInputBuffer; using media::OmxOutputSink; using media::YuvFileReader; +using media::Buffer; +using media::DataBuffer; // This is the driver object to feed the decoder with data from a file. // It also provides callbacks for the decoder to receive events from the @@ -99,7 +100,7 @@ class TestApp { input_format.video_header.height); } - void FeedCallback(OmxInputBuffer* buffer) { + void FeedCallback(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 @@ -140,7 +141,7 @@ class TestApp { uint8* data; int read; file_reader_->Read(&data, &read); - codec_->Feed(new OmxInputBuffer(data, read), + codec_->Feed(new DataBuffer(data, read), NewCallback(this, &TestApp::FeedCallback)); } |