OLD | NEW |
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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "media/base/video_types.h" |
12 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
13 #include "ui/gfx/gpu_memory_buffer.h" | 14 #include "ui/gfx/gpu_memory_buffer.h" |
14 | 15 |
15 namespace media { | 16 namespace media { |
16 class VideoFrame; | 17 class VideoFrame; |
17 } // namespace media | 18 } // namespace media |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 | 21 |
21 typedef int VideoCaptureControllerID; | 22 typedef int VideoCaptureControllerID; |
(...skipping 10 matching lines...) Expand all Loading... |
32 virtual void OnBufferCreated(VideoCaptureControllerID id, | 33 virtual void OnBufferCreated(VideoCaptureControllerID id, |
33 base::SharedMemoryHandle handle, | 34 base::SharedMemoryHandle handle, |
34 int length, | 35 int length, |
35 int buffer_id) = 0; | 36 int buffer_id) = 0; |
36 | 37 |
37 // A GpuMemoryBuffer backed buffer has been newly created. | 38 // A GpuMemoryBuffer backed buffer has been newly created. |
38 virtual void OnBufferCreated2( | 39 virtual void OnBufferCreated2( |
39 VideoCaptureControllerID id, | 40 VideoCaptureControllerID id, |
40 const std::vector<gfx::GpuMemoryBufferHandle>& handles, | 41 const std::vector<gfx::GpuMemoryBufferHandle>& handles, |
41 const gfx::Size& size, | 42 const gfx::Size& size, |
| 43 media::VideoPixelFormat format, |
42 int buffer_id) = 0; | 44 int buffer_id) = 0; |
43 | 45 |
44 // 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. |
45 virtual void OnBufferDestroyed(VideoCaptureControllerID id, | 47 virtual void OnBufferDestroyed(VideoCaptureControllerID id, |
46 int buffer_id) = 0; | 48 int buffer_id) = 0; |
47 | 49 |
48 // A buffer has been filled with a captured VideoFrame. | 50 // A buffer has been filled with a captured VideoFrame. |
49 virtual void OnBufferReady(VideoCaptureControllerID id, | 51 virtual void OnBufferReady(VideoCaptureControllerID id, |
50 int buffer_id, | 52 int buffer_id, |
51 const scoped_refptr<media::VideoFrame>& frame) = 0; | 53 const scoped_refptr<media::VideoFrame>& frame) = 0; |
52 | 54 |
53 // The capture session has ended and no more frames will be sent. | 55 // The capture session has ended and no more frames will be sent. |
54 virtual void OnEnded(VideoCaptureControllerID id) = 0; | 56 virtual void OnEnded(VideoCaptureControllerID id) = 0; |
55 | 57 |
56 protected: | 58 protected: |
57 virtual ~VideoCaptureControllerEventHandler() {} | 59 virtual ~VideoCaptureControllerEventHandler() {} |
58 }; | 60 }; |
59 | 61 |
60 } // namespace content | 62 } // namespace content |
61 | 63 |
62 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA
NDLER_H_ | 64 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA
NDLER_H_ |
OLD | NEW |