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

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

Issue 8965054: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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/pin_base_win.cc ('k') | ppapi/proxy/ppp_mouse_lock_proxy.cc » ('j') | 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) 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/video/capture/win/video_capture_device_win.h" 5 #include "media/video/capture/win/video_capture_device_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 VideoCaptureDeviceWin* self = new VideoCaptureDeviceWin(device_name); 245 VideoCaptureDeviceWin* self = new VideoCaptureDeviceWin(device_name);
246 if (self && self->Init()) 246 if (self && self->Init())
247 return self; 247 return self;
248 248
249 delete self; 249 delete self;
250 return NULL; 250 return NULL;
251 } 251 }
252 252
253 VideoCaptureDeviceWin::VideoCaptureDeviceWin(const Name& device_name) 253 VideoCaptureDeviceWin::VideoCaptureDeviceWin(const Name& device_name)
254 : device_name_(device_name), 254 : device_name_(device_name),
255 state_(kIdle) { 255 state_(kIdle),
256 observer_(NULL) {
256 } 257 }
257 258
258 VideoCaptureDeviceWin::~VideoCaptureDeviceWin() { 259 VideoCaptureDeviceWin::~VideoCaptureDeviceWin() {
259 if (media_control_) 260 if (media_control_)
260 media_control_->Stop(); 261 media_control_->Stop();
261 262
262 if (graph_builder_) { 263 if (graph_builder_) {
263 if (sink_filter_) { 264 if (sink_filter_) {
264 graph_builder_->RemoveFilter(sink_filter_); 265 graph_builder_->RemoveFilter(sink_filter_);
265 sink_filter_ = NULL; 266 sink_filter_ = NULL;
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 return diff_list.front().capability_index; 648 return diff_list.front().capability_index;
648 } 649 }
649 650
650 void VideoCaptureDeviceWin::SetErrorState(const char* reason) { 651 void VideoCaptureDeviceWin::SetErrorState(const char* reason) {
651 DLOG(ERROR) << reason; 652 DLOG(ERROR) << reason;
652 state_ = kError; 653 state_ = kError;
653 observer_->OnError(); 654 observer_->OnError();
654 } 655 }
655 656
656 } // namespace media 657 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/win/pin_base_win.cc ('k') | ppapi/proxy/ppp_mouse_lock_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698