Joe Downing
92fa17660f
Fixing the error logging in desktop_capture for Windows
...
The desktop_capture code logs failed HRESULTs in several places,
the problem is that it tries to use a wchar* (when a char*
is required) for the error message and doesn't display the HRESULT
in hex. This makes the error logging less useful than it could be.
Example failure: error 08406B28, with code -2005270488
In this CL, I add a simple utility function to convert a _com_error
object to a std::string whic can be logged. With this change the
output looks like this (linebreak added for CL description):
Failed to capture frame: HRESULT: 0x887A0026,
Message: 'The keyed mutex was abandoned.'
I also adjusted the formatting of a few logging statements to be
more consistent (adding '<<' operators mostly).
Bug: webrtc:12051
Change-Id: I3e88ff6f2ff079fbe210626e1e89b2b053a742a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188522
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/master@{#32417}
2020-10-15 19:09:36 +00:00
..
2020-10-14 08:26:18 +00:00
2020-07-13 12:22:08 +00:00
2020-10-15 19:09:36 +00:00
2019-04-09 17:18:20 +00:00
2020-02-18 22:36:00 +00:00
2020-02-18 22:36:00 +00:00
2020-10-15 19:09:36 +00:00
2019-01-11 21:16:22 +00:00
2018-11-28 18:25:07 +00:00
2019-09-17 15:47:29 +00:00
2019-07-08 13:45:15 +00:00
2018-11-28 18:25:07 +00:00
2019-12-13 10:06:07 +00:00
2019-07-08 13:45:15 +00:00
2019-12-03 19:17:24 +00:00
2018-04-10 00:37:59 +00:00
2020-01-24 20:16:58 +00:00
2020-02-18 22:36:00 +00:00
2020-02-18 22:36:00 +00:00
2020-10-14 08:26:18 +00:00
2020-10-14 08:26:18 +00:00
2018-07-25 14:59:26 +00:00
2019-04-09 17:18:20 +00:00
2019-07-08 13:45:15 +00:00
2019-10-23 23:34:46 +00:00
2017-09-15 18:56:26 +00:00
2018-11-28 18:25:07 +00:00
2020-10-02 07:29:31 +00:00
2019-12-13 09:36:25 +00:00
2019-07-08 13:45:15 +00:00
2017-09-15 05:02:56 +00:00
2018-11-28 18:25:07 +00:00
2018-11-28 18:25:07 +00:00
2017-09-15 05:02:56 +00:00
2019-09-17 15:47:29 +00:00
2018-06-19 14:00:39 +00:00
2019-07-08 13:45:15 +00:00
2019-09-17 15:47:29 +00:00
2020-10-02 07:29:31 +00:00
2017-09-15 05:02:56 +00:00
2019-08-21 07:55:07 +00:00
2020-02-26 20:35:54 +00:00
2019-07-08 13:45:15 +00:00
2019-07-08 13:45:15 +00:00
2019-11-07 09:32:24 +00:00
2018-11-28 18:25:07 +00:00
2020-09-07 08:44:24 +00:00
2018-06-19 14:00:39 +00:00
2018-06-19 14:00:39 +00:00
2017-09-15 05:02:56 +00:00
2018-11-28 18:25:07 +00:00
2018-11-28 18:25:07 +00:00
2019-07-08 13:45:15 +00:00
2019-07-08 13:45:15 +00:00
2018-12-22 00:10:40 +00:00
2019-12-03 19:17:24 +00:00
2019-12-03 19:17:24 +00:00
2019-12-03 19:17:24 +00:00
2019-12-03 19:17:24 +00:00
2017-09-15 05:02:56 +00:00
2020-05-28 14:11:53 +00:00
2019-12-13 09:36:25 +00:00
2019-12-03 19:17:24 +00:00
2019-07-08 13:45:15 +00:00
2020-09-07 18:29:13 +00:00
2019-08-21 07:55:07 +00:00
2020-01-17 23:14:21 +00:00
2018-06-19 14:00:39 +00:00
2019-04-02 10:13:36 +00:00
2020-09-15 21:34:24 +00:00
2017-09-15 05:02:56 +00:00
2017-09-15 05:02:56 +00:00
2018-11-28 18:25:07 +00:00
2019-07-08 13:45:15 +00:00
2017-09-15 05:02:56 +00:00
2019-01-11 17:11:39 +00:00
2018-04-10 00:37:59 +00:00
2019-04-09 17:18:20 +00:00
2018-11-28 18:25:07 +00:00
2019-01-11 17:11:39 +00:00
2019-04-09 17:18:20 +00:00
2020-10-14 08:26:18 +00:00
2019-04-09 17:18:20 +00:00
2017-09-15 05:02:56 +00:00
2019-12-16 09:57:59 +00:00
2018-06-19 14:00:39 +00:00
2019-09-17 15:47:29 +00:00
2017-11-09 11:56:32 +00:00
2017-09-15 05:02:56 +00:00
2019-09-17 15:47:29 +00:00
2019-12-16 09:57:59 +00:00
2017-09-15 05:02:56 +00:00
2017-09-15 05:02:56 +00:00
2018-11-28 18:25:07 +00:00
2018-11-28 18:25:07 +00:00
2019-01-25 20:29:58 +00:00
2018-06-19 14:00:39 +00:00
2019-10-15 09:07:44 +00:00
2019-12-16 09:57:59 +00:00
2018-11-28 18:25:07 +00:00
2017-09-15 05:02:56 +00:00
2020-10-14 08:26:18 +00:00
2019-12-03 19:17:24 +00:00
2019-01-11 17:11:39 +00:00
2019-12-16 09:57:59 +00:00
2020-10-02 07:29:31 +00:00
2019-01-25 20:29:58 +00:00
2019-12-03 19:17:24 +00:00
2019-12-13 09:36:25 +00:00
2019-09-17 15:47:29 +00:00
2017-09-15 05:02:56 +00:00
2017-11-07 01:49:35 +00:00
2019-12-13 09:36:25 +00:00