| 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. |
| 34 virtual int32_t Encoded(const EncodedImage& encoded_image, | 35 virtual int32_t Encoded(const EncodedImage& encoded_image, |
| 35 const CodecSpecificInfo* codec_specific_info, | 36 const CodecSpecificInfo* codec_specific_info, |
| 36 const RTPFragmentationHeader* fragmentation) = 0; | 37 const RTPFragmentationHeader* fragmentation) = 0; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 class VideoEncoder { | 40 class VideoEncoder { |
| 40 public: | 41 public: |
| 41 enum EncoderType { | 42 enum EncoderType { |
| 42 kH264, | 43 kH264, |
| 43 kVp8, | 44 kVp8, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 178 |
| 178 const EncoderType encoder_type_; | 179 const EncoderType encoder_type_; |
| 179 webrtc::VideoEncoder* const encoder_; | 180 webrtc::VideoEncoder* const encoder_; |
| 180 | 181 |
| 181 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; | 182 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; |
| 182 std::string fallback_implementation_name_; | 183 std::string fallback_implementation_name_; |
| 183 EncodedImageCallback* callback_; | 184 EncodedImageCallback* callback_; |
| 184 }; | 185 }; |
| 185 } // namespace webrtc | 186 } // namespace webrtc |
| 186 #endif // WEBRTC_VIDEO_ENCODER_H_ | 187 #endif // WEBRTC_VIDEO_ENCODER_H_ |
| OLD | NEW |