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 30 matching lines...) Expand all Loading... |
41 // Implements VideoEncoder | 41 // Implements VideoEncoder |
42 int Release() override; | 42 int Release() override; |
43 int InitEncode(const VideoCodec* inst, | 43 int InitEncode(const VideoCodec* inst, |
44 int number_of_cores, | 44 int number_of_cores, |
45 size_t max_payload_size) override; | 45 size_t max_payload_size) override; |
46 int Encode(const VideoFrame& input_image, | 46 int Encode(const VideoFrame& input_image, |
47 const CodecSpecificInfo* codec_specific_info, | 47 const CodecSpecificInfo* codec_specific_info, |
48 const std::vector<FrameType>* frame_types) override; | 48 const std::vector<FrameType>* frame_types) override; |
49 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; | 49 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; |
50 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 50 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
51 int SetRates(uint32_t new_bitrate_kbit, uint32_t new_framerate) override; | 51 int SetRateAllocation(const BitrateAllocation& bitrate, |
| 52 uint32_t new_framerate) override; |
52 | 53 |
53 // Eventual handler for the contained encoders' EncodedImageCallbacks, but | 54 // Eventual handler for the contained encoders' EncodedImageCallbacks, but |
54 // called from an internal helper that also knows the correct stream | 55 // called from an internal helper that also knows the correct stream |
55 // index. | 56 // index. |
56 EncodedImageCallback::Result OnEncodedImage( | 57 EncodedImageCallback::Result OnEncodedImage( |
57 size_t stream_idx, | 58 size_t stream_idx, |
58 const EncodedImage& encoded_image, | 59 const EncodedImage& encoded_image, |
59 const CodecSpecificInfo* codec_specific_info, | 60 const CodecSpecificInfo* codec_specific_info, |
60 const RTPFragmentationHeader* fragmentation); | 61 const RTPFragmentationHeader* fragmentation); |
61 | 62 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // Populate the codec settings for each stream. | 97 // Populate the codec settings for each stream. |
97 void PopulateStreamCodec(const webrtc::VideoCodec* inst, | 98 void PopulateStreamCodec(const webrtc::VideoCodec* inst, |
98 int stream_index, | 99 int stream_index, |
99 uint32_t start_bitrate_kbps, | 100 uint32_t start_bitrate_kbps, |
100 bool highest_resolution_stream, | 101 bool highest_resolution_stream, |
101 webrtc::VideoCodec* stream_codec); | 102 webrtc::VideoCodec* stream_codec); |
102 | 103 |
103 bool Initialized() const; | 104 bool Initialized() const; |
104 | 105 |
105 std::unique_ptr<VideoEncoderFactory> factory_; | 106 std::unique_ptr<VideoEncoderFactory> factory_; |
106 std::unique_ptr<TemporalLayersFactory> screensharing_tl_factory_; | |
107 VideoCodec codec_; | 107 VideoCodec codec_; |
108 std::vector<StreamInfo> streaminfos_; | 108 std::vector<StreamInfo> streaminfos_; |
109 EncodedImageCallback* encoded_complete_callback_; | 109 EncodedImageCallback* encoded_complete_callback_; |
110 std::string implementation_name_; | 110 std::string implementation_name_; |
111 std::unique_ptr<SimulcastRateAllocator> rate_allocator_; | |
112 }; | 111 }; |
113 | 112 |
114 } // namespace webrtc | 113 } // namespace webrtc |
115 | 114 |
116 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ | 115 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ |
OLD | NEW |