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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 int Encode(const VideoFrame& input_image, | 44 int Encode(const VideoFrame& input_image, |
45 const CodecSpecificInfo* codec_specific_info, | 45 const CodecSpecificInfo* codec_specific_info, |
46 const std::vector<FrameType>* frame_types) override; | 46 const std::vector<FrameType>* frame_types) override; |
47 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; | 47 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; |
48 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 48 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
49 int SetRates(uint32_t new_bitrate_kbit, uint32_t new_framerate) override; | 49 int SetRates(uint32_t new_bitrate_kbit, uint32_t new_framerate) override; |
50 | 50 |
51 // Eventual handler for the contained encoders' EncodedImageCallbacks, but | 51 // Eventual handler for the contained encoders' EncodedImageCallbacks, but |
52 // called from an internal helper that also knows the correct stream | 52 // called from an internal helper that also knows the correct stream |
53 // index. | 53 // index. |
54 int32_t Encoded(size_t stream_idx, | 54 EncodedImageCallback::Result OnEncodedImage( |
55 const EncodedImage& encodedImage, | 55 size_t stream_idx, |
56 const CodecSpecificInfo* codecSpecificInfo = NULL, | 56 const EncodedImage& encoded_image, |
57 const RTPFragmentationHeader* fragmentation = NULL); | 57 const CodecSpecificInfo* codec_specific_info, |
| 58 const RTPFragmentationHeader* fragmentation); |
58 | 59 |
59 void OnDroppedFrame() override; | 60 void OnDroppedFrame() override; |
60 | 61 |
61 bool SupportsNativeHandle() const override; | 62 bool SupportsNativeHandle() const override; |
62 const char* ImplementationName() const override; | 63 const char* ImplementationName() const override; |
63 | 64 |
64 private: | 65 private: |
65 struct StreamInfo { | 66 struct StreamInfo { |
66 StreamInfo() | 67 StreamInfo() |
67 : encoder(NULL), | 68 : encoder(NULL), |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 std::unique_ptr<TemporalLayersFactory> screensharing_tl_factory_; | 114 std::unique_ptr<TemporalLayersFactory> screensharing_tl_factory_; |
114 VideoCodec codec_; | 115 VideoCodec codec_; |
115 std::vector<StreamInfo> streaminfos_; | 116 std::vector<StreamInfo> streaminfos_; |
116 EncodedImageCallback* encoded_complete_callback_; | 117 EncodedImageCallback* encoded_complete_callback_; |
117 std::string implementation_name_; | 118 std::string implementation_name_; |
118 }; | 119 }; |
119 | 120 |
120 } // namespace webrtc | 121 } // namespace webrtc |
121 | 122 |
122 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ | 123 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ |
OLD | NEW |