| 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 "content/common/video_capture.mojom.h" |
| 12 #include "mojo/public/cpp/system/buffer.h" | 13 #include "mojo/public/cpp/system/buffer.h" |
| 13 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.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 11 matching lines...) Expand all Loading... |
| 33 virtual void OnBufferCreated(VideoCaptureControllerID id, | 34 virtual void OnBufferCreated(VideoCaptureControllerID id, |
| 34 mojo::ScopedSharedBufferHandle handle, | 35 mojo::ScopedSharedBufferHandle handle, |
| 35 int length, | 36 int length, |
| 36 int buffer_id) = 0; | 37 int buffer_id) = 0; |
| 37 | 38 |
| 38 // A previously created buffer has been freed and will no longer be used. | 39 // A previously created buffer has been freed and will no longer be used. |
| 39 virtual void OnBufferDestroyed(VideoCaptureControllerID id, | 40 virtual void OnBufferDestroyed(VideoCaptureControllerID id, |
| 40 int buffer_id) = 0; | 41 int buffer_id) = 0; |
| 41 | 42 |
| 42 // A buffer has been filled with a captured VideoFrame. | 43 // A buffer has been filled with a captured VideoFrame. |
| 43 virtual void OnBufferReady(VideoCaptureControllerID id, | 44 virtual void OnBufferReady( |
| 44 int buffer_id, | 45 VideoCaptureControllerID id, |
| 45 const scoped_refptr<media::VideoFrame>& frame) = 0; | 46 int buffer_id, |
| 47 const media::mojom::VideoFrameInfoPtr& frame_info) = 0; |
| 46 | 48 |
| 47 // The capture session has ended and no more frames will be sent. | 49 // The capture session has ended and no more frames will be sent. |
| 48 virtual void OnEnded(VideoCaptureControllerID id) = 0; | 50 virtual void OnEnded(VideoCaptureControllerID id) = 0; |
| 49 | 51 |
| 50 protected: | 52 protected: |
| 51 virtual ~VideoCaptureControllerEventHandler() {} | 53 virtual ~VideoCaptureControllerEventHandler() {} |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 } // namespace content | 56 } // namespace content |
| 55 | 57 |
| 56 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA
NDLER_H_ | 58 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA
NDLER_H_ |
| OLD | NEW |