| OLD | NEW |
| 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 |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 peer_connection_->CreateOffer(this, NULL); | 363 peer_connection_->CreateOffer(this, NULL); |
| 364 } else { | 364 } else { |
| 365 main_wnd_->MessageBox("Error", "Failed to initialize PeerConnection", true); | 365 main_wnd_->MessageBox("Error", "Failed to initialize PeerConnection", true); |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 | 368 |
| 369 cricket::VideoCapturer* Conductor::OpenVideoCaptureDevice() { | 369 cricket::VideoCapturer* Conductor::OpenVideoCaptureDevice() { |
| 370 std::vector<std::string> device_names; | 370 std::vector<std::string> device_names; |
| 371 { | 371 { |
| 372 std::unique_ptr<webrtc::VideoCaptureModule::DeviceInfo> info( | 372 std::unique_ptr<webrtc::VideoCaptureModule::DeviceInfo> info( |
| 373 webrtc::VideoCaptureFactory::CreateDeviceInfo(0)); | 373 webrtc::VideoCaptureFactory::CreateDeviceInfo()); |
| 374 if (!info) { | 374 if (!info) { |
| 375 return nullptr; | 375 return nullptr; |
| 376 } | 376 } |
| 377 int num_devices = info->NumberOfDevices(); | 377 int num_devices = info->NumberOfDevices(); |
| 378 for (int i = 0; i < num_devices; ++i) { | 378 for (int i = 0; i < num_devices; ++i) { |
| 379 const uint32_t kSize = 256; | 379 const uint32_t kSize = 256; |
| 380 char name[kSize] = {0}; | 380 char name[kSize] = {0}; |
| 381 char id[kSize] = {0}; | 381 char id[kSize] = {0}; |
| 382 if (info->GetDeviceName(i, name, kSize, id, kSize) != -1) { | 382 if (info->GetDeviceName(i, name, kSize, id, kSize) != -1) { |
| 383 device_names.push_back(name); | 383 device_names.push_back(name); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 } | 537 } |
| 538 | 538 |
| 539 void Conductor::OnFailure(const std::string& error) { | 539 void Conductor::OnFailure(const std::string& error) { |
| 540 LOG(LERROR) << error; | 540 LOG(LERROR) << error; |
| 541 } | 541 } |
| 542 | 542 |
| 543 void Conductor::SendMessage(const std::string& json_object) { | 543 void Conductor::SendMessage(const std::string& json_object) { |
| 544 std::string* msg = new std::string(json_object); | 544 std::string* msg = new std::string(json_object); |
| 545 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); | 545 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); |
| 546 } | 546 } |
| OLD | NEW |