Skip to content

Commit

Permalink
Set hardcoded maxVideoBW to a higher value (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcague authored Jul 24, 2019
1 parent c98519f commit 603a863
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
12 changes: 12 additions & 0 deletions erizo/src/erizo/DefaultValues.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* defaultvalues.h
*/
#ifndef ERIZO_SRC_ERIZO_DEFAULTVALUES_H_
#define ERIZO_SRC_ERIZO_DEFAULTVALUES_H_

namespace erizo {
constexpr uint32_t kDefaultMaxVideoBWInKbps = 30000;
constexpr uint32_t kDefaultMaxVideoBWInBitsps = kDefaultMaxVideoBWInKbps * 1000;
} // namespace erizo

#endif // ERIZO_SRC_ERIZO_DEFAULTVALUES_H_
3 changes: 2 additions & 1 deletion erizo/src/erizo/rtp/BandwidthEstimationHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "./MediaStream.h"
#include "lib/Clock.h"
#include "lib/ClockUtils.h"
#include "./DefaultValues.h"

#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h"
Expand Down Expand Up @@ -42,7 +43,7 @@ BandwidthEstimationHandler::BandwidthEstimationHandler(std::shared_ptr<RemoteBit
picker_{picker},
using_absolute_send_time_{false}, packets_since_absolute_send_time_{0},
min_bitrate_bps_{kMinBitRateAllowed},
bitrate_{0}, last_send_bitrate_{0}, max_video_bw_{300}, last_remb_time_{0},
bitrate_{0}, last_send_bitrate_{0}, max_video_bw_{kDefaultMaxVideoBWInKbps}, last_remb_time_{0},
running_{false}, active_{true}, initialized_{false} {
rtc::LogMessage::SetLogToStderr(false);
}
Expand Down
3 changes: 2 additions & 1 deletion erizo/src/erizo/rtp/RtcpForwarder.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "./logger.h"
#include "./MediaDefinitions.h"
#include "./SdpInfo.h"
#include "./DefaultValues.h"
#include "rtp/RtpHeaders.h"
#include "rtp/RtcpProcessor.h"

Expand All @@ -19,7 +20,7 @@ class RtcpForwarder: public RtcpProcessor{
DECLARE_LOGGER();

public:
RtcpForwarder(MediaSink* msink, MediaSource* msource, uint32_t max_video_bw = 300000);
RtcpForwarder(MediaSink* msink, MediaSource* msource, uint32_t max_video_bw = kDefaultMaxVideoBWInBitsps);
virtual ~RtcpForwarder() {}
void addSourceSsrc(uint32_t ssrc) override;
void setPublisherBW(uint32_t bandwidth) override;
Expand Down
3 changes: 2 additions & 1 deletion erizo/src/erizo/rtp/RtcpProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "./MediaDefinitions.h"
#include "./SdpInfo.h"
#include "./DefaultValues.h"
#include "rtp/RtpHeaders.h"
#include "pipeline/Service.h"

Expand Down Expand Up @@ -109,7 +110,7 @@ class RtcpData {

class RtcpProcessor : public Service {
public:
RtcpProcessor(MediaSink* msink, MediaSource* msource, uint32_t max_video_bw = 300000):
RtcpProcessor(MediaSink* msink, MediaSource* msource, uint32_t max_video_bw = kDefaultMaxVideoBWInBitsps):
rtcpSink_(msink), rtcpSource_(msource), max_video_bw_{max_video_bw} {}
virtual ~RtcpProcessor() {}
virtual void addSourceSsrc(uint32_t ssrc) = 0;
Expand Down

0 comments on commit 603a863

Please sign in to comment.