From 15d511800510aeac104d1123d2a68bf4b5ba7331 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Thu, 15 Apr 2010 18:35:45 +0000 Subject: 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 --- media/tools/omx_test/omx_test.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'media/tools/omx_test/omx_test.cc') 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)); } -- cgit v1.1