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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.h

Issue 1788583004: Enable setting the maximum bitrate limit in RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 const std::vector<VideoCodec>& recv_codecs, 138 const std::vector<VideoCodec>& recv_codecs,
139 WebRtcVideoEncoderFactory* external_encoder_factory, 139 WebRtcVideoEncoderFactory* external_encoder_factory,
140 WebRtcVideoDecoderFactory* external_decoder_factory); 140 WebRtcVideoDecoderFactory* external_decoder_factory);
141 ~WebRtcVideoChannel2() override; 141 ~WebRtcVideoChannel2() override;
142 142
143 // VideoMediaChannel implementation 143 // VideoMediaChannel implementation
144 rtc::DiffServCodePoint PreferredDscp() const override; 144 rtc::DiffServCodePoint PreferredDscp() const override;
145 145
146 bool SetSendParameters(const VideoSendParameters& params) override; 146 bool SetSendParameters(const VideoSendParameters& params) override;
147 bool SetRecvParameters(const VideoRecvParameters& params) override; 147 bool SetRecvParameters(const VideoRecvParameters& params) override;
148 webrtc::RTCRtpParameters GetRtpParameters(uint32_t ssrc) override;
149 bool SetRtpParameters(uint32_t ssrc,
150 const webrtc::RTCRtpParameters& parameters) override;
148 bool GetSendCodec(VideoCodec* send_codec) override; 151 bool GetSendCodec(VideoCodec* send_codec) override;
149 bool SetSend(bool send) override; 152 bool SetSend(bool send) override;
150 bool SetVideoSend(uint32_t ssrc, 153 bool SetVideoSend(uint32_t ssrc,
151 bool mute, 154 bool mute,
152 const VideoOptions* options) override; 155 const VideoOptions* options) override;
153 bool AddSendStream(const StreamParams& sp) override; 156 bool AddSendStream(const StreamParams& sp) override;
154 bool RemoveSendStream(uint32_t ssrc) override; 157 bool RemoveSendStream(uint32_t ssrc) override;
155 bool AddRecvStream(const StreamParams& sp) override; 158 bool AddRecvStream(const StreamParams& sp) override;
156 bool AddRecvStream(const StreamParams& sp, bool default_stream); 159 bool AddRecvStream(const StreamParams& sp, bool default_stream);
157 bool RemoveRecvStream(uint32_t ssrc) override; 160 bool RemoveRecvStream(uint32_t ssrc) override;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void SetSendParameters(const ChangedSendParameters& send_params); 250 void SetSendParameters(const ChangedSendParameters& send_params);
248 251
249 void OnFrame(const cricket::VideoFrame& frame) override; 252 void OnFrame(const cricket::VideoFrame& frame) override;
250 bool SetCapturer(VideoCapturer* capturer); 253 bool SetCapturer(VideoCapturer* capturer);
251 void MuteStream(bool mute); 254 void MuteStream(bool mute);
252 bool DisconnectCapturer(); 255 bool DisconnectCapturer();
253 256
254 void Start(); 257 void Start();
255 void Stop(); 258 void Stop();
256 259
260 webrtc::RTCRtpParameters rtp_parameters() const { return rtp_parameters_; }
261 void set_rtp_parameters(const webrtc::RTCRtpParameters& parameters) {
262 rtp_parameters_ = parameters;
263 }
264
257 // Implements webrtc::LoadObserver. 265 // Implements webrtc::LoadObserver.
258 void OnLoadUpdate(Load load) override; 266 void OnLoadUpdate(Load load) override;
259 267
260 const std::vector<uint32_t>& GetSsrcs() const; 268 const std::vector<uint32_t>& GetSsrcs() const;
261 VideoSenderInfo GetVideoSenderInfo(); 269 VideoSenderInfo GetVideoSenderInfo();
262 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); 270 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info);
263 271
264 private: 272 private:
265 // Parameters needed to reconstruct the underlying stream. 273 // Parameters needed to reconstruct the underlying stream.
266 // webrtc::VideoSendStream doesn't support setting a lot of options on the 274 // webrtc::VideoSendStream doesn't support setting a lot of options on the
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 bool sending_ GUARDED_BY(lock_); 382 bool sending_ GUARDED_BY(lock_);
375 bool muted_ GUARDED_BY(lock_); 383 bool muted_ GUARDED_BY(lock_);
376 384
377 // The timestamp of the first frame received 385 // The timestamp of the first frame received
378 // Used to generate the timestamps of subsequent frames 386 // Used to generate the timestamps of subsequent frames
379 int64_t first_frame_timestamp_ms_ GUARDED_BY(lock_); 387 int64_t first_frame_timestamp_ms_ GUARDED_BY(lock_);
380 388
381 // The timestamp of the last frame received 389 // The timestamp of the last frame received
382 // Used to generate timestamp for the black frame when capturer is removed 390 // Used to generate timestamp for the black frame when capturer is removed
383 int64_t last_frame_timestamp_ms_ GUARDED_BY(lock_); 391 int64_t last_frame_timestamp_ms_ GUARDED_BY(lock_);
392
393 webrtc::RTCRtpParameters rtp_parameters_;
384 }; 394 };
385 395
386 // Wrapper for the receiver part, contains configs etc. that are needed to 396 // Wrapper for the receiver part, contains configs etc. that are needed to
387 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper 397 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper
388 // between webrtc::VideoRenderer and cricket::VideoRenderer. 398 // between webrtc::VideoRenderer and cricket::VideoRenderer.
389 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { 399 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer {
390 public: 400 public:
391 WebRtcVideoReceiveStream( 401 WebRtcVideoReceiveStream(
392 webrtc::Call* call, 402 webrtc::Call* call,
393 const StreamParams& sp, 403 const StreamParams& sp,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 webrtc::Call::Config::BitrateConfig bitrate_config_; 531 webrtc::Call::Config::BitrateConfig bitrate_config_;
522 // TODO(deadbeef): Don't duplicate information between 532 // TODO(deadbeef): Don't duplicate information between
523 // send_params/recv_params, rtp_extensions, options, etc. 533 // send_params/recv_params, rtp_extensions, options, etc.
524 VideoSendParameters send_params_; 534 VideoSendParameters send_params_;
525 VideoRecvParameters recv_params_; 535 VideoRecvParameters recv_params_;
526 }; 536 };
527 537
528 } // namespace cricket 538 } // namespace cricket
529 539
530 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ 540 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698