Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h

Issue 2489843002: Revert of Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 SetRateAllocation(const BitrateAllocation& bitrate, 51 int SetRates(uint32_t new_bitrate_kbit, uint32_t new_framerate) override;
52 uint32_t new_framerate) override;
53 52
54 // Eventual handler for the contained encoders' EncodedImageCallbacks, but 53 // Eventual handler for the contained encoders' EncodedImageCallbacks, but
55 // called from an internal helper that also knows the correct stream 54 // called from an internal helper that also knows the correct stream
56 // index. 55 // index.
57 EncodedImageCallback::Result OnEncodedImage( 56 EncodedImageCallback::Result OnEncodedImage(
58 size_t stream_idx, 57 size_t stream_idx,
59 const EncodedImage& encoded_image, 58 const EncodedImage& encoded_image,
60 const CodecSpecificInfo* codec_specific_info, 59 const CodecSpecificInfo* codec_specific_info,
61 const RTPFragmentationHeader* fragmentation); 60 const RTPFragmentationHeader* fragmentation);
62 61
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Populate the codec settings for each stream. 96 // Populate the codec settings for each stream.
98 void PopulateStreamCodec(const webrtc::VideoCodec* inst, 97 void PopulateStreamCodec(const webrtc::VideoCodec* inst,
99 int stream_index, 98 int stream_index,
100 uint32_t start_bitrate_kbps, 99 uint32_t start_bitrate_kbps,
101 bool highest_resolution_stream, 100 bool highest_resolution_stream,
102 webrtc::VideoCodec* stream_codec); 101 webrtc::VideoCodec* stream_codec);
103 102
104 bool Initialized() const; 103 bool Initialized() const;
105 104
106 std::unique_ptr<VideoEncoderFactory> factory_; 105 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_;
111 }; 112 };
112 113
113 } // namespace webrtc 114 } // namespace webrtc
114 115
115 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ 116 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698