Add ICU message format support
[chromium-blink-merge.git] / content / browser / renderer_host / media / video_capture_controller_event_handler.h
blobfa361b4caf4e9b9a82a71e46b569f1a75e2e2c98
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDLER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h"
10 #include "content/common/content_export.h"
12 namespace media {
13 class VideoFrame;
14 } // namespace media
16 namespace content {
18 typedef int VideoCaptureControllerID;
20 // VideoCaptureControllerEventHandler is the interface for
21 // VideoCaptureController to notify clients about the events such as
22 // BufferReady, FrameInfo, Error, etc.
23 class CONTENT_EXPORT VideoCaptureControllerEventHandler {
24 public:
25 // An Error has occurred in the VideoCaptureDevice.
26 virtual void OnError(VideoCaptureControllerID id) = 0;
28 // A buffer has been newly created.
29 virtual void OnBufferCreated(VideoCaptureControllerID id,
30 base::SharedMemoryHandle handle,
31 int length,
32 int buffer_id) = 0;
34 // A previously created buffer has been freed and will no longer be used.
35 virtual void OnBufferDestroyed(VideoCaptureControllerID id,
36 int buffer_id) = 0;
38 // A buffer has been filled with a captured VideoFrame.
39 virtual void OnBufferReady(VideoCaptureControllerID id,
40 int buffer_id,
41 const scoped_refptr<media::VideoFrame>& frame,
42 const base::TimeTicks& timestamp) = 0;
44 // The capture session has ended and no more frames will be sent.
45 virtual void OnEnded(VideoCaptureControllerID id) = 0;
47 protected:
48 virtual ~VideoCaptureControllerEventHandler() {}
51 } // namespace content
53 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HANDLER_H_