| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/filter_base_win.h" | 5 #include "media/capture/video/win/filter_base_win.h" |
| 6 | 6 |
| 7 #pragma comment(lib, "strmiids.lib") | 7 #pragma comment(lib, "strmiids.lib") |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 STDMETHOD_(ULONG, Release)() override { | 32 STDMETHOD_(ULONG, Release)() override { |
| 33 base::RefCounted<PinEnumerator>::Release(); | 33 base::RefCounted<PinEnumerator>::Release(); |
| 34 return 1; | 34 return 1; |
| 35 } | 35 } |
| 36 | 36 |
| 37 // Implement IEnumPins. | 37 // Implement IEnumPins. |
| 38 STDMETHOD(Next)(ULONG count, IPin** pins, ULONG* fetched) override { | 38 STDMETHOD(Next)(ULONG count, IPin** pins, ULONG* fetched) override { |
| 39 ULONG pins_fetched = 0; | 39 ULONG pins_fetched = 0; |
| 40 while (pins_fetched < count && filter_->NoOfPins() > index_) { | 40 while (pins_fetched < count && filter_->NoOfPins() > index_) { |
| 41 index_++; | 41 IPin* pin = filter_->GetPin(index_++); |
| 42 IPin* pin = filter_->GetPin(static_cast<int>(index_)); | |
| 43 pin->AddRef(); | 42 pin->AddRef(); |
| 44 pins[pins_fetched++] = pin; | 43 pins[pins_fetched++] = pin; |
| 45 } | 44 } |
| 46 | 45 |
| 47 if (fetched) | 46 if (fetched) |
| 48 *fetched = pins_fetched; | 47 *fetched = pins_fetched; |
| 49 | 48 |
| 50 return pins_fetched == count ? S_OK : S_FALSE; | 49 return pins_fetched == count ? S_OK : S_FALSE; |
| 51 } | 50 } |
| 52 | 51 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 164 |
| 166 ULONG STDMETHODCALLTYPE FilterBase::Release() { | 165 ULONG STDMETHODCALLTYPE FilterBase::Release() { |
| 167 base::RefCounted<FilterBase>::Release(); | 166 base::RefCounted<FilterBase>::Release(); |
| 168 return 1; | 167 return 1; |
| 169 } | 168 } |
| 170 | 169 |
| 171 FilterBase::~FilterBase() { | 170 FilterBase::~FilterBase() { |
| 172 } | 171 } |
| 173 | 172 |
| 174 } // namespace media | 173 } // namespace media |
| OLD | NEW |