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

Unified Diff: media/filters/omx_video_decoder.cc

Issue 3030013: preparation for recycling buffer, patch 2 (Closed)
Patch Set: fix layout test Created 10 years, 4 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/filters/omx_video_decoder.h ('k') | media/filters/video_decode_engine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/omx_video_decoder.cc
diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc
index f36a3055c95c7fd59e0e6ba3c559e21f77114e75..3617ba3d1078a1e7dc061eb81c4f11ba7ef669fd 100644
--- a/media/filters/omx_video_decoder.cc
+++ b/media/filters/omx_video_decoder.cc
@@ -72,6 +72,11 @@ void OmxVideoDecoder::FillThisBuffer(scoped_refptr<VideoFrame> frame) {
&OmxVideoDecodeEngine::FillThisBuffer, frame));
}
+bool OmxVideoDecoder::ProvidesBuffer() {
+ if (!omx_engine_.get()) return false;
+ return omx_engine_->ProvidesBuffer();
+}
+
void OmxVideoDecoder::Stop(FilterCallback* callback) {
omx_engine_->Stop(
NewRunnableMethod(this,
@@ -92,9 +97,19 @@ void OmxVideoDecoder::PauseCompleteTask(FilterCallback* callback) {
AutoCallbackRunner done_runner(callback);
}
+void OmxVideoDecoder::Flush(FilterCallback* callback) {
+ omx_engine_->Flush(
+ NewRunnableMethod(this,
+ &OmxVideoDecoder::FlushCompleteTask, callback));
+}
+
+void OmxVideoDecoder::FlushCompleteTask(FilterCallback* callback) {
+ AutoCallbackRunner done_runner(callback);
+}
+
void OmxVideoDecoder::Seek(base::TimeDelta time,
FilterCallback* callback) {
- omx_engine_->Flush(
+ omx_engine_->Seek(
NewRunnableMethod(this,
&OmxVideoDecoder::SeekCompleteTask, callback));
}
« no previous file with comments | « media/filters/omx_video_decoder.h ('k') | media/filters/video_decode_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698