Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Unified Diff: media/tools/omx_test/omx_test.cc

Issue 1786001: remove omx_sink and buffer merge (Closed)
Patch Set: one more missing Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/tools/omx_test/file_sink.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 947147ea3df6f30eccc617fb1a6012297e07f1e3..284572f63529a27910fbf4295023e005d5250508 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));
« no previous file with comments | « media/tools/omx_test/file_sink.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698