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

Unified Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 846393002: Add camera color format to webrtc logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_controller.cc
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index f05d93fc265be8f968b49fa14ae121ebae66111a..567380526f6384f25d78b50ace4d81810fe9251d 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -179,6 +179,8 @@ class VideoCaptureController::VideoCaptureDeviceClient
// The pool of shared-memory buffers used for capturing.
const scoped_refptr<VideoCaptureBufferPool> buffer_pool_;
+
+ media::VideoPixelFormat last_captured_pixel_format_;
};
VideoCaptureController::VideoCaptureController(int max_buffers)
@@ -191,7 +193,10 @@ VideoCaptureController::VideoCaptureController(int max_buffers)
VideoCaptureController::VideoCaptureDeviceClient::VideoCaptureDeviceClient(
const base::WeakPtr<VideoCaptureController>& controller,
const scoped_refptr<VideoCaptureBufferPool>& buffer_pool)
- : controller_(controller), buffer_pool_(buffer_pool) {}
+ : controller_(controller),
+ buffer_pool_(buffer_pool),
+ last_captured_pixel_format_(media::PIXEL_FORMAT_UNKNOWN) {
+}
VideoCaptureController::VideoCaptureDeviceClient::~VideoCaptureDeviceClient() {}
@@ -348,6 +353,12 @@ void VideoCaptureController::VideoCaptureDeviceClient::OnIncomingCapturedData(
base::TimeTicks timestamp) {
TRACE_EVENT0("video", "VideoCaptureController::OnIncomingCapturedData");
+ if (last_captured_pixel_format_ != frame_format.pixel_format) {
+ OnLog("Pixel format: " + media::VideoCaptureFormat::PixelFormatToString(
+ frame_format.pixel_format));
+ last_captured_pixel_format_ = frame_format.pixel_format;
+ }
+
if (!frame_format.IsValid())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698