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

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

Issue 1912653002: Remove PayloadRouter dependency from ViEEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments. Created 4 years, 7 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/payload_router_unittest.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 namespace vcm { 43 namespace vcm {
44 class VideoSender; 44 class VideoSender;
45 } // namespace vcm 45 } // namespace vcm
46 46
47 namespace internal { 47 namespace internal {
48 48
49 class VideoSendStream : public webrtc::VideoSendStream, 49 class VideoSendStream : public webrtc::VideoSendStream,
50 public webrtc::CpuOveruseObserver, 50 public webrtc::CpuOveruseObserver,
51 public webrtc::BitrateAllocatorObserver, 51 public webrtc::BitrateAllocatorObserver,
52 public webrtc::VCMProtectionCallback { 52 public webrtc::VCMProtectionCallback,
53 protected webrtc::EncodedImageCallback {
53 public: 54 public:
54 VideoSendStream(int num_cpu_cores, 55 VideoSendStream(int num_cpu_cores,
55 ProcessThread* module_process_thread, 56 ProcessThread* module_process_thread,
56 CallStats* call_stats, 57 CallStats* call_stats,
57 CongestionController* congestion_controller, 58 CongestionController* congestion_controller,
58 BitrateAllocator* bitrate_allocator, 59 BitrateAllocator* bitrate_allocator,
59 VieRemb* remb, 60 VieRemb* remb,
60 const VideoSendStream::Config& config, 61 const VideoSendStream::Config& config,
61 const VideoEncoderConfig& encoder_config, 62 const VideoEncoderConfig& encoder_config,
62 const std::map<uint32_t, RtpState>& suspended_ssrcs); 63 const std::map<uint32_t, RtpState>& suspended_ssrcs);
(...skipping 28 matching lines...) Expand all
91 int ProtectionRequest(const FecProtectionParams* delta_params, 92 int ProtectionRequest(const FecProtectionParams* delta_params,
92 const FecProtectionParams* key_params, 93 const FecProtectionParams* key_params,
93 uint32_t* sent_video_rate_bps, 94 uint32_t* sent_video_rate_bps,
94 uint32_t* sent_nack_rate_bps, 95 uint32_t* sent_nack_rate_bps,
95 uint32_t* sent_fec_rate_bps) override; 96 uint32_t* sent_fec_rate_bps) override;
96 97
97 private: 98 private:
98 struct EncoderSettings { 99 struct EncoderSettings {
99 VideoCodec video_codec; 100 VideoCodec video_codec;
100 int min_transmit_bitrate_bps; 101 int min_transmit_bitrate_bps;
102 std::vector<VideoStream> streams;
101 }; 103 };
104
105 // Implements EncodedImageCallback. The implementation routes encoded frames
106 // to the |payload_router_| and |config.pre_encode_callback| if set.
107 // Called on an arbitrary encoder callback thread.
108 int32_t Encoded(const EncodedImage& encoded_image,
109 const CodecSpecificInfo* codec_specific_info,
110 const RTPFragmentationHeader* fragmentation) override;
111
102 static bool EncoderThreadFunction(void* obj); 112 static bool EncoderThreadFunction(void* obj);
103 void EncoderProcess(); 113 void EncoderProcess();
104 114
105 void ConfigureProtection(); 115 void ConfigureProtection();
106 void ConfigureSsrcs(); 116 void ConfigureSsrcs();
107 117
108 SendStatisticsProxy stats_proxy_; 118 SendStatisticsProxy stats_proxy_;
109 EncodedFrameCallbackAdapter encoded_frame_proxy_; 119 EncodedFrameCallbackAdapter encoded_frame_proxy_;
110 const VideoSendStream::Config config_; 120 const VideoSendStream::Config config_;
111 std::map<uint32_t, RtpState> suspended_ssrcs_; 121 std::map<uint32_t, RtpState> suspended_ssrcs_;
(...skipping 19 matching lines...) Expand all
131 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; 141 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_;
132 // RtpRtcp modules, declared here as they use other members on construction. 142 // RtpRtcp modules, declared here as they use other members on construction.
133 const std::vector<RtpRtcp*> rtp_rtcp_modules_; 143 const std::vector<RtpRtcp*> rtp_rtcp_modules_;
134 PayloadRouter payload_router_; 144 PayloadRouter payload_router_;
135 VideoCaptureInput input_; 145 VideoCaptureInput input_;
136 }; 146 };
137 } // namespace internal 147 } // namespace internal
138 } // namespace webrtc 148 } // namespace webrtc
139 149
140 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ 150 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/video/payload_router_unittest.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698