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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 // Clients are not owned by VEA instances and should not be deleted through | 90 // Clients are not owned by VEA instances and should not be deleted through |
91 // these pointers. | 91 // these pointers. |
92 virtual ~Client() {} | 92 virtual ~Client() {} |
93 }; | 93 }; |
94 | 94 |
95 // Video encoder functions. | 95 // Video encoder functions. |
96 | 96 |
97 // Initialize the video encoder with a specific configuration. Called once | 97 // Initialize the video encoder with a specific configuration. Called once |
98 // per encoder construction. | 98 // per encoder construction. |
99 // Parameters: | 99 // Parameters: |
100 // |client| is the client of this video encoder. The provided pointer must | |
101 // be valid for the rest of the lifetime of this encoder, until Destroy() | |
Ami GONE FROM CHROMIUM
2014/02/24 23:12:40
ditto drop "for the rest of the lifetime of this e
sheu
2014/02/24 23:48:20
Done.
| |
102 // is called. | |
100 // |input_format| is the frame format of the input stream (as would be | 103 // |input_format| is the frame format of the input stream (as would be |
101 // reported by VideoFrame::format() for frames passed to Encode()). | 104 // reported by VideoFrame::format() for frames passed to Encode()). |
102 // |input_visible_size| is the resolution of the input stream (as would be | 105 // |input_visible_size| is the resolution of the input stream (as would be |
103 // reported by VideoFrame::visible_rect().size() for frames passed to | 106 // reported by VideoFrame::visible_rect().size() for frames passed to |
104 // Encode()). | 107 // Encode()). |
105 // |output_profile| is the codec profile of the encoded output stream. | 108 // |output_profile| is the codec profile of the encoded output stream. |
106 // |initial_bitrate| is the initial bitrate of the encoded output stream, | 109 // |initial_bitrate| is the initial bitrate of the encoded output stream, |
107 // in bits per second. | 110 // in bits per second. |
108 // TODO(sheu): handle resolution changes. http://crbug.com/249944 | 111 // TODO(sheu): handle resolution changes. http://crbug.com/249944 |
109 virtual void Initialize(media::VideoFrame::Format input_format, | 112 virtual void Initialize(Client* client, |
113 media::VideoFrame::Format input_format, | |
scherkus (not reviewing)
2014/02/20 18:52:09
nit: remove media:: ?
sheu
2014/02/24 23:48:20
Done.
| |
110 const gfx::Size& input_visible_size, | 114 const gfx::Size& input_visible_size, |
111 VideoCodecProfile output_profile, | 115 VideoCodecProfile output_profile, |
112 uint32 initial_bitrate) = 0; | 116 uint32 initial_bitrate) = 0; |
113 | 117 |
114 // Encodes the given frame. | 118 // Encodes the given frame. |
115 // Parameters: | 119 // Parameters: |
116 // |frame| is the VideoFrame that is to be encoded. | 120 // |frame| is the VideoFrame that is to be encoded. |
117 // |force_keyframe| forces the encoding of a keyframe for this frame. | 121 // |force_keyframe| forces the encoding of a keyframe for this frame. |
118 virtual void Encode(const scoped_refptr<VideoFrame>& frame, | 122 virtual void Encode(const scoped_refptr<VideoFrame>& frame, |
119 bool force_keyframe) = 0; | 123 bool force_keyframe) = 0; |
(...skipping 17 matching lines...) Expand all Loading... | |
137 // immediately and the component is freed. This call may asynchronously free | 141 // immediately and the component is freed. This call may asynchronously free |
138 // system resources, but its client-visible effects are synchronous. After | 142 // system resources, but its client-visible effects are synchronous. After |
139 // this method returns no more callbacks will be made on the client. Deletes | 143 // this method returns no more callbacks will be made on the client. Deletes |
140 // |this| unconditionally, so make sure to drop all pointers to it! | 144 // |this| unconditionally, so make sure to drop all pointers to it! |
141 virtual void Destroy() = 0; | 145 virtual void Destroy() = 0; |
142 }; | 146 }; |
143 | 147 |
144 } // namespace media | 148 } // namespace media |
145 | 149 |
146 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ | 150 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ |
OLD | NEW |