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

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

Issue 2551193002: [Mojo Video Capture] Decouple VCController from VCBufferPool and VCDeviceClient (Closed)
Patch Set: mcasas comments Created 4 years 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
(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 class CONTENT_EXPORT VideoFrameReceiverOnIOThread
16 : public media::VideoFrameReceiver {
17 public:
18 explicit VideoFrameReceiverOnIOThread(
19 const base::WeakPtr<VideoFrameReceiver>& receiver);
20 ~VideoFrameReceiverOnIOThread() override;
21
22 void OnIncomingCapturedVideoFrame(
23 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
24 scoped_refptr<media::VideoFrame> frame) override;
25 void OnError() override;
26 void OnLog(const std::string& message) override;
27 void OnBufferDestroyed(int buffer_id_to_drop) override;
28
29 private:
30 base::WeakPtr<VideoFrameReceiver> receiver_;
31 };
32
33 } // namespace content
34
35 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_FRAME_RECEIVER_ON_IO_THREAD _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698