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

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

Issue 83793004: Implement IPCs and VideoCapture::Client interfaces for texture capture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5744a8bbb Nits. Created 6 years, 11 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 | Annotate | Revision Log
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 // VideoCaptureController is the glue between a VideoCaptureDevice and all 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all
6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of
7 // one (and only one) VideoCaptureDevice; both are owned by the 7 // one (and only one) VideoCaptureDevice; both are owned by the
8 // VideoCaptureManager. 8 // VideoCaptureManager.
9 // 9 //
10 // The VideoCaptureController is responsible for: 10 // The VideoCaptureController is responsible for:
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 int GetClientCount(); 95 int GetClientCount();
96 96
97 // API called directly by VideoCaptureManager in case the device is 97 // API called directly by VideoCaptureManager in case the device is
98 // prematurely closed. 98 // prematurely closed.
99 void StopSession(int session_id); 99 void StopSession(int session_id);
100 100
101 // Return a buffer previously given in 101 // Return a buffer previously given in
102 // VideoCaptureControllerEventHandler::OnBufferReady. 102 // VideoCaptureControllerEventHandler::OnBufferReady.
103 void ReturnBuffer(const VideoCaptureControllerID& id, 103 void ReturnBuffer(const VideoCaptureControllerID& id,
104 VideoCaptureControllerEventHandler* event_handler, 104 VideoCaptureControllerEventHandler* event_handler,
105 int buffer_id); 105 int buffer_id,
106 uint32 sync_point);
mcasas 2014/01/21 14:34:02 There's no explanation in struct MailboxHolder abo
sheu 2014/01/29 01:19:20 Done.
106 107
107 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; 108 const media::VideoCaptureFormat& GetVideoCaptureFormat() const;
108 109
109 private: 110 private:
110 class VideoCaptureDeviceClient; 111 class VideoCaptureDeviceClient;
111 112
112 struct ControllerClient; 113 struct ControllerClient;
113 typedef std::list<ControllerClient*> ControllerClients; 114 typedef std::list<ControllerClient*> ControllerClients;
114 115
115 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. 116 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient.
116 void DoIncomingCapturedI420BufferOnIOThread( 117 void DoIncomingCapturedVideoFrameOnIOThread(
117 scoped_refptr<media::VideoCaptureDevice::Client::Buffer> buffer, 118 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer,
118 const gfx::Size& dimensions, 119 const media::VideoCaptureFormat& format,
119 int frame_rate, 120 const scoped_refptr<media::VideoFrame>& frame,
120 base::TimeTicks timestamp); 121 base::TimeTicks timestamp);
121 void DoErrorOnIOThread(); 122 void DoErrorOnIOThread();
122 void DoDeviceStoppedOnIOThread(); 123 void DoDeviceStoppedOnIOThread();
123 void DoBufferDestroyedOnIOThread(int buffer_id_to_drop); 124 void DoBufferDestroyedOnIOThread(int buffer_id_to_drop);
124 125
125 // Find a client of |id| and |handler| in |clients|. 126 // Find a client of |id| and |handler| in |clients|.
126 ControllerClient* FindClient( 127 ControllerClient* FindClient(
127 const VideoCaptureControllerID& id, 128 const VideoCaptureControllerID& id,
128 VideoCaptureControllerEventHandler* handler, 129 VideoCaptureControllerEventHandler* handler,
129 const ControllerClients& clients); 130 const ControllerClients& clients);
(...skipping 16 matching lines...) Expand all
146 media::VideoCaptureFormat video_capture_format_; 147 media::VideoCaptureFormat video_capture_format_;
147 148
148 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 149 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
149 150
150 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 151 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
151 }; 152 };
152 153
153 } // namespace content 154 } // namespace content
154 155
155 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 156 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698