| 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 // 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  101   int GetActiveClientCount() const; |  101   int GetActiveClientCount() const; | 
|  102  |  102  | 
|  103   // API called directly by VideoCaptureManager in case the device is |  103   // API called directly by VideoCaptureManager in case the device is | 
|  104   // prematurely closed. |  104   // prematurely closed. | 
|  105   void StopSession(int session_id); |  105   void StopSession(int session_id); | 
|  106  |  106  | 
|  107   // Return a buffer with id |buffer_id| previously given in |  107   // Return a buffer with id |buffer_id| previously given in | 
|  108   // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the |  108   // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the | 
|  109   // buffer was backed by a texture, |sync_point| will be waited on before |  109   // buffer was backed by a texture, |sync_point| will be waited on before | 
|  110   // destroying or recycling the texture, to synchronize with texture users in |  110   // destroying or recycling the texture, to synchronize with texture users in | 
|  111   // the renderer process. |  111   // the renderer process. If the consumer provided resource utilization | 
 |  112   // feedback, this will be passed here (-1.0 indicates no feedback). | 
|  112   void ReturnBuffer(VideoCaptureControllerID id, |  113   void ReturnBuffer(VideoCaptureControllerID id, | 
|  113                     VideoCaptureControllerEventHandler* event_handler, |  114                     VideoCaptureControllerEventHandler* event_handler, | 
|  114                     int buffer_id, |  115                     int buffer_id, | 
|  115                     uint32 sync_point); |  116                     uint32 sync_point, | 
 |  117                     double consumer_resource_utilization); | 
|  116  |  118  | 
|  117   const media::VideoCaptureFormat& GetVideoCaptureFormat() const; |  119   const media::VideoCaptureFormat& GetVideoCaptureFormat() const; | 
|  118  |  120  | 
|  119   bool has_received_frames() const { return has_received_frames_; } |  121   bool has_received_frames() const { return has_received_frames_; } | 
|  120  |  122  | 
|  121   // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. |  123   // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. | 
|  122   void DoIncomingCapturedVideoFrameOnIOThread( |  124   void DoIncomingCapturedVideoFrameOnIOThread( | 
|  123       scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, |  125       scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, | 
|  124       const scoped_refptr<media::VideoFrame>& frame, |  126       const scoped_refptr<media::VideoFrame>& frame, | 
|  125       const base::TimeTicks& timestamp); |  127       const base::TimeTicks& timestamp); | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
|  156   media::VideoCaptureFormat video_capture_format_; |  158   media::VideoCaptureFormat video_capture_format_; | 
|  157  |  159  | 
|  158   base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; |  160   base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; | 
|  159  |  161  | 
|  160   DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); |  162   DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); | 
|  161 }; |  163 }; | 
|  162  |  164  | 
|  163 }  // namespace content |  165 }  // namespace content | 
|  164  |  166  | 
|  165 #endif  // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |  167 #endif  // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 
| OLD | NEW |