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 |
11 #ifdef HAVE_WEBRTC_VIDEO | 11 #ifdef HAVE_WEBRTC_VIDEO |
12 #include "webrtc/media/webrtc/webrtcvideoengine2.h" | 12 #include "webrtc/media/engine/webrtcvideoengine2.h" |
13 | 13 |
14 #include <algorithm> | 14 #include <algorithm> |
15 #include <set> | 15 #include <set> |
16 #include <string> | 16 #include <string> |
17 | 17 |
18 #include "webrtc/base/buffer.h" | 18 #include "webrtc/base/buffer.h" |
19 #include "webrtc/base/logging.h" | 19 #include "webrtc/base/logging.h" |
20 #include "webrtc/base/stringutils.h" | 20 #include "webrtc/base/stringutils.h" |
21 #include "webrtc/base/timeutils.h" | 21 #include "webrtc/base/timeutils.h" |
22 #include "webrtc/base/trace_event.h" | 22 #include "webrtc/base/trace_event.h" |
23 #include "webrtc/call.h" | 23 #include "webrtc/call.h" |
24 #include "webrtc/media/base/videocapturer.h" | 24 #include "webrtc/media/base/videocapturer.h" |
25 #include "webrtc/media/base/videorenderer.h" | 25 #include "webrtc/media/base/videorenderer.h" |
26 #include "webrtc/media/webrtc/constants.h" | 26 #include "webrtc/media/engine/constants.h" |
27 #include "webrtc/media/webrtc/simulcast.h" | 27 #include "webrtc/media/engine/simulcast.h" |
28 #include "webrtc/media/webrtc/webrtcmediaengine.h" | 28 #include "webrtc/media/engine/webrtcmediaengine.h" |
29 #include "webrtc/media/webrtc/webrtcvideoencoderfactory.h" | 29 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
30 #include "webrtc/media/webrtc/webrtcvideoframe.h" | 30 #include "webrtc/media/engine/webrtcvideoframe.h" |
31 #include "webrtc/media/webrtc/webrtcvoiceengine.h" | 31 #include "webrtc/media/engine/webrtcvoiceengine.h" |
32 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" | 32 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" |
33 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h" | 33 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h" |
34 #include "webrtc/system_wrappers/include/field_trial.h" | 34 #include "webrtc/system_wrappers/include/field_trial.h" |
35 #include "webrtc/video_decoder.h" | 35 #include "webrtc/video_decoder.h" |
36 #include "webrtc/video_encoder.h" | 36 #include "webrtc/video_encoder.h" |
37 | 37 |
38 namespace cricket { | 38 namespace cricket { |
39 namespace { | 39 namespace { |
40 | 40 |
41 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. | 41 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 } else if (width * height <= 640 * 480) { | 310 } else if (width * height <= 640 * 480) { |
311 return 1700; | 311 return 1700; |
312 } else if (width * height <= 960 * 540) { | 312 } else if (width * height <= 960 * 540) { |
313 return 2000; | 313 return 2000; |
314 } else { | 314 } else { |
315 return 2500; | 315 return 2500; |
316 } | 316 } |
317 } | 317 } |
318 } // namespace | 318 } // namespace |
319 | 319 |
320 // Constants defined in webrtc/media/webrtc/constants.h | 320 // Constants defined in webrtc/media/engine/constants.h |
321 // TODO(pbos): Move these to a separate constants.cc file. | 321 // TODO(pbos): Move these to a separate constants.cc file. |
322 const int kMinVideoBitrate = 30; | 322 const int kMinVideoBitrate = 30; |
323 const int kStartVideoBitrate = 300; | 323 const int kStartVideoBitrate = 300; |
324 | 324 |
325 const int kVideoMtu = 1200; | 325 const int kVideoMtu = 1200; |
326 const int kVideoRtpBufferSize = 65536; | 326 const int kVideoRtpBufferSize = 65536; |
327 | 327 |
328 // This constant is really an on/off, lower-level configurable NACK history | 328 // This constant is really an on/off, lower-level configurable NACK history |
329 // duration hasn't been implemented. | 329 // duration hasn't been implemented. |
330 static const int kNackHistoryMs = 1000; | 330 static const int kNackHistoryMs = 1000; |
(...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2503 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2504 } | 2504 } |
2505 } | 2505 } |
2506 | 2506 |
2507 return video_codecs; | 2507 return video_codecs; |
2508 } | 2508 } |
2509 | 2509 |
2510 } // namespace cricket | 2510 } // namespace cricket |
2511 | 2511 |
2512 #endif // HAVE_WEBRTC_VIDEO | 2512 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |