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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller_event_handler.h

Issue 83793004: Implement IPCs and VideoCapture::Client interfaces for texture capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: e296ac98 Win32 bits. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDL ER_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "media/video/capture/video_capture_types.h" 11
12 namespace gpu {
13 struct MailboxHolder;
14 } // namespace gpu
15
16 namespace media {
17 class VideoCaptureFormat;
18 } // namespace media
12 19
13 namespace content { 20 namespace content {
14 21
15 // ID used for identifying an object of VideoCaptureController. 22 // ID used for identifying an object of VideoCaptureController.
16 struct CONTENT_EXPORT VideoCaptureControllerID { 23 struct CONTENT_EXPORT VideoCaptureControllerID {
17 explicit VideoCaptureControllerID(int device_id); 24 explicit VideoCaptureControllerID(int device_id);
18 25
19 bool operator<(const VideoCaptureControllerID& vc) const; 26 bool operator<(const VideoCaptureControllerID& vc) const;
20 bool operator==(const VideoCaptureControllerID& vc) const; 27 bool operator==(const VideoCaptureControllerID& vc) const;
21 28
(...skipping 14 matching lines...) Expand all
36 int length, 43 int length,
37 int buffer_id) = 0; 44 int buffer_id) = 0;
38 45
39 // A previously created buffer has been freed and will no longer be used. 46 // A previously created buffer has been freed and will no longer be used.
40 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id, 47 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id,
41 int buffer_id) = 0; 48 int buffer_id) = 0;
42 49
43 // A buffer has been filled with I420 video. 50 // A buffer has been filled with I420 video.
44 virtual void OnBufferReady(const VideoCaptureControllerID& id, 51 virtual void OnBufferReady(const VideoCaptureControllerID& id,
45 int buffer_id, 52 int buffer_id,
46 base::TimeTicks timestamp, 53 const media::VideoCaptureFormat& format,
47 const media::VideoCaptureFormat& format) = 0; 54 base::TimeTicks timestamp) = 0;
55
56 // A texture mailbox buffer has been filled with data.
57 virtual void OnMailboxBufferReady(const VideoCaptureControllerID& id,
58 int buffer_id,
59 const gpu::MailboxHolder& mailbox_holder,
60 const media::VideoCaptureFormat& format,
61 base::TimeTicks timestamp) = 0;
48 62
49 // The capture session has ended and no more frames will be sent. 63 // The capture session has ended and no more frames will be sent.
50 virtual void OnEnded(const VideoCaptureControllerID& id) = 0; 64 virtual void OnEnded(const VideoCaptureControllerID& id) = 0;
51 65
52 protected: 66 protected:
53 virtual ~VideoCaptureControllerEventHandler() {} 67 virtual ~VideoCaptureControllerEventHandler() {}
54 }; 68 };
55 69
56 } // namespace content 70 } // namespace content
57 71
58 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_ 72 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698