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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 // encoder in bytes. | 71 // encoder in bytes. |
| 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. |
|
sandersd (OOO until July 31)
2016/05/19 20:27:12
Document |timestamp|.
shenghao
2016/05/24 10:50:20
Done.
| |
| 82 virtual void BitstreamBufferReady(int32_t bitstream_buffer_id, | 82 virtual void BitstreamBufferReady(int32_t bitstream_buffer_id, |
| 83 size_t payload_size, | 83 size_t payload_size, |
| 84 bool key_frame) = 0; | 84 bool key_frame, |
| 85 base::TimeDelta timestamp) = 0; | |
|
Pawel Osciak
2016/05/23 07:15:53
Perhaps const TimeDelta& here and in other places?
shenghao
2016/05/24 10:50:19
All time classes are copyable, assignable, and occ
| |
| 85 | 86 |
| 86 // Error notification callback. Note that errors in Initialize() will not be | 87 // Error notification callback. Note that errors in Initialize() will not be |
| 87 // reported here, but will instead be indicated by a false return value | 88 // reported here, but will instead be indicated by a false return value |
| 88 // there. | 89 // there. |
| 89 virtual void NotifyError(Error error) = 0; | 90 virtual void NotifyError(Error error) = 0; |
| 90 | 91 |
| 91 protected: | 92 protected: |
| 92 // Clients are not owned by VEA instances and should not be deleted through | 93 // Clients are not owned by VEA instances and should not be deleted through |
| 93 // these pointers. | 94 // these pointers. |
| 94 virtual ~Client() {} | 95 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 | 165 // std::unique_ptr<VideoEncodeAccelerator> uses "Destroy()" instead of trying to |
| 165 // use the destructor. | 166 // use the destructor. |
| 166 template <> | 167 template <> |
| 167 struct MEDIA_EXPORT default_delete<media::VideoEncodeAccelerator> { | 168 struct MEDIA_EXPORT default_delete<media::VideoEncodeAccelerator> { |
| 168 void operator()(media::VideoEncodeAccelerator* vea) const; | 169 void operator()(media::VideoEncodeAccelerator* vea) const; |
| 169 }; | 170 }; |
| 170 | 171 |
| 171 } // namespace std | 172 } // namespace std |
| 172 | 173 |
| 173 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ | 174 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
| OLD | NEW |