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

Side by Side Diff: webrtc/test/encoder_settings.h

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: rebased Created 4 years, 2 months 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
« no previous file with comments | « webrtc/test/call_test.cc ('k') | webrtc/test/encoder_settings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef WEBRTC_TEST_ENCODER_SETTINGS_H_ 10 #ifndef WEBRTC_TEST_ENCODER_SETTINGS_H_
11 #define WEBRTC_TEST_ENCODER_SETTINGS_H_ 11 #define WEBRTC_TEST_ENCODER_SETTINGS_H_
12 12
13 #include <vector>
14
13 #include "webrtc/video_receive_stream.h" 15 #include "webrtc/video_receive_stream.h"
14 #include "webrtc/video_send_stream.h" 16 #include "webrtc/video_send_stream.h"
15 17
16 namespace webrtc { 18 namespace webrtc {
17 namespace test { 19 namespace test {
18 std::vector<VideoStream> CreateVideoStreams(size_t num_streams); 20
21 class DefaultVideoStreamFactory
22 : public VideoEncoderConfig::VideoStreamFactoryInterface {
23 public:
24 DefaultVideoStreamFactory();
25
26 static const size_t kMaxNumberOfStreams = 3;
27 // Defined as {150000, 450000, 1500000};
28 static const int kMaxBitratePerStream[];
29 // Defined as {50000, 200000, 700000};
30 static const int kDefaultMinBitratePerStream[];
31
32 private:
33 std::vector<VideoStream> CreateEncoderStreams(
34 int width,
35 int height,
36 const VideoEncoderConfig& encoder_config) override;
37 };
38
39 // Creates |encoder_config.number_of_streams| VideoStreams where index
40 // |encoder_config.number_of_streams -1| have width = |width|, height =
41 // |height|. The total max bitrate of all VideoStreams is
42 // |encoder_config.max_bitrate_bps|.
43 std::vector<VideoStream> CreateVideoStreams(
44 int width,
45 int height,
46 const webrtc::VideoEncoderConfig& encoder_config);
47
48 void FillEncoderConfiguration(size_t num_streams,
49 VideoEncoderConfig* configuration);
19 50
20 VideoReceiveStream::Decoder CreateMatchingDecoder( 51 VideoReceiveStream::Decoder CreateMatchingDecoder(
21 const VideoSendStream::Config::EncoderSettings& encoder_settings); 52 const VideoSendStream::Config::EncoderSettings& encoder_settings);
22 } // namespace test 53 } // namespace test
23 } // namespace webrtc 54 } // namespace webrtc
24 55
25 #endif // WEBRTC_TEST_ENCODER_SETTINGS_H_ 56 #endif // WEBRTC_TEST_ENCODER_SETTINGS_H_
OLDNEW
« no previous file with comments | « webrtc/test/call_test.cc ('k') | webrtc/test/encoder_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698