| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/media/media_stream_options.h" | 5 #include "content/common/media/media_stream_options.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 StreamControls::~StreamControls() {} | 32 StreamControls::~StreamControls() {} |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 const int StreamDeviceInfo::kNoId = -1; | 35 const int StreamDeviceInfo::kNoId = -1; |
| 36 | 36 |
| 37 StreamDeviceInfo::StreamDeviceInfo() | 37 StreamDeviceInfo::StreamDeviceInfo() |
| 38 : session_id(kNoId) {} | 38 : session_id(kNoId) {} |
| 39 | 39 |
| 40 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param, | 40 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param, |
| 41 const std::string& name_param, | 41 const std::string& name_param, |
| 42 const std::string& device_param, |
| 43 const std::string& group_param) |
| 44 : device(service_param, device_param, name_param, group_param), |
| 45 session_id(kNoId) {} |
| 46 |
| 47 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param, |
| 48 const std::string& name_param, |
| 42 const std::string& device_param) | 49 const std::string& device_param) |
| 43 : device(service_param, device_param, name_param), | 50 : StreamDeviceInfo(service_param, name_param, device_param, std::string()) { |
| 44 session_id(kNoId) { | |
| 45 } | 51 } |
| 46 | 52 |
| 47 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param, | 53 StreamDeviceInfo::StreamDeviceInfo(MediaStreamType service_param, |
| 48 const std::string& name_param, | 54 const std::string& name_param, |
| 49 const std::string& device_param, | 55 const std::string& device_param, |
| 56 const std::string& group_param, |
| 50 int sample_rate, | 57 int sample_rate, |
| 51 int channel_layout, | 58 int channel_layout, |
| 52 int frames_per_buffer) | 59 int frames_per_buffer) |
| 53 : device(service_param, device_param, name_param, sample_rate, | 60 : device(service_param, |
| 54 channel_layout, frames_per_buffer), | 61 device_param, |
| 55 session_id(kNoId) { | 62 name_param, |
| 56 } | 63 group_param, |
| 64 sample_rate, |
| 65 channel_layout, |
| 66 frames_per_buffer), |
| 67 session_id(kNoId) {} |
| 57 | 68 |
| 58 // static | 69 // static |
| 59 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first, | 70 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first, |
| 60 const StreamDeviceInfo& second) { | 71 const StreamDeviceInfo& second) { |
| 61 return first.device.IsEqual(second.device) && | 72 return first.device.IsEqual(second.device) && |
| 62 first.session_id == second.session_id; | 73 first.session_id == second.session_id; |
| 63 } | 74 } |
| 64 | 75 |
| 65 } // namespace content | 76 } // namespace content |
| OLD | NEW |