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

Unified Diff: webrtc/common_video/include/incoming_video_stream.h

Issue 2716473002: Use TaskQueue in IncomingVideoStream (Closed)
Patch Set: Print render_time_ms instead of timestamp Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/task_queue_unittest.cc ('k') | webrtc/common_video/incoming_video_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/include/incoming_video_stream.h
diff --git a/webrtc/common_video/include/incoming_video_stream.h b/webrtc/common_video/include/incoming_video_stream.h
index 2ea80eace7f1d758404be8588575e97bdfe14326..ff407c56d80634fd804b3ff9cb6e51fc6d6b4617 100644
--- a/webrtc/common_video/include/incoming_video_stream.h
+++ b/webrtc/common_video/include/incoming_video_stream.h
@@ -11,18 +11,12 @@
#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_
#define WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_
-#include <memory>
-
-#include "webrtc/base/criticalsection.h"
-#include "webrtc/base/platform_thread.h"
#include "webrtc/base/race_checker.h"
-#include "webrtc/base/thread_annotations.h"
-#include "webrtc/base/thread_checker.h"
+#include "webrtc/base/task_queue.h"
#include "webrtc/common_video/video_render_frames.h"
#include "webrtc/media/base/videosinkinterface.h"
namespace webrtc {
-class EventTimerWrapper;
class IncomingVideoStream : public rtc::VideoSinkInterface<VideoFrame> {
public:
@@ -30,24 +24,19 @@ class IncomingVideoStream : public rtc::VideoSinkInterface<VideoFrame> {
rtc::VideoSinkInterface<VideoFrame>* callback);
~IncomingVideoStream() override;
- protected:
- static void IncomingVideoStreamThreadFun(void* obj);
- void IncomingVideoStreamProcess();
-
private:
void OnFrame(const VideoFrame& video_frame) override;
+ void Dequeue();
+
+ // Fwd decl of a QueuedTask implementation for carrying frames over to the TQ.
+ class NewFrameTask;
rtc::ThreadChecker main_thread_checker_;
- rtc::ThreadChecker render_thread_checker_;
rtc::RaceChecker decoder_race_checker_;
- rtc::CriticalSection buffer_critsect_;
- rtc::PlatformThread incoming_render_thread_;
- std::unique_ptr<EventTimerWrapper> deliver_buffer_event_;
-
- rtc::VideoSinkInterface<VideoFrame>* const external_callback_;
- std::unique_ptr<VideoRenderFrames> render_buffers_
- GUARDED_BY(buffer_critsect_);
+ VideoRenderFrames render_buffers_; // Only touched on the TaskQueue.
+ rtc::VideoSinkInterface<VideoFrame>* const callback_;
+ rtc::TaskQueue incoming_render_queue_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/base/task_queue_unittest.cc ('k') | webrtc/common_video/incoming_video_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698