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

Unified Diff: media/tools/omx_test/file_sink.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.h ('k') | media/tools/omx_test/omx_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/omx_test/file_sink.cc
diff --git a/media/tools/omx_test/file_sink.cc b/media/tools/omx_test/file_sink.cc
index abee305443da599f2c4bd2b476acb6a25f577f63..219198072de90913e5609a08445d4b827dddfb58 100644
--- a/media/tools/omx_test/file_sink.cc
+++ b/media/tools/omx_test/file_sink.cc
@@ -10,36 +10,8 @@
namespace media {
-bool FileSink::AllocateEGLImages(int width, int height,
- std::vector<EGLImageKHR>* images) {
- NOTREACHED() << "This method is never used";
- return false;
-}
-
-void FileSink::ReleaseEGLImages(const std::vector<EGLImageKHR>& images) {
- NOTREACHED() << "This method is never used";
-}
-
-void FileSink::UseThisBuffer(int buffer_id, OMX_BUFFERHEADERTYPE* buffer) {
- CHECK(omx_buffers_.find(buffer_id) == omx_buffers_.end());
- omx_buffers_[buffer_id] = buffer;
-}
-
-void FileSink::StopUsingThisBuffer(int id) {
- omx_buffers_.erase(id);
-}
-
-void FileSink::BufferReady(int buffer_id, BufferUsedCallback* callback) {
- CHECK(omx_buffers_.find(buffer_id) != omx_buffers_.end());
- CHECK(callback);
-
- OMX_BUFFERHEADERTYPE* omx_buffer = omx_buffers_[buffer_id];
- uint8* buffer = omx_buffer->pBuffer;
- int size = omx_buffer->nFilledLen;
-
- // We never receive an end-of-stream buffer here.
- CHECK(!(omx_buffer->nFlags & OMX_BUFFERFLAG_EOS));
+void FileSink::BufferReady(int size, uint8* buffer) {
if (size > copy_buf_size_) {
copy_buf_.reset(new uint8[size]);
copy_buf_size_ = size;
@@ -62,10 +34,6 @@ void FileSink::BufferReady(int buffer_id, BufferUsedCallback* callback) {
if (output_file_.get())
fwrite(out_buffer, sizeof(uint8), size, output_file_.get());
-
- // Always make the callback.
- callback->Run(buffer_id);
- delete callback;
}
bool FileSink::Initialize() {
« no previous file with comments | « media/tools/omx_test/file_sink.h ('k') | media/tools/omx_test/omx_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698