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

Unified Diff: services/video_capture/buffer_tracker_factory_impl.cc

Issue 2378943002: Let clients interact with VideoCaptureDeviceClient instead of VideoCaptureDevice (Closed)
Patch Set: mcasas comments Created 4 years, 2 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
Index: services/video_capture/buffer_tracker_factory_impl.cc
diff --git a/services/video_capture/buffer_tracker_factory_impl.cc b/services/video_capture/buffer_tracker_factory_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ac0317e0f4244b59fa5c006ddd819d89069e5091
--- /dev/null
+++ b/services/video_capture/buffer_tracker_factory_impl.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/video_capture/buffer_tracker_factory_impl.h"
+
+#include "base/memory/ptr_util.h"
+#include "services/video_capture/mojo_shared_memory_buffer_tracker.h"
+
+namespace video_capture {
+
+std::unique_ptr<media::VideoCaptureBufferTracker>
+BufferTrackerFactoryImpl::CreateTracker(media::VideoPixelStorage storage) {
+ switch (storage) {
+ case media::PIXEL_STORAGE_GPUMEMORYBUFFER:
+ // TODO(chfremer): Think about how to implement this.
+ NOTIMPLEMENTED();
+ return std::unique_ptr<media::VideoCaptureBufferTracker>();
+ case media::PIXEL_STORAGE_CPU:
+ return base::MakeUnique<MojoSharedMemoryBufferTracker>();
+ }
+ NOTREACHED();
+ return std::unique_ptr<media::VideoCaptureBufferTracker>();
+}
+
+} // namespace video_capture

Powered by Google App Engine
This is Rietveld 408576698