| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 10 matching lines...) Expand all Loading... |
| 21 #include "webrtc/base/stringutils.h" | 21 #include "webrtc/base/stringutils.h" |
| 22 #include "webrtc/base/thread_annotations.h" | 22 #include "webrtc/base/thread_annotations.h" |
| 23 #include "webrtc/media/base/codec.h" | 23 #include "webrtc/media/base/codec.h" |
| 24 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" | 24 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" |
| 25 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 25 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
| 26 #include "webrtc/modules/video_coding/include/video_error_codes.h" | 26 #include "webrtc/modules/video_coding/include/video_error_codes.h" |
| 27 #include "webrtc/video_decoder.h" | 27 #include "webrtc/video_decoder.h" |
| 28 #include "webrtc/video_encoder.h" | 28 #include "webrtc/video_encoder.h" |
| 29 | 29 |
| 30 namespace cricket { | 30 namespace cricket { |
| 31 | |
| 32 static const int kMinVideoBitrate = 100; | |
| 33 static const int kStartVideoBitrate = 300; | |
| 34 static const int kMaxVideoBitrate = 1000; | |
| 35 | |
| 36 // WebRtc channel id and capture id share the same number space. | |
| 37 // This is how AddRenderer(renderId, ...) is able to tell if it is adding a | |
| 38 // renderer for a channel or it is adding a renderer for a capturer. | |
| 39 static const int kViEChannelIdBase = 0; | |
| 40 static const int kViEChannelIdMax = 1000; | |
| 41 static const int kEventTimeoutMs = 10000; | 31 static const int kEventTimeoutMs = 10000; |
| 42 | 32 |
| 43 // Fake class for mocking out webrtc::VideoDecoder | 33 // Fake class for mocking out webrtc::VideoDecoder |
| 44 class FakeWebRtcVideoDecoder : public webrtc::VideoDecoder { | 34 class FakeWebRtcVideoDecoder : public webrtc::VideoDecoder { |
| 45 public: | 35 public: |
| 46 FakeWebRtcVideoDecoder() : num_frames_received_(0) {} | 36 FakeWebRtcVideoDecoder() : num_frames_received_(0) {} |
| 47 | 37 |
| 48 virtual int32_t InitDecode(const webrtc::VideoCodec*, int32_t) { | 38 virtual int32_t InitDecode(const webrtc::VideoCodec*, int32_t) { |
| 49 return WEBRTC_VIDEO_CODEC_OK; | 39 return WEBRTC_VIDEO_CODEC_OK; |
| 50 } | 40 } |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 rtc::Event created_video_encoder_event_; | 251 rtc::Event created_video_encoder_event_; |
| 262 std::vector<cricket::VideoCodec> codecs_; | 252 std::vector<cricket::VideoCodec> codecs_; |
| 263 std::vector<FakeWebRtcVideoEncoder*> encoders_ GUARDED_BY(crit_); | 253 std::vector<FakeWebRtcVideoEncoder*> encoders_ GUARDED_BY(crit_); |
| 264 int num_created_encoders_ GUARDED_BY(crit_); | 254 int num_created_encoders_ GUARDED_BY(crit_); |
| 265 bool encoders_have_internal_sources_; | 255 bool encoders_have_internal_sources_; |
| 266 }; | 256 }; |
| 267 | 257 |
| 268 } // namespace cricket | 258 } // namespace cricket |
| 269 | 259 |
| 270 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ | 260 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ |
| OLD | NEW |