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

Side by Side Diff: media/capture/video/video_capture_jpeg_decoder.h

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

Powered by Google App Engine
This is Rietveld 408576698