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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/callback.h"
6 #include "media/capture/capture_export.h"
7 #include "media/capture/video/video_capture_device.h"
8
9 namespace media {
10
11 class CAPTURE_EXPORT VideoCaptureJpegDecoder {
12 public:
13 // Enumeration of decoder status. The enumeration is published for clients to
14 // decide the behavior according to STATUS.
15 enum STATUS {
16 INIT_PENDING, // Default value while waiting initialization finished.
17 INIT_PASSED, // Initialization succeed.
18 FAILED, // JPEG decode is not supported, initialization failed, or
19 // decode error.
20 };
21
22 using DecodeDoneCB = base::Callback<void(
23 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>,
24 const scoped_refptr<media::VideoFrame>&)>;
25
26 virtual ~VideoCaptureJpegDecoder() {}
27
28 // Creates and intializes decoder asynchronously.
29 virtual void Initialize() = 0;
30
31 // Returns initialization status.
32 virtual STATUS GetStatus() const = 0;
33
34 // Decodes a JPEG picture.
35 virtual void DecodeCapturedData(
36 const uint8_t* data,
37 size_t in_buffer_size,
38 const media::VideoCaptureFormat& frame_format,
39 base::TimeTicks reference_time,
40 base::TimeDelta timestamp,
41 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer>
42 out_buffer) = 0;
43 };
44
45 } // namespace media
OLDNEW
« 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