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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 struct StreamInfo { | 64 struct StreamInfo { |
65 StreamInfo() | 65 StreamInfo() |
66 : encoder(NULL), | 66 : encoder(NULL), |
67 callback(NULL), | 67 callback(NULL), |
68 width(0), | 68 width(0), |
69 height(0), | 69 height(0), |
70 key_frame_request(false), | 70 key_frame_request(false), |
71 send_stream(true) {} | 71 send_stream(true) {} |
72 StreamInfo(VideoEncoder* encoder, | 72 StreamInfo(VideoEncoder* encoder, |
73 EncodedImageCallback* callback, | 73 EncodedImageCallback* callback, |
74 unsigned short width, | 74 uint16_t width, |
75 unsigned short height, | 75 uint16_t height, |
76 bool send_stream) | 76 bool send_stream) |
77 : encoder(encoder), | 77 : encoder(encoder), |
78 callback(callback), | 78 callback(callback), |
79 width(width), | 79 width(width), |
80 height(height), | 80 height(height), |
81 key_frame_request(false), | 81 key_frame_request(false), |
82 send_stream(send_stream) {} | 82 send_stream(send_stream) {} |
83 // Deleted by SimulcastEncoderAdapter::Release(). | 83 // Deleted by SimulcastEncoderAdapter::Release(). |
84 VideoEncoder* encoder; | 84 VideoEncoder* encoder; |
85 EncodedImageCallback* callback; | 85 EncodedImageCallback* callback; |
86 unsigned short width; | 86 uint16_t width; |
87 unsigned short height; | 87 uint16_t height; |
88 bool key_frame_request; | 88 bool key_frame_request; |
89 bool send_stream; | 89 bool send_stream; |
90 }; | 90 }; |
91 | 91 |
92 // Get the stream bitrate, for the stream |stream_idx|, given the bitrate | 92 // Get the stream bitrate, for the stream |stream_idx|, given the bitrate |
93 // |new_bitrate_kbit| and the actual configured stream count in | 93 // |new_bitrate_kbit| and the actual configured stream count in |
94 // |total_number_of_streams|. The function also returns whether there's enough | 94 // |total_number_of_streams|. The function also returns whether there's enough |
95 // bandwidth to send this stream via |send_stream|. | 95 // bandwidth to send this stream via |send_stream|. |
96 uint32_t GetStreamBitrate(int stream_idx, | 96 uint32_t GetStreamBitrate(int stream_idx, |
97 size_t total_number_of_streams, | 97 size_t total_number_of_streams, |
(...skipping 13 matching lines...) Expand all Loading... |
111 rtc::scoped_ptr<VideoEncoderFactory> factory_; | 111 rtc::scoped_ptr<VideoEncoderFactory> factory_; |
112 rtc::scoped_ptr<Config> screensharing_extra_options_; | 112 rtc::scoped_ptr<Config> screensharing_extra_options_; |
113 VideoCodec codec_; | 113 VideoCodec codec_; |
114 std::vector<StreamInfo> streaminfos_; | 114 std::vector<StreamInfo> streaminfos_; |
115 EncodedImageCallback* encoded_complete_callback_; | 115 EncodedImageCallback* encoded_complete_callback_; |
116 }; | 116 }; |
117 | 117 |
118 } // namespace webrtc | 118 } // namespace webrtc |
119 | 119 |
120 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ | 120 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_ENCODER_ADAPTER_H_ |
121 | |
OLD | NEW |