Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 546fde2

Browse files
taste1981jianjunz
authored andcommitted
Disable frame-dropper for cloudgaming (#76)
1 parent 2142e5d commit 546fde2

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

api/stats/rtc_stats_report.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "api/ref_counted_base.h"
2424
#include "api/scoped_refptr.h"
2525
#include "api/stats/rtc_stats.h"
26+
#include "rtc_base/constructor_magic.h"
2627
// TODO(tommi): Remove this include after fixing iwyu issue in chromium.
2728
// See: third_party/blink/renderer/platform/peerconnection/rtc_stats.cc
2829
#include "rtc_base/ref_counted_object.h"
@@ -57,14 +58,15 @@ class RTC_EXPORT RTCStatsReport final
5758
// Reference report to make sure it is kept alive.
5859
rtc::scoped_refptr<const RTCStatsReport> report_;
5960
StatsMap::const_iterator it_;
61+
RTC_DISALLOW_COPY_AND_ASSIGN(ConstIterator);
6062
};
6163

6264
// TODO(hbos): Remove "= 0" once Chromium unittest has been updated to call
6365
// with a parameter. crbug.com/627816
6466
static rtc::scoped_refptr<RTCStatsReport> Create(int64_t timestamp_us = 0);
6567

6668
explicit RTCStatsReport(int64_t timestamp_us);
67-
RTCStatsReport(const RTCStatsReport& other) = delete;
69+
//RTCStatsReport(const RTCStatsReport& other) = delete;
6870
rtc::scoped_refptr<RTCStatsReport> Copy() const;
6971

7072
int64_t timestamp_us() const { return timestamp_us_; }
@@ -130,6 +132,7 @@ class RTC_EXPORT RTCStatsReport final
130132
private:
131133
int64_t timestamp_us_;
132134
StatsMap stats_;
135+
RTC_DISALLOW_COPY_AND_ASSIGN(RTCStatsReport);
133136
};
134137

135138
} // namespace webrtc

media/engine/encoder_simulcast_proxy.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "api/video_codecs/video_encoder.h"
2626
#include "api/video_codecs/video_encoder_factory.h"
2727
#include "modules/video_coding/include/video_codec_interface.h"
28+
#include "rtc_base/constructor_magic.h"
2829
#include "rtc_base/system/rtc_export.h"
2930

3031
namespace webrtc {
@@ -57,6 +58,7 @@ class RTC_EXPORT EncoderSimulcastProxy : public VideoEncoder {
5758
SdpVideoFormat video_format_;
5859
std::unique_ptr<VideoEncoder> encoder_;
5960
EncodedImageCallback* callback_;
61+
RTC_DISALLOW_COPY_AND_ASSIGN(EncoderSimulcastProxy);
6062
};
6163

6264
} // namespace webrtc

p2p/base/port_allocator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ class RTC_EXPORT PortAllocator : public sigslot::has_slots<> {
665665
// if ice_credentials is nullptr.
666666
std::vector<std::unique_ptr<PortAllocatorSession>>::const_iterator
667667
FindPooledSession(const IceParameters* ice_credentials = nullptr) const;
668+
RTC_DISALLOW_COPY_AND_ASSIGN(PortAllocator);
668669
};
669670

670671
} // namespace cricket

video/video_stream_encoder.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,9 @@ bool VideoStreamEncoder::EncoderPaused() const {
15501550
// pacer queue has grown too large in buffered mode.
15511551
// If the pacer queue has grown too large or the network is down,
15521552
// `last_encoder_rate_settings_->encoder_target` will be 0.
1553+
// For low latency mode we always disable encoder pausing.
1554+
if (field_trial::IsEnabled("OWT-LowLatencyMode"))
1555+
return false;
15531556
return !last_encoder_rate_settings_ ||
15541557
last_encoder_rate_settings_->encoder_target == DataRate::Zero();
15551558
}
@@ -2302,7 +2305,8 @@ void VideoStreamEncoder::OnBitrateUpdated(DataRate target_bitrate,
23022305

23032306
bool VideoStreamEncoder::DropDueToSize(uint32_t pixel_count) const {
23042307
if (!encoder_ || !stream_resource_manager_.DropInitialFrames() ||
2305-
!encoder_target_bitrate_bps_.has_value()) {
2308+
!encoder_target_bitrate_bps_.has_value() ||
2309+
field_trial::IsEnabled("OWT-LowLatencyMode")) {
23062310
return false;
23072311
}
23082312

0 commit comments

Comments
 (0)