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

Side by Side Diff: webrtc/common_video/incoming_video_stream.cc

Issue 3004873002: Delete static method TaskQueue::IsCurrent. (Closed)
Patch Set: Created 3 years, 3 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 | « no previous file | webrtc/rtc_base/task_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 19 matching lines...) Expand all
30 // if (render_buffers_.AddFrame(std::move(frame)) == 1) 30 // if (render_buffers_.AddFrame(std::move(frame)) == 1)
31 // Dequeue(); 31 // Dequeue();
32 // }); 32 // });
33 class IncomingVideoStream::NewFrameTask : public rtc::QueuedTask { 33 class IncomingVideoStream::NewFrameTask : public rtc::QueuedTask {
34 public: 34 public:
35 NewFrameTask(IncomingVideoStream* stream, VideoFrame frame) 35 NewFrameTask(IncomingVideoStream* stream, VideoFrame frame)
36 : stream_(stream), frame_(std::move(frame)) {} 36 : stream_(stream), frame_(std::move(frame)) {}
37 37
38 private: 38 private:
39 bool Run() override { 39 bool Run() override {
40 RTC_DCHECK(rtc::TaskQueue::IsCurrent(kIncomingQueueName)); 40 RTC_DCHECK(stream_->incoming_render_queue_.IsCurrent());
41 if (stream_->render_buffers_.AddFrame(std::move(frame_)) == 1) 41 if (stream_->render_buffers_.AddFrame(std::move(frame_)) == 1)
42 stream_->Dequeue(); 42 stream_->Dequeue();
43 return true; 43 return true;
44 } 44 }
45 45
46 IncomingVideoStream* stream_; 46 IncomingVideoStream* stream_;
47 VideoFrame frame_; 47 VideoFrame frame_;
48 }; 48 };
49 49
50 IncomingVideoStream::IncomingVideoStream( 50 IncomingVideoStream::IncomingVideoStream(
(...skipping 23 matching lines...) Expand all
74 if (frame_to_render) 74 if (frame_to_render)
75 callback_->OnFrame(*frame_to_render); 75 callback_->OnFrame(*frame_to_render);
76 76
77 if (render_buffers_.HasPendingFrames()) { 77 if (render_buffers_.HasPendingFrames()) {
78 uint32_t wait_time = render_buffers_.TimeToNextFrameRelease(); 78 uint32_t wait_time = render_buffers_.TimeToNextFrameRelease();
79 incoming_render_queue_.PostDelayedTask([this]() { Dequeue(); }, wait_time); 79 incoming_render_queue_.PostDelayedTask([this]() { Dequeue(); }, wait_time);
80 } 80 }
81 } 81 }
82 82
83 } // namespace webrtc 83 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/rtc_base/task_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698