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

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

Issue 2361173002: Move classses VideoCaptureDeviceClient and VideoCaptureBufferPool to media/capture/video (Closed)
Patch Set: mcasas@ comments Created 4 years, 3 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 | « media/capture/video/video_capture_device_client.cc ('k') | media/capture/video/video_frame_receiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/video_capture_jpeg_decoder.h
diff --git a/media/capture/video/video_capture_jpeg_decoder.h b/media/capture/video/video_capture_jpeg_decoder.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9d91dcce88e02a3398fc7a678af882f7b64d5e2
--- /dev/null
+++ b/media/capture/video/video_capture_jpeg_decoder.h
@@ -0,0 +1,45 @@
+// 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 "base/callback.h"
+#include "media/capture/capture_export.h"
+#include "media/capture/video/video_capture_device.h"
+
+namespace media {
+
+class CAPTURE_EXPORT VideoCaptureJpegDecoder {
+ public:
+ // Enumeration of decoder status. The enumeration is published for clients to
+ // decide the behavior according to STATUS.
+ enum STATUS {
+ INIT_PENDING, // Default value while waiting initialization finished.
+ INIT_PASSED, // Initialization succeed.
+ FAILED, // JPEG decode is not supported, initialization failed, or
+ // decode error.
+ };
+
+ using DecodeDoneCB = base::Callback<void(
+ std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>,
+ const scoped_refptr<media::VideoFrame>&)>;
+
+ virtual ~VideoCaptureJpegDecoder() {}
+
+ // Creates and intializes decoder asynchronously.
+ virtual void Initialize() = 0;
+
+ // Returns initialization status.
+ virtual STATUS GetStatus() const = 0;
+
+ // Decodes a JPEG picture.
+ virtual void DecodeCapturedData(
+ const uint8_t* data,
+ size_t in_buffer_size,
+ const media::VideoCaptureFormat& frame_format,
+ base::TimeTicks reference_time,
+ base::TimeDelta timestamp,
+ std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>
+ out_buffer) = 0;
+};
+
+} // namespace media
« no previous file with comments | « media/capture/video/video_capture_device_client.cc ('k') | media/capture/video/video_frame_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698