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

Side by Side Diff: talk/app/webrtc/rtpsenderreceiver_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 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 | « talk/app/webrtc/rtpsender.cc ('k') | talk/app/webrtc/sctputils.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 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 29 matching lines...) Expand all
40 #include "testing/gmock/include/gmock/gmock.h" 40 #include "testing/gmock/include/gmock/gmock.h"
41 #include "testing/gtest/include/gtest/gtest.h" 41 #include "testing/gtest/include/gtest/gtest.h"
42 #include "webrtc/base/gunit.h" 42 #include "webrtc/base/gunit.h"
43 43
44 using ::testing::_; 44 using ::testing::_;
45 using ::testing::Exactly; 45 using ::testing::Exactly;
46 46
47 static const char kStreamLabel1[] = "local_stream_1"; 47 static const char kStreamLabel1[] = "local_stream_1";
48 static const char kVideoTrackId[] = "video_1"; 48 static const char kVideoTrackId[] = "video_1";
49 static const char kAudioTrackId[] = "audio_1"; 49 static const char kAudioTrackId[] = "audio_1";
50 static const uint32 kVideoSsrc = 98; 50 static const uint32_t kVideoSsrc = 98;
51 static const uint32 kAudioSsrc = 99; 51 static const uint32_t kAudioSsrc = 99;
52 52
53 namespace webrtc { 53 namespace webrtc {
54 54
55 // Helper class to test RtpSender/RtpReceiver. 55 // Helper class to test RtpSender/RtpReceiver.
56 class MockAudioProvider : public AudioProviderInterface { 56 class MockAudioProvider : public AudioProviderInterface {
57 public: 57 public:
58 virtual ~MockAudioProvider() {} 58 virtual ~MockAudioProvider() {}
59 MOCK_METHOD3(SetAudioPlayout, 59 MOCK_METHOD3(SetAudioPlayout,
60 void(uint32 ssrc, 60 void(uint32_t ssrc,
61 bool enable, 61 bool enable,
62 cricket::AudioRenderer* renderer)); 62 cricket::AudioRenderer* renderer));
63 MOCK_METHOD4(SetAudioSend, 63 MOCK_METHOD4(SetAudioSend,
64 void(uint32 ssrc, 64 void(uint32_t ssrc,
65 bool enable, 65 bool enable,
66 const cricket::AudioOptions& options, 66 const cricket::AudioOptions& options,
67 cricket::AudioRenderer* renderer)); 67 cricket::AudioRenderer* renderer));
68 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32 ssrc, double volume)); 68 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume));
69 }; 69 };
70 70
71 // Helper class to test RtpSender/RtpReceiver. 71 // Helper class to test RtpSender/RtpReceiver.
72 class MockVideoProvider : public VideoProviderInterface { 72 class MockVideoProvider : public VideoProviderInterface {
73 public: 73 public:
74 virtual ~MockVideoProvider() {} 74 virtual ~MockVideoProvider() {}
75 MOCK_METHOD2(SetCaptureDevice, 75 MOCK_METHOD2(SetCaptureDevice,
76 bool(uint32 ssrc, cricket::VideoCapturer* camera)); 76 bool(uint32_t ssrc, cricket::VideoCapturer* camera));
77 MOCK_METHOD3(SetVideoPlayout, 77 MOCK_METHOD3(SetVideoPlayout,
78 void(uint32 ssrc, 78 void(uint32_t ssrc,
79 bool enable, 79 bool enable,
80 cricket::VideoRenderer* renderer)); 80 cricket::VideoRenderer* renderer));
81 MOCK_METHOD3(SetVideoSend, 81 MOCK_METHOD3(SetVideoSend,
82 void(uint32 ssrc, 82 void(uint32_t ssrc,
83 bool enable, 83 bool enable,
84 const cricket::VideoOptions* options)); 84 const cricket::VideoOptions* options));
85 }; 85 };
86 86
87 class FakeVideoSource : public Notifier<VideoSourceInterface> { 87 class FakeVideoSource : public Notifier<VideoSourceInterface> {
88 public: 88 public:
89 static rtc::scoped_refptr<FakeVideoSource> Create() { 89 static rtc::scoped_refptr<FakeVideoSource> Create() {
90 return new rtc::RefCountedObject<FakeVideoSource>(); 90 return new rtc::RefCountedObject<FakeVideoSource>();
91 } 91 }
92 virtual cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; } 92 virtual cricket::VideoCapturer* GetVideoCapturer() { return &fake_capturer_; }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 audio_track_->set_enabled(true); 275 audio_track_->set_enabled(true);
276 276
277 double new_volume = 0.8; 277 double new_volume = 0.8;
278 EXPECT_CALL(audio_provider_, SetAudioPlayoutVolume(kAudioSsrc, new_volume)); 278 EXPECT_CALL(audio_provider_, SetAudioPlayoutVolume(kAudioSsrc, new_volume));
279 audio_track_->GetSource()->SetVolume(new_volume); 279 audio_track_->GetSource()->SetVolume(new_volume);
280 280
281 DestroyAudioRtpReceiver(); 281 DestroyAudioRtpReceiver();
282 } 282 }
283 283
284 } // namespace webrtc 284 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/rtpsender.cc ('k') | talk/app/webrtc/sctputils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698