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

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

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 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
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/scoped_ptr.h"
8 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
9 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "base/values.h"
10 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
11 13
12 namespace gfx { 14 namespace gfx {
13 class Rect; 15 class Rect;
16 class Size;
14 } // namespace gfx 17 } // namespace gfx
15 18
16 namespace gpu { 19 namespace gpu {
17 struct MailboxHolder; 20 struct MailboxHolder;
18 } // namespace gpu 21 } // namespace gpu
19 22
20 namespace media { 23 namespace media {
21 class VideoCaptureFormat; 24 class VideoCaptureFormat;
22 } // namespace media 25 } // namespace media
23 26
(...skipping 23 matching lines...) Expand all
47 int length, 50 int length,
48 int buffer_id) = 0; 51 int buffer_id) = 0;
49 52
50 // A previously created buffer has been freed and will no longer be used. 53 // A previously created buffer has been freed and will no longer be used.
51 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id, 54 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id,
52 int buffer_id) = 0; 55 int buffer_id) = 0;
53 56
54 // A buffer has been filled with I420 video. 57 // A buffer has been filled with I420 video.
55 virtual void OnBufferReady(const VideoCaptureControllerID& id, 58 virtual void OnBufferReady(const VideoCaptureControllerID& id,
56 int buffer_id, 59 int buffer_id,
57 const media::VideoCaptureFormat& format, 60 const gfx::Size& coded_size,
58 const gfx::Rect& visible_rect, 61 const gfx::Rect& visible_rect,
59 base::TimeTicks timestamp) = 0; 62 base::TimeTicks timestamp,
63 scoped_ptr<base::DictionaryValue> metadata) = 0;
60 64
61 // A texture mailbox buffer has been filled with data. 65 // A texture mailbox buffer has been filled with data.
62 virtual void OnMailboxBufferReady(const VideoCaptureControllerID& id, 66 virtual void OnMailboxBufferReady(
63 int buffer_id, 67 const VideoCaptureControllerID& id,
64 const gpu::MailboxHolder& mailbox_holder, 68 int buffer_id,
65 const media::VideoCaptureFormat& format, 69 const gpu::MailboxHolder& mailbox_holder,
66 base::TimeTicks timestamp) = 0; 70 const gfx::Size& packed_frame_size,
71 base::TimeTicks timestamp,
72 scoped_ptr<base::DictionaryValue> metadata) = 0;
67 73
68 // The capture session has ended and no more frames will be sent. 74 // The capture session has ended and no more frames will be sent.
69 virtual void OnEnded(const VideoCaptureControllerID& id) = 0; 75 virtual void OnEnded(const VideoCaptureControllerID& id) = 0;
70 76
71 protected: 77 protected:
72 virtual ~VideoCaptureControllerEventHandler() {} 78 virtual ~VideoCaptureControllerEventHandler() {}
73 }; 79 };
74 80
75 } // namespace content 81 } // namespace content
76 82
77 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_ 83 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_EVENT_HA NDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698