summaryrefslogtreecommitdiffstats
path: root/media/video
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-29 17:47:01 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-29 17:47:01 +0000
commit890e8966414165e59418b7886778cbd16cc194ac (patch)
tree3e0de593dd21b86879bd09d228a090f8af105564 /media/video
parent32fcb896c5d34a483c3adbdec90badbddd54d7d8 (diff)
downloadchromium_src-890e8966414165e59418b7886778cbd16cc194ac.zip
chromium_src-890e8966414165e59418b7886778cbd16cc194ac.tar.gz
chromium_src-890e8966414165e59418b7886778cbd16cc194ac.tar.bz2
Implement proper synchronization between HW video decode IPC and CommandBuffer.
This is done by inserting tokens into the command-buffer stream when synchronization is needed, and adding a last-read/last-written token pair to each IPC message. This allowed me to remove the bogus FinishGL() calls from the gles2 sample pepper plugin. As part of this CL, the return value for VideoDecodeAccelerator::{Decode,Flush,Abort} changed from bool to void. These are all async methods so errors ought to be signaled using callbacks. BUG=none TEST=gles2 works, no crashes; trybots Review URL: http://codereview.chromium.org/7260008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video')
-rw-r--r--media/video/video_decode_accelerator.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
index c50da97..ab0d471 100644
--- a/media/video/video_decode_accelerator.h
+++ b/media/video/video_decode_accelerator.h
@@ -255,9 +255,7 @@ class VideoDecodeAccelerator {
// bitstream buffer id.
// Parameters:
// |bitstream_buffer| is the input bitstream that is sent for decoding.
- //
- // Returns true when command successfully accepted. Otherwise false.
- virtual bool Decode(const BitstreamBuffer& bitstream_buffer) = 0;
+ virtual void Decode(const BitstreamBuffer& bitstream_buffer) = 0;
// Assigns a set of picture buffers to the video decoder.
// AssignGLESBuffers assigns texture-backed buffers.
@@ -285,17 +283,13 @@ class VideoDecodeAccelerator {
// pictures and buffers held inside the decoder and returning of bitstream
// buffers using the callbacks implemented by the plug-in. Once done with
// flushing, the decode will call NotifyFlushDone().
- //
- // Returns true when command successfully accepted. Otherwise false.
- virtual bool Flush() = 0;
+ virtual void Flush() = 0;
// Aborts the decoder. Decode will abort the decoding as soon as possible and
// will not output anything. NotifyAbortDone() is called as soon as abort has
// been finished. After abort all buffers can be considered dismissed, even
// when there has not been callbacks to dismiss them.
- //
- // Returns true when command successfully accepted. Otherwise false.
- virtual bool Abort() = 0;
+ virtual void Abort() = 0;
};
} // namespace media