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

Side by Side Diff: webrtc/common_video/include/incoming_video_stream.h

Issue 2708723003: Introduce new constructor to PlatformThread. (Closed)
Patch Set: Disable RTC_DCHECK in channel_proxy + add TODO 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 unified diff | Download patch
« no previous file with comments | « webrtc/call/rampup_tests.cc ('k') | webrtc/common_video/incoming_video_stream.cc » ('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 13 matching lines...) Expand all
24 namespace webrtc { 24 namespace webrtc {
25 class EventTimerWrapper; 25 class EventTimerWrapper;
26 26
27 class IncomingVideoStream : public rtc::VideoSinkInterface<VideoFrame> { 27 class IncomingVideoStream : public rtc::VideoSinkInterface<VideoFrame> {
28 public: 28 public:
29 IncomingVideoStream(int32_t delay_ms, 29 IncomingVideoStream(int32_t delay_ms,
30 rtc::VideoSinkInterface<VideoFrame>* callback); 30 rtc::VideoSinkInterface<VideoFrame>* callback);
31 ~IncomingVideoStream() override; 31 ~IncomingVideoStream() override;
32 32
33 protected: 33 protected:
34 static bool IncomingVideoStreamThreadFun(void* obj); 34 static void IncomingVideoStreamThreadFun(void* obj);
35 bool IncomingVideoStreamProcess(); 35 void IncomingVideoStreamProcess();
36 36
37 private: 37 private:
38 enum { kEventStartupTimeMs = 10 };
39 enum { kEventMaxWaitTimeMs = 100 };
40 enum { kFrameRatePeriodMs = 1000 };
41
42 void OnFrame(const VideoFrame& video_frame) override; 38 void OnFrame(const VideoFrame& video_frame) override;
43 39
44 rtc::ThreadChecker main_thread_checker_; 40 rtc::ThreadChecker main_thread_checker_;
45 rtc::ThreadChecker render_thread_checker_; 41 rtc::ThreadChecker render_thread_checker_;
46 rtc::RaceChecker decoder_race_checker_; 42 rtc::RaceChecker decoder_race_checker_;
47 43
48 rtc::CriticalSection buffer_critsect_; 44 rtc::CriticalSection buffer_critsect_;
49 rtc::PlatformThread incoming_render_thread_; 45 rtc::PlatformThread incoming_render_thread_;
50 std::unique_ptr<EventTimerWrapper> deliver_buffer_event_; 46 std::unique_ptr<EventTimerWrapper> deliver_buffer_event_;
51 47
52 rtc::VideoSinkInterface<VideoFrame>* const external_callback_; 48 rtc::VideoSinkInterface<VideoFrame>* const external_callback_;
53 std::unique_ptr<VideoRenderFrames> render_buffers_ 49 std::unique_ptr<VideoRenderFrames> render_buffers_
54 GUARDED_BY(buffer_critsect_); 50 GUARDED_BY(buffer_critsect_);
55 }; 51 };
56 52
57 } // namespace webrtc 53 } // namespace webrtc
58 54
59 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ 55 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/call/rampup_tests.cc ('k') | webrtc/common_video/incoming_video_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698