Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |