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

Side by Side Diff: media/capture/screen_capture_device_core.cc

Issue 1179323002: Video Capture: extract storage info from pixel format in VideoCaptureFormat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: second round of comments from hubbe@. Rebase Created 5 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/screen_capture_device_core.h" 5 #include "media/capture/screen_capture_device_core.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 24 matching lines...) Expand all
35 35
36 if (params.requested_format.frame_rate <= 0) { 36 if (params.requested_format.frame_rate <= 0) {
37 std::string error_msg("Invalid frame_rate: "); 37 std::string error_msg("Invalid frame_rate: ");
38 error_msg += base::DoubleToString(params.requested_format.frame_rate); 38 error_msg += base::DoubleToString(params.requested_format.frame_rate);
39 DVLOG(1) << error_msg; 39 DVLOG(1) << error_msg;
40 client->OnError(error_msg); 40 client->OnError(error_msg);
41 return; 41 return;
42 } 42 }
43 43
44 if (params.requested_format.pixel_format != PIXEL_FORMAT_I420 && 44 if (params.requested_format.pixel_format != PIXEL_FORMAT_I420 &&
45 params.requested_format.pixel_format != PIXEL_FORMAT_TEXTURE) { 45 params.requested_format.pixel_storage != PIXEL_STORAGE_TEXTURE) {
miu 2015/06/23 22:58:15 I think the logical-AND should be a logical-OR now
mcasas 2015/06/23 23:24:43 Done.
miu 2015/06/23 23:35:55 Oh wait. I might have misled you here. I think t
mcasas 2015/06/24 00:16:39 Done.
46 std::string error_msg = base::StringPrintf( 46 std::string error_msg = base::StringPrintf(
47 "unsupported format: %d", params.requested_format.pixel_format); 47 "unsupported format: %d", params.requested_format.pixel_format);
miu 2015/06/23 22:58:15 Please update error message to include storage tex
mcasas 2015/06/23 23:24:43 Done.
48 DVLOG(1) << error_msg; 48 DVLOG(1) << error_msg;
49 client->OnError(error_msg); 49 client->OnError(error_msg);
50 return; 50 return;
51 } 51 }
52 52
53 if (params.requested_format.frame_size.IsEmpty()) { 53 if (params.requested_format.frame_size.IsEmpty()) {
54 std::string error_msg = 54 std::string error_msg =
55 "invalid frame size: " + params.requested_format.frame_size.ToString(); 55 "invalid frame size: " + params.requested_format.frame_size.ToString();
56 DVLOG(1) << error_msg; 56 DVLOG(1) << error_msg;
57 client->OnError(error_msg); 57 client->OnError(error_msg);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return; 129 return;
130 130
131 if (oracle_proxy_.get()) 131 if (oracle_proxy_.get())
132 oracle_proxy_->ReportError(reason); 132 oracle_proxy_->ReportError(reason);
133 133
134 StopAndDeAllocate(); 134 StopAndDeAllocate();
135 TransitionStateTo(kError); 135 TransitionStateTo(kError);
136 } 136 }
137 137
138 } // namespace media 138 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698