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

Side by Side Diff: webrtc/video/video_send_stream.h

Issue 1763693002: Move encoder thread to VideoSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 4 years, 9 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/video/video_receive_stream.cc ('k') | webrtc/video/video_send_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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // webrtc::CpuOveruseObserver implementation. 68 // webrtc::CpuOveruseObserver implementation.
69 void OveruseDetected() override; 69 void OveruseDetected() override;
70 void NormalUsage() override; 70 void NormalUsage() override;
71 71
72 typedef std::map<uint32_t, RtpState> RtpStateMap; 72 typedef std::map<uint32_t, RtpState> RtpStateMap;
73 RtpStateMap GetRtpStates() const; 73 RtpStateMap GetRtpStates() const;
74 74
75 int GetPaddingNeededBps() const; 75 int GetPaddingNeededBps() const;
76 76
77 private: 77 private:
78 static bool EncoderThreadFunction(void* obj);
79 void EncoderProcess();
80
78 void ConfigureSsrcs(); 81 void ConfigureSsrcs();
79 82
80 SendStatisticsProxy stats_proxy_; 83 SendStatisticsProxy stats_proxy_;
81 EncodedFrameCallbackAdapter encoded_frame_proxy_; 84 EncodedFrameCallbackAdapter encoded_frame_proxy_;
82 const VideoSendStream::Config config_; 85 const VideoSendStream::Config config_;
83 std::map<uint32_t, RtpState> suspended_ssrcs_; 86 std::map<uint32_t, RtpState> suspended_ssrcs_;
84 87
85 ProcessThread* const module_process_thread_; 88 ProcessThread* const module_process_thread_;
86 CallStats* const call_stats_; 89 CallStats* const call_stats_;
87 CongestionController* const congestion_controller_; 90 CongestionController* const congestion_controller_;
88 VieRemb* const remb_; 91 VieRemb* const remb_;
89 92
93 rtc::PlatformThread encoder_thread_;
94 rtc::Event encoder_wakeup_event_;
95 volatile int stop_encoder_thread_;
96
90 OveruseFrameDetector overuse_detector_; 97 OveruseFrameDetector overuse_detector_;
91 PayloadRouter payload_router_; 98 PayloadRouter payload_router_;
92 EncoderStateFeedback encoder_feedback_; 99 EncoderStateFeedback encoder_feedback_;
93 ViEChannel vie_channel_; 100 ViEChannel vie_channel_;
94 ViEReceiver* const vie_receiver_; 101 ViEReceiver* const vie_receiver_;
95 ViEEncoder vie_encoder_; 102 ViEEncoder vie_encoder_;
96 VideoCodingModule* const vcm_; 103 VideoCodingModule* const vcm_;
97 // TODO(pbos): Move RtpRtcp ownership to VideoSendStream. 104 // TODO(pbos): Move RtpRtcp ownership to VideoSendStream.
98 // RtpRtcp modules, currently owned by ViEChannel but ownership should 105 // RtpRtcp modules, currently owned by ViEChannel but ownership should
99 // eventually move here. 106 // eventually move here.
100 const std::vector<RtpRtcp*> rtp_rtcp_modules_; 107 const std::vector<RtpRtcp*> rtp_rtcp_modules_;
101 VideoCaptureInput input_; 108 VideoCaptureInput input_;
102 }; 109 };
103 } // namespace internal 110 } // namespace internal
104 } // namespace webrtc 111 } // namespace webrtc
105 112
106 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ 113 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698