Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ENCODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
| 6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 virtual void RequireBitstreamBuffers(unsigned int input_count, | 72 virtual void RequireBitstreamBuffers(unsigned int input_count, |
| 73 const gfx::Size& input_coded_size, | 73 const gfx::Size& input_coded_size, |
| 74 size_t output_buffer_size) = 0; | 74 size_t output_buffer_size) = 0; |
| 75 | 75 |
| 76 // Callback to deliver encoded bitstream buffers. Ownership of the buffer | 76 // Callback to deliver encoded bitstream buffers. Ownership of the buffer |
| 77 // is transferred back to the VEA::Client once this callback is made. | 77 // is transferred back to the VEA::Client once this callback is made. |
| 78 // Parameters: | 78 // Parameters: |
| 79 // |bitstream_buffer_id| is the id of the buffer that is ready. | 79 // |bitstream_buffer_id| is the id of the buffer that is ready. |
| 80 // |payload_size| is the byte size of the used portion of the buffer. | 80 // |payload_size| is the byte size of the used portion of the buffer. |
| 81 // |key_frame| is true if this delivered frame is a keyframe. | 81 // |key_frame| is true if this delivered frame is a keyframe. |
| 82 // |timestamp| is the same timestamp VideoFrame passed to Encode(). | |
|
Pawel Osciak
2016/05/27 04:46:38
s/timestamp VideoFrame/timestamp as in VideoFrame/
shenghao
2016/05/30 09:18:02
Done.
| |
| 82 virtual void BitstreamBufferReady(int32_t bitstream_buffer_id, | 83 virtual void BitstreamBufferReady(int32_t bitstream_buffer_id, |
| 83 size_t payload_size, | 84 size_t payload_size, |
| 84 bool key_frame) = 0; | 85 bool key_frame, |
| 86 base::TimeDelta timestamp) = 0; | |
| 85 | 87 |
| 86 // Error notification callback. Note that errors in Initialize() will not be | 88 // Error notification callback. Note that errors in Initialize() will not be |
| 87 // reported here, but will instead be indicated by a false return value | 89 // reported here, but will instead be indicated by a false return value |
| 88 // there. | 90 // there. |
| 89 virtual void NotifyError(Error error) = 0; | 91 virtual void NotifyError(Error error) = 0; |
| 90 | 92 |
| 91 protected: | 93 protected: |
| 92 // Clients are not owned by VEA instances and should not be deleted through | 94 // Clients are not owned by VEA instances and should not be deleted through |
| 93 // these pointers. | 95 // these pointers. |
| 94 virtual ~Client() {} | 96 virtual ~Client() {} |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 // std::unique_ptr<VideoEncodeAccelerator> uses "Destroy()" instead of trying to | 166 // std::unique_ptr<VideoEncodeAccelerator> uses "Destroy()" instead of trying to |
| 165 // use the destructor. | 167 // use the destructor. |
| 166 template <> | 168 template <> |
| 167 struct MEDIA_EXPORT default_delete<media::VideoEncodeAccelerator> { | 169 struct MEDIA_EXPORT default_delete<media::VideoEncodeAccelerator> { |
| 168 void operator()(media::VideoEncodeAccelerator* vea) const; | 170 void operator()(media::VideoEncodeAccelerator* vea) const; |
| 169 }; | 171 }; |
| 170 | 172 |
| 171 } // namespace std | 173 } // namespace std |
| 172 | 174 |
| 173 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ | 175 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
| OLD | NEW |