| Index: content/browser/renderer_host/media/video_capture_controller_event_handler.h
|
| diff --git a/content/browser/renderer_host/media/video_capture_controller_event_handler.h b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
|
| index 45dbbea276d0492a692a595a17e5769f0d0b626d..283def2f6d9bc6264ec9452cf6b37f443f3f2145 100644
|
| --- a/content/browser/renderer_host/media/video_capture_controller_event_handler.h
|
| +++ b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
|
| @@ -7,10 +7,13 @@
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/shared_memory.h"
|
| -#include "base/time/time.h"
|
| -#include "base/values.h"
|
| #include "content/common/content_export.h"
|
|
|
| +namespace base {
|
| +class DictionaryValue;
|
| +class TimeTicks;
|
| +} // namespace base
|
| +
|
| namespace gfx {
|
| class Rect;
|
| class Size;
|
| @@ -20,21 +23,9 @@ namespace gpu {
|
| struct MailboxHolder;
|
| } // namespace gpu
|
|
|
| -namespace media {
|
| -class VideoCaptureFormat;
|
| -} // namespace media
|
| -
|
| namespace content {
|
|
|
| -// ID used for identifying an object of VideoCaptureController.
|
| -struct CONTENT_EXPORT VideoCaptureControllerID {
|
| - explicit VideoCaptureControllerID(int device_id);
|
| -
|
| - bool operator<(const VideoCaptureControllerID& vc) const;
|
| - bool operator==(const VideoCaptureControllerID& vc) const;
|
| -
|
| - int device_id;
|
| -};
|
| +typedef int VideoCaptureControllerID;
|
|
|
| // VideoCaptureControllerEventHandler is the interface for
|
| // VideoCaptureController to notify clients about the events such as
|
| @@ -42,37 +33,37 @@ struct CONTENT_EXPORT VideoCaptureControllerID {
|
| class CONTENT_EXPORT VideoCaptureControllerEventHandler {
|
| public:
|
| // An Error has occurred in the VideoCaptureDevice.
|
| - virtual void OnError(const VideoCaptureControllerID& id) = 0;
|
| + virtual void OnError(VideoCaptureControllerID id) = 0;
|
|
|
| // A buffer has been newly created.
|
| - virtual void OnBufferCreated(const VideoCaptureControllerID& id,
|
| + virtual void OnBufferCreated(VideoCaptureControllerID id,
|
| base::SharedMemoryHandle handle,
|
| int length,
|
| int buffer_id) = 0;
|
|
|
| // A previously created buffer has been freed and will no longer be used.
|
| - virtual void OnBufferDestroyed(const VideoCaptureControllerID& id,
|
| + virtual void OnBufferDestroyed(VideoCaptureControllerID id,
|
| int buffer_id) = 0;
|
|
|
| // A buffer has been filled with I420 video.
|
| - virtual void OnBufferReady(const VideoCaptureControllerID& id,
|
| + virtual void OnBufferReady(VideoCaptureControllerID id,
|
| int buffer_id,
|
| const gfx::Size& coded_size,
|
| const gfx::Rect& visible_rect,
|
| - base::TimeTicks timestamp,
|
| + const base::TimeTicks& timestamp,
|
| scoped_ptr<base::DictionaryValue> metadata) = 0;
|
|
|
| // A texture mailbox buffer has been filled with data.
|
| virtual void OnMailboxBufferReady(
|
| - const VideoCaptureControllerID& id,
|
| + VideoCaptureControllerID id,
|
| int buffer_id,
|
| const gpu::MailboxHolder& mailbox_holder,
|
| const gfx::Size& packed_frame_size,
|
| - base::TimeTicks timestamp,
|
| + const base::TimeTicks& timestamp,
|
| scoped_ptr<base::DictionaryValue> metadata) = 0;
|
|
|
| // The capture session has ended and no more frames will be sent.
|
| - virtual void OnEnded(const VideoCaptureControllerID& id) = 0;
|
| + virtual void OnEnded(VideoCaptureControllerID id) = 0;
|
|
|
| protected:
|
| virtual ~VideoCaptureControllerEventHandler() {}
|
|
|