summaryrefslogtreecommitdiffstats
path: root/media/video/video_decode_accelerator.h
diff options
context:
space:
mode:
authorvrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 18:28:08 +0000
committervrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 18:28:08 +0000
commit1357ae79b9d474da177632a85227efb676c6d98e (patch)
tree558938eb3df48430f3864efe2563c848745683cf /media/video/video_decode_accelerator.h
parent2e095c8217b83f2daab9f1b970e943790de6b794 (diff)
downloadchromium_src-1357ae79b9d474da177632a85227efb676c6d98e.zip
chromium_src-1357ae79b9d474da177632a85227efb676c6d98e.tar.gz
chromium_src-1357ae79b9d474da177632a85227efb676c6d98e.tar.bz2
Implement VideoDecoder IPC hooks from plugin to GPU process
This implements the communciation layers from the Renderer process to the GPU process and back for the AcceleratedVideoDecoder PPAPI interfaces. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6876004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video/video_decode_accelerator.h')
-rw-r--r--media/video/video_decode_accelerator.h36
1 files changed, 19 insertions, 17 deletions
diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
index 20ebdd9..807f923 100644
--- a/media/video/video_decode_accelerator.h
+++ b/media/video/video_decode_accelerator.h
@@ -190,7 +190,7 @@ class VideoDecodeAccelerator {
// buffer to the decoder.
virtual void ProvidePictureBuffers(
uint32 requested_num_of_buffers,
- gfx::Size dimensions,
+ const gfx::Size& dimensions,
MemoryType type) = 0;
// Callback to dismiss picture buffer that was assigned earlier.
@@ -203,6 +203,16 @@ class VideoDecodeAccelerator {
// outputted all displayable pictures.
virtual void NotifyEndOfStream() = 0;
+ // Callback to notify that decoded has decoded the end of the current
+ // bitstream buffer.
+ virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0;
+
+ // Callback to notify that the outstanding flush has finished.
+ virtual void NotifyFlushDone() = 0;
+
+ // Callback to notify that the outstanding abort has finished.
+ virtual void NotifyAbortDone() = 0;
+
// Callback to notify about decoding errors.
virtual void NotifyError(Error error) = 0;
};
@@ -227,15 +237,13 @@ class VideoDecodeAccelerator {
virtual bool Initialize(const std::vector<uint32>& config) = 0;
// Decodes given bitstream buffer. Once decoder is done with processing
- // |bitstream_buffer| is will call |callback|.
+ // |bitstream_buffer| it will call NotifyEndOfBitstreamBuffer() with the
+ // bitstream buffer id.
// Parameters:
// |bitstream_buffer| is the input bitstream that is sent for decoding.
- // |callback| contains the callback function pointer for informing about
- // finished processing for |bitstream_buffer|.
//
// Returns true when command successfully accepted. Otherwise false.
- virtual bool Decode(const BitstreamBuffer& bitstream_buffer,
- VideoDecodeAcceleratorCallback* callback) = 0;
+ virtual bool Decode(const BitstreamBuffer& bitstream_buffer) = 0;
// Assigns a set of picture buffers to the video decoder.
// AssignGLESBuffers assigns texture-backed buffers.
@@ -257,29 +265,23 @@ class VideoDecodeAccelerator {
//
// Parameters:
// |picture_buffer_id| id of the picture buffer that is to be reused.
- virtual void ReusePictureBuffer(uint32 picture_buffer_id) = 0;
+ virtual void ReusePictureBuffer(int32 picture_buffer_id) = 0;
// Flushes the decoder. Flushing will result in output of the
// 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 the |callback|.
- //
- // Parameters:
- // |callback| contains the callback function pointer.
+ // flushing, the decode will call NotifyFlushDone().
//
// Returns true when command successfully accepted. Otherwise false.
- virtual bool Flush(VideoDecodeAcceleratorCallback* callback) = 0;
+ virtual bool Flush() = 0;
// Aborts the decoder. Decode will abort the decoding as soon as possible and
- // will not output anything. |callback| will be called as soon as abort has
+ // 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.
//
- // Parameters:
- // |callback| contains the callback function pointer.
- //
// Returns true when command successfully accepted. Otherwise false.
- virtual bool Abort(VideoDecodeAcceleratorCallback* callback) = 0;
+ virtual bool Abort() = 0;
};
} // namespace media