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

Side by Side Diff: media/video/capture/win/pin_base_win.cc

Issue 22979002: Remove unnecessary checks and fix shader_bench. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « media/video/capture/win/filter_base_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/video/capture/win/pin_base_win.h" 5 #include "media/video/capture/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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return S_OK; 86 return S_OK;
87 } 87 }
88 88
89 STDMETHOD(Reset)() { 89 STDMETHOD(Reset)() {
90 index_ = 0; 90 index_ = 0;
91 return S_OK; 91 return S_OK;
92 } 92 }
93 93
94 STDMETHOD(Clone)(IEnumMediaTypes** clone) { 94 STDMETHOD(Clone)(IEnumMediaTypes** clone) {
95 TypeEnumerator* type_enum = new TypeEnumerator(pin_); 95 TypeEnumerator* type_enum = new TypeEnumerator(pin_);
96 if (!type_enum)
97 return E_OUTOFMEMORY;
98 type_enum->AddRef(); 96 type_enum->AddRef();
99 type_enum->index_ = index_; 97 type_enum->index_ = index_;
100 *clone = type_enum; 98 *clone = type_enum;
101 return S_OK; 99 return S_OK;
102 } 100 }
103 101
104 private: 102 private:
105 void FreeAllocatedMediaTypes(ULONG allocated, AM_MEDIA_TYPE** types) { 103 void FreeAllocatedMediaTypes(ULONG allocated, AM_MEDIA_TYPE** types) {
106 for (ULONG i = 0; i < allocated; ++i) { 104 for (ULONG i = 0; i < allocated; ++i) {
107 CoTaskMemFree(types[i]->pbFormat); 105 CoTaskMemFree(types[i]->pbFormat);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 base::RefCounted<PinBase>::AddRef(); 271 base::RefCounted<PinBase>::AddRef();
274 return 1; 272 return 1;
275 } 273 }
276 274
277 STDMETHODIMP_(ULONG) PinBase::Release() { 275 STDMETHODIMP_(ULONG) PinBase::Release() {
278 base::RefCounted<PinBase>::Release(); 276 base::RefCounted<PinBase>::Release();
279 return 1; 277 return 1;
280 } 278 }
281 279
282 } // namespace media 280 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/win/filter_base_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698