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

Side by Side Diff: media/capture/video/video_frame_receiver_on_task_runner.h

Issue 2795663002: Change VideoFrameReceiverOnIOThread to VideoFrameReceiverOnTaskRunner (Closed)
Patch Set: Rebase Created 3 years, 8 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
« no previous file with comments | « media/capture/BUILD.gn ('k') | media/capture/video/video_frame_receiver_on_task_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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 MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_ON_TASK_RUNNER_H_
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_ON_TASK_RUNNER_H_
7
8 #include "media/capture/video/video_frame_receiver.h"
9
10 namespace base {
11 class SingleThreadTaskRunner;
12 }
13
14 namespace media {
15
16 // Decorator for VideoFrameReceiver that forwards all incoming calls to the
17 // given |task_runner|.
18 class CAPTURE_EXPORT VideoFrameReceiverOnTaskRunner
19 : public VideoFrameReceiver {
20 public:
21 explicit VideoFrameReceiverOnTaskRunner(
22 const base::WeakPtr<VideoFrameReceiver>& receiver,
23 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
24 ~VideoFrameReceiverOnTaskRunner() override;
25
26 void OnNewBufferHandle(
27 int buffer_id,
28 std::unique_ptr<VideoCaptureDevice::Client::Buffer::HandleProvider>
29 handle_provider) override;
30 void OnFrameReadyInBuffer(
31 int buffer_id,
32 int frame_feedback_id,
33 std::unique_ptr<
34 VideoCaptureDevice::Client::Buffer::ScopedAccessPermission>
35 buffer_read_permission,
36 mojom::VideoFrameInfoPtr frame_info) override;
37 void OnBufferRetired(int buffer_id) override;
38 void OnError() override;
39 void OnLog(const std::string& message) override;
40 void OnStarted() override;
41 void OnStartedUsingGpuDecode() override;
42
43 private:
44 const base::WeakPtr<VideoFrameReceiver> receiver_;
45 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
46 };
47
48 } // namespace media
49
50 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_FRAME_RECEIVER_ON_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « media/capture/BUILD.gn ('k') | media/capture/video/video_frame_receiver_on_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698