| 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 "media/capture/video/win/pin_base_win.h" | 5 #include "media/capture/video/win/pin_base_win.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 current_media_type_ = *media_type; | 140 current_media_type_ = *media_type; |
| 141 connector->AddRef(); | 141 connector->AddRef(); |
| 142 connected_pin_.Attach(connector); | 142 connected_pin_.Attach(connector); |
| 143 return S_OK; | 143 return S_OK; |
| 144 } | 144 } |
| 145 | 145 |
| 146 STDMETHODIMP PinBase::Disconnect() { | 146 STDMETHODIMP PinBase::Disconnect() { |
| 147 if (!connected_pin_.get()) | 147 if (!connected_pin_.get()) |
| 148 return S_FALSE; | 148 return S_FALSE; |
| 149 | 149 |
| 150 connected_pin_.Release(); | 150 connected_pin_.Reset(); |
| 151 return S_OK; | 151 return S_OK; |
| 152 } | 152 } |
| 153 | 153 |
| 154 STDMETHODIMP PinBase::ConnectedTo(IPin** pin) { | 154 STDMETHODIMP PinBase::ConnectedTo(IPin** pin) { |
| 155 *pin = connected_pin_.get(); | 155 *pin = connected_pin_.get(); |
| 156 if (!connected_pin_.get()) | 156 if (!connected_pin_.get()) |
| 157 return VFW_E_NOT_CONNECTED; | 157 return VFW_E_NOT_CONNECTED; |
| 158 | 158 |
| 159 connected_pin_.get()->AddRef(); | 159 connected_pin_.get()->AddRef(); |
| 160 return S_OK; | 160 return S_OK; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 276 |
| 277 STDMETHODIMP_(ULONG) PinBase::Release() { | 277 STDMETHODIMP_(ULONG) PinBase::Release() { |
| 278 base::RefCounted<PinBase>::Release(); | 278 base::RefCounted<PinBase>::Release(); |
| 279 return 1; | 279 return 1; |
| 280 } | 280 } |
| 281 | 281 |
| 282 PinBase::~PinBase() { | 282 PinBase::~PinBase() { |
| 283 } | 283 } |
| 284 | 284 |
| 285 } // namespace media | 285 } // namespace media |
| OLD | NEW |