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

Side by Side Diff: webrtc/examples/peerconnection/client/conductor.cc

Issue 2625003003: Replace ASSERT(false) by RTC_NOTREACHED(). (Closed)
Patch Set: Created 3 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
« no previous file with comments | « webrtc/base/win32socketserver.cc ('k') | webrtc/examples/peerconnection/client/main.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 * Copyright 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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 #include "webrtc/examples/peerconnection/client/conductor.h" 11 #include "webrtc/examples/peerconnection/client/conductor.h"
12 12
13 #include <memory> 13 #include <memory>
14 #include <utility> 14 #include <utility>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/api/test/fakeconstraints.h" 17 #include "webrtc/api/test/fakeconstraints.h"
18 #include "webrtc/base/checks.h"
18 #include "webrtc/base/common.h" 19 #include "webrtc/base/common.h"
19 #include "webrtc/base/json.h" 20 #include "webrtc/base/json.h"
20 #include "webrtc/base/logging.h" 21 #include "webrtc/base/logging.h"
21 #include "webrtc/examples/peerconnection/client/defaults.h" 22 #include "webrtc/examples/peerconnection/client/defaults.h"
22 #include "webrtc/media/engine/webrtcvideocapturerfactory.h" 23 #include "webrtc/media/engine/webrtcvideocapturerfactory.h"
23 #include "webrtc/modules/video_capture/video_capture_factory.h" 24 #include "webrtc/modules/video_capture/video_capture_factory.h"
24 25
25 // Names used for a IceCandidate JSON object. 26 // Names used for a IceCandidate JSON object.
26 const char kCandidateSdpMidName[] = "sdpMid"; 27 const char kCandidateSdpMidName[] = "sdpMid";
27 const char kCandidateSdpMlineIndexName[] = "sdpMLineIndex"; 28 const char kCandidateSdpMlineIndexName[] = "sdpMLineIndex";
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 case STREAM_REMOVED: { 501 case STREAM_REMOVED: {
501 // Remote peer stopped sending a stream. 502 // Remote peer stopped sending a stream.
502 webrtc::MediaStreamInterface* stream = 503 webrtc::MediaStreamInterface* stream =
503 reinterpret_cast<webrtc::MediaStreamInterface*>( 504 reinterpret_cast<webrtc::MediaStreamInterface*>(
504 data); 505 data);
505 stream->Release(); 506 stream->Release();
506 break; 507 break;
507 } 508 }
508 509
509 default: 510 default:
510 ASSERT(false); 511 RTC_NOTREACHED();
511 break; 512 break;
512 } 513 }
513 } 514 }
514 515
515 void Conductor::OnSuccess(webrtc::SessionDescriptionInterface* desc) { 516 void Conductor::OnSuccess(webrtc::SessionDescriptionInterface* desc) {
516 peer_connection_->SetLocalDescription( 517 peer_connection_->SetLocalDescription(
517 DummySetSessionDescriptionObserver::Create(), desc); 518 DummySetSessionDescriptionObserver::Create(), desc);
518 519
519 std::string sdp; 520 std::string sdp;
520 desc->ToString(&sdp); 521 desc->ToString(&sdp);
(...skipping 16 matching lines...) Expand all
537 } 538 }
538 539
539 void Conductor::OnFailure(const std::string& error) { 540 void Conductor::OnFailure(const std::string& error) {
540 LOG(LERROR) << error; 541 LOG(LERROR) << error;
541 } 542 }
542 543
543 void Conductor::SendMessage(const std::string& json_object) { 544 void Conductor::SendMessage(const std::string& json_object) {
544 std::string* msg = new std::string(json_object); 545 std::string* msg = new std::string(json_object);
545 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); 546 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg);
546 } 547 }
OLDNEW
« no previous file with comments | « webrtc/base/win32socketserver.cc ('k') | webrtc/examples/peerconnection/client/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698