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

Side by Side Diff: talk/app/webrtc/rtpsender.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.h ('k') | talk/app/webrtc/rtpsenderreceiver_unittest.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 2015 Google Inc. 3 * Copyright 2015 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 } 53 }
54 54
55 void LocalAudioSinkAdapter::SetSink(cricket::AudioRenderer::Sink* sink) { 55 void LocalAudioSinkAdapter::SetSink(cricket::AudioRenderer::Sink* sink) {
56 rtc::CritScope lock(&lock_); 56 rtc::CritScope lock(&lock_);
57 ASSERT(!sink || !sink_); 57 ASSERT(!sink || !sink_);
58 sink_ = sink; 58 sink_ = sink;
59 } 59 }
60 60
61 AudioRtpSender::AudioRtpSender(AudioTrackInterface* track, 61 AudioRtpSender::AudioRtpSender(AudioTrackInterface* track,
62 uint32 ssrc, 62 uint32_t ssrc,
63 AudioProviderInterface* provider) 63 AudioProviderInterface* provider)
64 : id_(track->id()), 64 : id_(track->id()),
65 track_(track), 65 track_(track),
66 ssrc_(ssrc), 66 ssrc_(ssrc),
67 provider_(provider), 67 provider_(provider),
68 cached_track_enabled_(track->enabled()), 68 cached_track_enabled_(track->enabled()),
69 sink_adapter_(new LocalAudioSinkAdapter()) { 69 sink_adapter_(new LocalAudioSinkAdapter()) {
70 track_->RegisterObserver(this); 70 track_->RegisterObserver(this);
71 track_->AddSink(sink_adapter_.get()); 71 track_->AddSink(sink_adapter_.get());
72 Reconfigure(); 72 Reconfigure();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // Use the renderer if the audio track has one, otherwise use the sink 130 // Use the renderer if the audio track has one, otherwise use the sink
131 // adapter owned by this class. 131 // adapter owned by this class.
132 cricket::AudioRenderer* renderer = 132 cricket::AudioRenderer* renderer =
133 track_->GetRenderer() ? track_->GetRenderer() : sink_adapter_.get(); 133 track_->GetRenderer() ? track_->GetRenderer() : sink_adapter_.get();
134 ASSERT(renderer != nullptr); 134 ASSERT(renderer != nullptr);
135 provider_->SetAudioSend(ssrc_, track_->enabled(), options, renderer); 135 provider_->SetAudioSend(ssrc_, track_->enabled(), options, renderer);
136 } 136 }
137 137
138 VideoRtpSender::VideoRtpSender(VideoTrackInterface* track, 138 VideoRtpSender::VideoRtpSender(VideoTrackInterface* track,
139 uint32 ssrc, 139 uint32_t ssrc,
140 VideoProviderInterface* provider) 140 VideoProviderInterface* provider)
141 : id_(track->id()), 141 : id_(track->id()),
142 track_(track), 142 track_(track),
143 ssrc_(ssrc), 143 ssrc_(ssrc),
144 provider_(provider), 144 provider_(provider),
145 cached_track_enabled_(track->enabled()) { 145 cached_track_enabled_(track->enabled()) {
146 track_->RegisterObserver(this); 146 track_->RegisterObserver(this);
147 VideoSourceInterface* source = track_->GetSource(); 147 VideoSourceInterface* source = track_->GetSource();
148 if (source) { 148 if (source) {
149 provider_->SetCaptureDevice(ssrc_, source->GetVideoCapturer()); 149 provider_->SetCaptureDevice(ssrc_, source->GetVideoCapturer());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 const cricket::VideoOptions* options = nullptr; 199 const cricket::VideoOptions* options = nullptr;
200 VideoSourceInterface* source = track_->GetSource(); 200 VideoSourceInterface* source = track_->GetSource();
201 if (track_->enabled() && source) { 201 if (track_->enabled() && source) {
202 options = source->options(); 202 options = source->options();
203 } 203 }
204 provider_->SetVideoSend(ssrc_, track_->enabled(), options); 204 provider_->SetVideoSend(ssrc_, track_->enabled(), options);
205 } 205 }
206 206
207 } // namespace webrtc 207 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/rtpsender.h ('k') | talk/app/webrtc/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698