| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 PLATFORM_FAILURE, | 39 PLATFORM_FAILURE, |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 // Interface for collaborating with picture interface to provide memory for | 42 // Interface for collaborating with picture interface to provide memory for |
| 43 // output picture and blitting them. | 43 // output picture and blitting them. |
| 44 // This interface is extended by the various layers that relay messages back | 44 // This interface is extended by the various layers that relay messages back |
| 45 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin | 45 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin |
| 46 // implements. | 46 // implements. |
| 47 class MEDIA_EXPORT Client { | 47 class MEDIA_EXPORT Client { |
| 48 public: | 48 public: |
| 49 virtual ~Client() {} | |
| 50 | |
| 51 // Callback to notify client that decoder has been initialized. | 49 // Callback to notify client that decoder has been initialized. |
| 52 virtual void NotifyInitializeDone() = 0; | 50 virtual void NotifyInitializeDone() = 0; |
| 53 | 51 |
| 54 // Callback to tell client how many and what size of buffers to provide. | 52 // Callback to tell client how many and what size of buffers to provide. |
| 55 virtual void ProvidePictureBuffers( | 53 virtual void ProvidePictureBuffers( |
| 56 uint32 requested_num_of_buffers, const gfx::Size& dimensions) = 0; | 54 uint32 requested_num_of_buffers, const gfx::Size& dimensions) = 0; |
| 57 | 55 |
| 58 // Callback to dismiss picture buffer that was assigned earlier. | 56 // Callback to dismiss picture buffer that was assigned earlier. |
| 59 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0; | 57 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0; |
| 60 | 58 |
| 61 // Callback to deliver decoded pictures ready to be displayed. | 59 // Callback to deliver decoded pictures ready to be displayed. |
| 62 virtual void PictureReady(const Picture& picture) = 0; | 60 virtual void PictureReady(const Picture& picture) = 0; |
| 63 | 61 |
| 64 // Callback to notify that decoded has decoded the end of the current | 62 // Callback to notify that decoded has decoded the end of the current |
| 65 // bitstream buffer. | 63 // bitstream buffer. |
| 66 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0; | 64 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) = 0; |
| 67 | 65 |
| 68 // Flush completion callback. | 66 // Flush completion callback. |
| 69 virtual void NotifyFlushDone() = 0; | 67 virtual void NotifyFlushDone() = 0; |
| 70 | 68 |
| 71 // Reset completion callback. | 69 // Reset completion callback. |
| 72 virtual void NotifyResetDone() = 0; | 70 virtual void NotifyResetDone() = 0; |
| 73 | 71 |
| 74 // Callback to notify about decoding errors. | 72 // Callback to notify about decoding errors. |
| 75 virtual void NotifyError(Error error) = 0; | 73 virtual void NotifyError(Error error) = 0; |
| 74 |
| 75 protected: |
| 76 virtual ~Client() {} |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 // Video decoder functions. | 79 // Video decoder functions. |
| 79 | 80 |
| 80 // Initializes the video decoder with specific configuration. | 81 // Initializes the video decoder with specific configuration. |
| 81 // Parameters: | 82 // Parameters: |
| 82 // |profile| is the video stream's format profile. | 83 // |profile| is the video stream's format profile. |
| 83 // | 84 // |
| 84 // Returns true when command successfully accepted. Otherwise false. | 85 // Returns true when command successfully accepted. Otherwise false. |
| 85 virtual bool Initialize(VideoCodecProfile profile) = 0; | 86 virtual bool Initialize(VideoCodecProfile profile) = 0; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 virtual void Destroy() = 0; | 129 virtual void Destroy() = 0; |
| 129 | 130 |
| 130 protected: | 131 protected: |
| 131 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; | 132 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; |
| 132 virtual ~VideoDecodeAccelerator(); | 133 virtual ~VideoDecodeAccelerator(); |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 } // namespace media | 136 } // namespace media |
| 136 | 137 |
| 137 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 138 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |