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

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

Issue 2583603002: [Mojo Video Capture] Split OnIncomingCapturedVideoFrame() to OnNewBuffer() + OnFrameReadyInBuffer() (Closed)
Patch Set: Improve naming and fix Android background issue Created 3 years, 11 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
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/mojo/video_capture_types.mojom.h"
7 #include "media/capture/video/video_capture_device.h" 8 #include "media/capture/video/video_capture_device.h"
9 #include "media/capture/video/video_frame_receiver.h"
8 10
9 namespace media { 11 namespace media {
10 12
11 class CAPTURE_EXPORT VideoCaptureJpegDecoder { 13 class CAPTURE_EXPORT VideoCaptureJpegDecoder {
12 public: 14 public:
13 // Enumeration of decoder status. The enumeration is published for clients to 15 // Enumeration of decoder status. The enumeration is published for clients to
14 // decide the behavior according to STATUS. 16 // decide the behavior according to STATUS.
15 enum STATUS { 17 enum STATUS {
16 INIT_PENDING, // Default value while waiting initialization finished. 18 INIT_PENDING, // Default value while waiting initialization finished.
17 INIT_PASSED, // Initialization succeed. 19 INIT_PASSED, // Initialization succeed.
18 FAILED, // JPEG decode is not supported, initialization failed, or 20 FAILED, // JPEG decode is not supported, initialization failed, or
19 // decode error. 21 // decode error.
20 }; 22 };
21 23
22 using DecodeDoneCB = 24 using DecodeDoneCB =
23 base::Callback<void(media::VideoCaptureDevice::Client::Buffer, 25 base::Callback<void(int buffer_id,
24 scoped_refptr<media::VideoFrame>)>; 26 int frame_feedback_id,
27 std::unique_ptr<Ownership> buffer_read_permission,
28 mojom::VideoFrameInfoPtr frame_info)>;
25 29
26 virtual ~VideoCaptureJpegDecoder() {} 30 virtual ~VideoCaptureJpegDecoder() {}
27 31
28 // Creates and intializes decoder asynchronously. 32 // Creates and intializes decoder asynchronously.
29 virtual void Initialize() = 0; 33 virtual void Initialize() = 0;
30 34
31 // Returns initialization status. 35 // Returns initialization status.
32 virtual STATUS GetStatus() const = 0; 36 virtual STATUS GetStatus() const = 0;
33 37
34 // Decodes a JPEG picture. 38 // Decodes a JPEG picture.
35 virtual void DecodeCapturedData( 39 virtual void DecodeCapturedData(
36 const uint8_t* data, 40 const uint8_t* data,
37 size_t in_buffer_size, 41 size_t in_buffer_size,
38 const media::VideoCaptureFormat& frame_format, 42 const media::VideoCaptureFormat& frame_format,
39 base::TimeTicks reference_time, 43 base::TimeTicks reference_time,
40 base::TimeDelta timestamp, 44 base::TimeDelta timestamp,
41 media::VideoCaptureDevice::Client::Buffer out_buffer) = 0; 45 media::VideoCaptureDevice::Client::Buffer out_buffer) = 0;
42 }; 46 };
43 47
44 } // namespace media 48 } // 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