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

Side by Side Diff: webrtc/test/vcm_capturer.cc

Issue 2765243002: Delete RawVideoType enum, use the VideoType enum instead. (Closed)
Patch Set: Define constant webrtc::kI420, for backwards compatibility. Created 3 years, 7 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
« no previous file with comments | « webrtc/test/gl/gl_renderer.cc ('k') | webrtc/test/win/d3d_renderer.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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 vcm_ = webrtc::VideoCaptureFactory::Create(unique_name); 35 vcm_ = webrtc::VideoCaptureFactory::Create(unique_name);
36 vcm_->RegisterCaptureDataCallback(this); 36 vcm_->RegisterCaptureDataCallback(this);
37 37
38 device_info->GetCapability(vcm_->CurrentDeviceName(), 0, capability_); 38 device_info->GetCapability(vcm_->CurrentDeviceName(), 0, capability_);
39 39
40 capability_.width = static_cast<int32_t>(width); 40 capability_.width = static_cast<int32_t>(width);
41 capability_.height = static_cast<int32_t>(height); 41 capability_.height = static_cast<int32_t>(height);
42 capability_.maxFPS = static_cast<int32_t>(target_fps); 42 capability_.maxFPS = static_cast<int32_t>(target_fps);
43 capability_.rawType = kVideoI420; 43 capability_.videoType = VideoType::kI420;
44 44
45 if (vcm_->StartCapture(capability_) != 0) { 45 if (vcm_->StartCapture(capability_) != 0) {
46 Destroy(); 46 Destroy();
47 return false; 47 return false;
48 } 48 }
49 49
50 RTC_CHECK(vcm_->CaptureStarted()); 50 RTC_CHECK(vcm_->CaptureStarted());
51 51
52 return true; 52 return true;
53 } 53 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 rtc::CritScope lock(&crit_); 105 rtc::CritScope lock(&crit_);
106 if (started_ && sink_) { 106 if (started_ && sink_) {
107 rtc::Optional<VideoFrame> out_frame = AdaptFrame(frame); 107 rtc::Optional<VideoFrame> out_frame = AdaptFrame(frame);
108 if (out_frame) 108 if (out_frame)
109 sink_->OnFrame(*out_frame); 109 sink_->OnFrame(*out_frame);
110 } 110 }
111 } 111 }
112 112
113 } // test 113 } // test
114 } // webrtc 114 } // webrtc
OLDNEW
« no previous file with comments | « webrtc/test/gl/gl_renderer.cc ('k') | webrtc/test/win/d3d_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698