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

Unified Diff: media/capture/video/video_capture_device_client.h

Issue 2583603002: [Mojo Video Capture] Split OnIncomingCapturedVideoFrame() to OnNewBuffer() + OnFrameReadyInBuffer() (Closed)
Patch Set: Improve naming and fix Android background issue Created 4 years 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 | « media/capture/video/video_capture_device.h ('k') | media/capture/video/video_capture_device_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/video_capture_device_client.h
diff --git a/media/capture/video/video_capture_device_client.h b/media/capture/video/video_capture_device_client.h
index cc0c3e8cdb8d2cb7419e6ddf800eb29f159771a1..0946251e38c1e9f6b00f96674f377be2ffa20c7a 100644
--- a/media/capture/video/video_capture_device_client.h
+++ b/media/capture/video/video_capture_device_client.h
@@ -9,10 +9,12 @@
#include <stdint.h>
#include <memory>
+#include <set>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_collision_warner.h"
#include "media/capture/capture_export.h"
#include "media/capture/video/video_capture_device.h"
@@ -103,6 +105,7 @@ class CAPTURE_EXPORT VideoCaptureDeviceClient
// The receiver to which we post events.
const std::unique_ptr<VideoFrameReceiver> receiver_;
+ std::set<int> buffer_ids_known_by_receiver_;
const VideoCaptureJpegDecoderFactoryCB jpeg_decoder_factory_callback_;
std::unique_ptr<VideoCaptureJpegDecoder> external_jpeg_decoder_;
@@ -123,6 +126,11 @@ class CAPTURE_EXPORT VideoCaptureDeviceClient
media::VideoPixelFormat last_captured_pixel_format_;
+ // Thread collision warner to ensure that producer-facing API is not called
+ // concurrently. Producers are allowed to call from multiple threads, but not
+ // concurrently.
+ DFAKE_MUTEX(call_from_producer_);
+
DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient);
};
« no previous file with comments | « media/capture/video/video_capture_device.h ('k') | media/capture/video/video_capture_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698