| OLD | NEW | 
 | (Empty) | 
|   1 // Copyright 2016 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. |  | 
|   4  |  | 
|   5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_FRAME_RECEIVER_ON_IO_THREAD_H_ |  | 
|   6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_FRAME_RECEIVER_ON_IO_THREAD_H_ |  | 
|   7  |  | 
|   8 #include "content/common/content_export.h" |  | 
|   9 #include "media/capture/video/video_frame_receiver.h" |  | 
|  10  |  | 
|  11 namespace content { |  | 
|  12  |  | 
|  13 // Decorator for media::VideoFrameReceiver that forwards all incoming calls |  | 
|  14 // to the Browser IO thread. |  | 
|  15 // TODO(chfremer): Change this to VideoFrameReceiverOnTaskRunner and have the |  | 
|  16 // target task runner be passed into the constructor. See crbug.com/674190. |  | 
|  17 class CONTENT_EXPORT VideoFrameReceiverOnIOThread |  | 
|  18     : public media::VideoFrameReceiver { |  | 
|  19  public: |  | 
|  20   explicit VideoFrameReceiverOnIOThread( |  | 
|  21       const base::WeakPtr<VideoFrameReceiver>& receiver); |  | 
|  22   ~VideoFrameReceiverOnIOThread() override; |  | 
|  23  |  | 
|  24   void OnNewBufferHandle( |  | 
|  25       int buffer_id, |  | 
|  26       std::unique_ptr<media::VideoCaptureDevice::Client::Buffer::HandleProvider> |  | 
|  27           handle_provider) override; |  | 
|  28   void OnFrameReadyInBuffer( |  | 
|  29       int buffer_id, |  | 
|  30       int frame_feedback_id, |  | 
|  31       std::unique_ptr< |  | 
|  32           media::VideoCaptureDevice::Client::Buffer::ScopedAccessPermission> |  | 
|  33           buffer_read_permission, |  | 
|  34       media::mojom::VideoFrameInfoPtr frame_info) override; |  | 
|  35   void OnBufferRetired(int buffer_id) override; |  | 
|  36   void OnError() override; |  | 
|  37   void OnLog(const std::string& message) override; |  | 
|  38   void OnStarted() override; |  | 
|  39   void OnStartedUsingGpuDecode() override; |  | 
|  40  |  | 
|  41  private: |  | 
|  42   base::WeakPtr<VideoFrameReceiver> receiver_; |  | 
|  43 }; |  | 
|  44  |  | 
|  45 }  // namespace content |  | 
|  46  |  | 
|  47 #endif  // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_FRAME_RECEIVER_ON_IO_THREAD
    _H_ |  | 
| OLD | NEW |