| 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 |
| 11 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ |
| 12 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ | 12 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <set> | 15 #include <set> |
| 16 #include <vector> | 16 #include <vector> |
| 17 #include <string> |
| 17 | 18 |
| 19 #include "webrtc/api/video_codecs/video_decoder.h" |
| 20 #include "webrtc/api/video_codecs/video_encoder.h" |
| 18 #include "webrtc/base/basictypes.h" | 21 #include "webrtc/base/basictypes.h" |
| 19 #include "webrtc/base/criticalsection.h" | 22 #include "webrtc/base/criticalsection.h" |
| 20 #include "webrtc/base/gunit.h" | 23 #include "webrtc/base/gunit.h" |
| 21 #include "webrtc/base/stringutils.h" | 24 #include "webrtc/base/stringutils.h" |
| 22 #include "webrtc/base/thread_annotations.h" | 25 #include "webrtc/base/thread_annotations.h" |
| 23 #include "webrtc/media/base/codec.h" | 26 #include "webrtc/media/base/codec.h" |
| 24 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" | 27 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" |
| 25 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 28 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
| 26 #include "webrtc/modules/video_coding/include/video_error_codes.h" | 29 #include "webrtc/modules/video_coding/include/video_error_codes.h" |
| 27 #include "webrtc/video_decoder.h" | |
| 28 #include "webrtc/video_encoder.h" | |
| 29 | 30 |
| 30 namespace cricket { | 31 namespace cricket { |
| 31 static const int kEventTimeoutMs = 10000; | 32 static const int kEventTimeoutMs = 10000; |
| 32 | 33 |
| 33 // Fake class for mocking out webrtc::VideoDecoder | 34 // Fake class for mocking out webrtc::VideoDecoder |
| 34 class FakeWebRtcVideoDecoder : public webrtc::VideoDecoder { | 35 class FakeWebRtcVideoDecoder : public webrtc::VideoDecoder { |
| 35 public: | 36 public: |
| 36 FakeWebRtcVideoDecoder() : num_frames_received_(0) {} | 37 FakeWebRtcVideoDecoder() : num_frames_received_(0) {} |
| 37 | 38 |
| 38 virtual int32_t InitDecode(const webrtc::VideoCodec*, int32_t) { | 39 virtual int32_t InitDecode(const webrtc::VideoCodec*, int32_t) { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 rtc::Event created_video_encoder_event_; | 255 rtc::Event created_video_encoder_event_; |
| 255 std::vector<cricket::VideoCodec> codecs_; | 256 std::vector<cricket::VideoCodec> codecs_; |
| 256 std::vector<FakeWebRtcVideoEncoder*> encoders_ GUARDED_BY(crit_); | 257 std::vector<FakeWebRtcVideoEncoder*> encoders_ GUARDED_BY(crit_); |
| 257 int num_created_encoders_ GUARDED_BY(crit_); | 258 int num_created_encoders_ GUARDED_BY(crit_); |
| 258 bool encoders_have_internal_sources_; | 259 bool encoders_have_internal_sources_; |
| 259 }; | 260 }; |
| 260 | 261 |
| 261 } // namespace cricket | 262 } // namespace cricket |
| 262 | 263 |
| 263 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ | 264 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOENGINE_H_ |
| OLD | NEW |