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

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

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: address comments on PS#3 Created 3 years, 10 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 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_H_ 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_H_
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_H_ 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_H_
7 7
8 #include "media/capture/capture_export.h" 8 #include "media/capture/capture_export.h"
9 #include "media/capture/video/video_capture_device.h" 9 #include "media/capture/video/video_capture_device.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 // Callback interface for VideoCaptureDeviceClient to communicate with its 13 // Callback interface for VideoCaptureDeviceClient to communicate with its
14 // clients. 14 // clients.
15 class CAPTURE_EXPORT VideoFrameReceiver { 15 class CAPTURE_EXPORT VideoFrameReceiver {
16 public: 16 public:
17 virtual ~VideoFrameReceiver(){}; 17 virtual ~VideoFrameReceiver(){};
18 18
19 virtual void OnIncomingCapturedVideoFrame( 19 virtual void OnIncomingCapturedVideoFrame(
20 media::VideoCaptureDevice::Client::Buffer buffer, 20 media::VideoCaptureDevice::Client::Buffer buffer,
21 scoped_refptr<media::VideoFrame> frame) = 0; 21 scoped_refptr<media::VideoFrame> frame) = 0;
22 virtual void OnError() = 0; 22 virtual void OnError() = 0;
23 virtual void OnLog(const std::string& message) = 0; 23 virtual void OnLog(const std::string& message) = 0;
24 virtual void OnStarted() = 0;
24 25
25 // Tells the VideoFrameReceiver that the producer is no longer going to use 26 // Tells the VideoFrameReceiver that the producer is no longer going to use
26 // the buffer with id |buffer_id| for frame delivery. This may be called even 27 // the buffer with id |buffer_id| for frame delivery. This may be called even
27 // while the receiver is still consuming the buffer from a call to 28 // while the receiver is still consuming the buffer from a call to
28 // OnIncomingCapturedVideoFrame(). In that case, it means that the 29 // OnIncomingCapturedVideoFrame(). In that case, it means that the
29 // caller is asking the VideoFrameReceiver to release the buffer 30 // caller is asking the VideoFrameReceiver to release the buffer
30 // at its earliest convenience. 31 // at its earliest convenience.
31 // A producer may reuse a retired |buffer_id| immediately after this call. 32 // A producer may reuse a retired |buffer_id| immediately after this call.
32 virtual void OnBufferRetired(int buffer_id) = 0; 33 virtual void OnBufferRetired(int buffer_id) = 0;
33 }; 34 };
34 35
35 } // namespace media 36 } // namespace media
36 37
37 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_H_ 38 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698