OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 class RTPFragmentationHeader; | 24 class RTPFragmentationHeader; |
25 // TODO(pbos): Expose these through a public (root) header or change these APIs. | 25 // TODO(pbos): Expose these through a public (root) header or change these APIs. |
26 struct CodecSpecificInfo; | 26 struct CodecSpecificInfo; |
27 struct VideoCodec; | 27 struct VideoCodec; |
28 | 28 |
29 class EncodedImageCallback { | 29 class EncodedImageCallback { |
30 public: | 30 public: |
31 virtual ~EncodedImageCallback() {} | 31 virtual ~EncodedImageCallback() {} |
32 | 32 |
33 // Callback function which is called when an image has been encoded. | 33 // Callback function which is called when an image has been encoded. |
34 // TODO(perkj): Change this to return void. | |
35 virtual int32_t Encoded(const EncodedImage& encoded_image, | 34 virtual int32_t Encoded(const EncodedImage& encoded_image, |
36 const CodecSpecificInfo* codec_specific_info, | 35 const CodecSpecificInfo* codec_specific_info, |
37 const RTPFragmentationHeader* fragmentation) = 0; | 36 const RTPFragmentationHeader* fragmentation) = 0; |
38 }; | 37 }; |
39 | 38 |
40 class VideoEncoder { | 39 class VideoEncoder { |
41 public: | 40 public: |
42 enum EncoderType { | 41 enum EncoderType { |
43 kH264, | 42 kH264, |
44 kVp8, | 43 kVp8, |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 177 |
179 const EncoderType encoder_type_; | 178 const EncoderType encoder_type_; |
180 webrtc::VideoEncoder* const encoder_; | 179 webrtc::VideoEncoder* const encoder_; |
181 | 180 |
182 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; | 181 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; |
183 std::string fallback_implementation_name_; | 182 std::string fallback_implementation_name_; |
184 EncodedImageCallback* callback_; | 183 EncodedImageCallback* callback_; |
185 }; | 184 }; |
186 } // namespace webrtc | 185 } // namespace webrtc |
187 #endif // WEBRTC_VIDEO_ENCODER_H_ | 186 #endif // WEBRTC_VIDEO_ENCODER_H_ |
OLD | NEW |