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

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

Issue 1551813002: Storing raw audio sink for default audio track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding unit tests for SetRawAudioSink. Created 4 years, 11 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
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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 if (!voice_channel_) { 1313 if (!voice_channel_) {
1314 LOG(LS_ERROR) << "SetAudioPlayoutVolume: No audio channel exists."; 1314 LOG(LS_ERROR) << "SetAudioPlayoutVolume: No audio channel exists.";
1315 return; 1315 return;
1316 } 1316 }
1317 1317
1318 if (!voice_channel_->SetOutputVolume(ssrc, volume)) { 1318 if (!voice_channel_->SetOutputVolume(ssrc, volume)) {
1319 ASSERT(false); 1319 ASSERT(false);
1320 } 1320 }
1321 } 1321 }
1322 1322
1323 void WebRtcSession::SetRawAudioSink(uint32_t ssrc, 1323 void WebRtcSession::SetRawAudioSink(
1324 rtc::scoped_ptr<AudioSinkInterface> sink) { 1324 uint32_t ssrc,
1325 rtc::scoped_refptr<AudioSinkInterface> sink) {
1325 ASSERT(signaling_thread()->IsCurrent()); 1326 ASSERT(signaling_thread()->IsCurrent());
1326 if (!voice_channel_) 1327 if (!voice_channel_)
1327 return; 1328 return;
1328 1329
1329 voice_channel_->SetRawAudioSink(ssrc, std::move(sink)); 1330 voice_channel_->SetRawAudioSink(ssrc, sink);
1330 } 1331 }
1331 1332
1332 bool WebRtcSession::SetCaptureDevice(uint32_t ssrc, 1333 bool WebRtcSession::SetCaptureDevice(uint32_t ssrc,
1333 cricket::VideoCapturer* camera) { 1334 cricket::VideoCapturer* camera) {
1334 ASSERT(signaling_thread()->IsCurrent()); 1335 ASSERT(signaling_thread()->IsCurrent());
1335 1336
1336 if (!video_channel_) { 1337 if (!video_channel_) {
1337 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't 1338 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't
1338 // support video. 1339 // support video.
1339 LOG(LS_WARNING) << "Video not used in this call."; 1340 LOG(LS_WARNING) << "Video not used in this call.";
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 } 2197 }
2197 } 2198 }
2198 2199
2199 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2200 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2200 const rtc::SentPacket& sent_packet) { 2201 const rtc::SentPacket& sent_packet) {
2201 RTC_DCHECK(worker_thread()->IsCurrent()); 2202 RTC_DCHECK(worker_thread()->IsCurrent());
2202 media_controller_->call_w()->OnSentPacket(sent_packet); 2203 media_controller_->call_w()->OnSentPacket(sent_packet);
2203 } 2204 }
2204 2205
2205 } // namespace webrtc 2206 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698