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

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

Issue 1864313003: Move Ownership of RtpModules to VideoSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 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 | « 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 24 matching lines...) Expand all
35 class ProcessThread; 35 class ProcessThread;
36 class RtpRtcp; 36 class RtpRtcp;
37 class ViEChannel; 37 class ViEChannel;
38 class ViEEncoder; 38 class ViEEncoder;
39 class VieRemb; 39 class VieRemb;
40 40
41 namespace internal { 41 namespace internal {
42 42
43 class VideoSendStream : public webrtc::VideoSendStream, 43 class VideoSendStream : public webrtc::VideoSendStream,
44 public webrtc::CpuOveruseObserver, 44 public webrtc::CpuOveruseObserver,
45 public webrtc::BitrateAllocatorObserver { 45 public webrtc::BitrateAllocatorObserver,
46 public webrtc::VCMProtectionCallback {
46 public: 47 public:
47 VideoSendStream(int num_cpu_cores, 48 VideoSendStream(int num_cpu_cores,
48 ProcessThread* module_process_thread, 49 ProcessThread* module_process_thread,
49 CallStats* call_stats, 50 CallStats* call_stats,
50 CongestionController* congestion_controller, 51 CongestionController* congestion_controller,
51 BitrateAllocator* bitrate_allocator, 52 BitrateAllocator* bitrate_allocator,
52 VieRemb* remb, 53 VieRemb* remb,
53 const VideoSendStream::Config& config, 54 const VideoSendStream::Config& config,
54 const VideoEncoderConfig& encoder_config, 55 const VideoEncoderConfig& encoder_config,
55 const std::map<uint32_t, RtpState>& suspended_ssrcs); 56 const std::map<uint32_t, RtpState>& suspended_ssrcs);
(...skipping 18 matching lines...) Expand all
74 typedef std::map<uint32_t, RtpState> RtpStateMap; 75 typedef std::map<uint32_t, RtpState> RtpStateMap;
75 RtpStateMap GetRtpStates() const; 76 RtpStateMap GetRtpStates() const;
76 77
77 int GetPaddingNeededBps() const; 78 int GetPaddingNeededBps() const;
78 79
79 // Implements BitrateAllocatorObserver. 80 // Implements BitrateAllocatorObserver.
80 void OnBitrateUpdated(uint32_t bitrate_bps, 81 void OnBitrateUpdated(uint32_t bitrate_bps,
81 uint8_t fraction_loss, 82 uint8_t fraction_loss,
82 int64_t rtt) override; 83 int64_t rtt) override;
83 84
85 // Implements webrtc::VCMProtectionCallback.
86 int ProtectionRequest(const FecProtectionParams* delta_params,
87 const FecProtectionParams* key_params,
88 uint32_t* sent_video_rate_bps,
89 uint32_t* sent_nack_rate_bps,
90 uint32_t* sent_fec_rate_bps) override;
91
84 private: 92 private:
85 static bool EncoderThreadFunction(void* obj); 93 static bool EncoderThreadFunction(void* obj);
86 void EncoderProcess(); 94 void EncoderProcess();
87 95
96 void ConfigureProtection();
88 void ConfigureSsrcs(); 97 void ConfigureSsrcs();
89 98
90 SendStatisticsProxy stats_proxy_; 99 SendStatisticsProxy stats_proxy_;
91 EncodedFrameCallbackAdapter encoded_frame_proxy_; 100 EncodedFrameCallbackAdapter encoded_frame_proxy_;
92 const VideoSendStream::Config config_; 101 const VideoSendStream::Config config_;
93 std::map<uint32_t, RtpState> suspended_ssrcs_; 102 std::map<uint32_t, RtpState> suspended_ssrcs_;
94 103
95 ProcessThread* const module_process_thread_; 104 ProcessThread* const module_process_thread_;
96 CallStats* const call_stats_; 105 CallStats* const call_stats_;
97 CongestionController* const congestion_controller_; 106 CongestionController* const congestion_controller_;
98 BitrateAllocator* const bitrate_allocator_; 107 BitrateAllocator* const bitrate_allocator_;
99 VieRemb* const remb_; 108 VieRemb* const remb_;
100 109
101 rtc::PlatformThread encoder_thread_; 110 rtc::PlatformThread encoder_thread_;
102 rtc::Event encoder_wakeup_event_; 111 rtc::Event encoder_wakeup_event_;
103 volatile int stop_encoder_thread_; 112 volatile int stop_encoder_thread_;
104 113
105 OveruseFrameDetector overuse_detector_; 114 OveruseFrameDetector overuse_detector_;
106 PayloadRouter payload_router_;
107 EncoderStateFeedback encoder_feedback_; 115 EncoderStateFeedback encoder_feedback_;
108 ViEChannel vie_channel_;
109 ViEReceiver* const vie_receiver_;
110 ViEEncoder vie_encoder_; 116 ViEEncoder vie_encoder_;
111 VideoCodingModule* const vcm_; 117 VideoCodingModule* const vcm_;
112 // TODO(pbos): Move RtpRtcp ownership to VideoSendStream. 118
113 // RtpRtcp modules, currently owned by ViEChannel but ownership should 119 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_;
114 // eventually move here. 120 // RtpRtcp modules, declared here as they use other members on construction.
115 const std::vector<RtpRtcp*> rtp_rtcp_modules_; 121 const std::vector<RtpRtcp*> rtp_rtcp_modules_;
122 PayloadRouter payload_router_;
116 VideoCaptureInput input_; 123 VideoCaptureInput input_;
117 }; 124 };
118 } // namespace internal 125 } // namespace internal
119 } // namespace webrtc 126 } // namespace webrtc
120 127
121 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ 128 #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