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

Commit 30d364e

Browse files
committed
Fix build issues after merging changes for low latency mode.
1 parent d99c35a commit 30d364e

File tree

70 files changed

+151
-2740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+151
-2740
lines changed

BUILD.gn

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if (!build_with_chromium) {
6262
"modules/audio_processing:audio_processing_tests",
6363
"modules/remote_bitrate_estimator:rtp_to_text",
6464
"modules/rtp_rtcp:test_packet_masks_metrics",
65-
"modules/video_capture:video_capture",
65+
"modules/video_capture:video_capture_internal_impl",
6666
"net/dcsctp:dcsctp_unittests",
6767
"pc:peerconnection_unittests",
6868
"pc:rtc_pc_unittests",
@@ -293,10 +293,6 @@ config("common_config") {
293293
defines += [ "WEBRTC_ENABLE_PROTOBUF=0" ]
294294
}
295295

296-
if (owt_use_gpra) {
297-
defines += [ "INTEL_GPRA" ]
298-
}
299-
300296
if (rtc_include_internal_audio_device) {
301297
defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ]
302298
}
@@ -517,7 +513,7 @@ if (!build_with_chromium) {
517513
"logging:rtc_event_log_api",
518514
"media",
519515
"modules",
520-
"modules/video_capture:video_capture",
516+
"modules/video_capture:video_capture_internal_impl",
521517
"p2p:rtc_p2p",
522518
"pc:libjingle_peerconnection",
523519
"pc:rtc_pc",

api/audio_codecs/opus/audio_decoder_opus.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ absl::optional<AudioDecoderOpus::Config> AudioDecoderOpus::SdpToConfig(
4444
return absl::nullopt; // Bad stereo parameter.
4545
}
4646
}
47-
return 2; // Default to mono.
47+
return 1; // Default to mono.
4848
}();
4949
if (absl::EqualsIgnoreCase(format.name, "opus") &&
5050
format.clockrate_hz == 48000 && format.num_channels == 2 &&

api/stats/rtc_stats_report.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
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"
2726
// TODO(tommi): Remove this include after fixing iwyu issue in chromium.
2827
// See: third_party/blink/renderer/platform/peerconnection/rtc_stats.cc
2928
#include "rtc_base/ref_counted_object.h"
@@ -58,15 +57,14 @@ class RTC_EXPORT RTCStatsReport final
5857
// Reference report to make sure it is kept alive.
5958
rtc::scoped_refptr<const RTCStatsReport> report_;
6059
StatsMap::const_iterator it_;
61-
RTC_DISALLOW_COPY_AND_ASSIGN(ConstIterator);
6260
};
6361

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

6866
explicit RTCStatsReport(int64_t timestamp_us);
69-
//RTCStatsReport(const RTCStatsReport& other) = delete;
67+
RTCStatsReport(const RTCStatsReport& other) = delete;
7068
rtc::scoped_refptr<RTCStatsReport> Copy() const;
7169

7270
int64_t timestamp_us() const { return timestamp_us_; }
@@ -132,7 +130,6 @@ class RTC_EXPORT RTCStatsReport final
132130
private:
133131
int64_t timestamp_us_;
134132
StatsMap stats_;
135-
RTC_DISALLOW_COPY_AND_ASSIGN(RTCStatsReport);
136133
};
137134

138135
} // namespace webrtc

api/transport/bitrate_settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct BitrateConstraints {
4242
int max_bitrate_bps = -1;
4343

4444
private:
45-
static constexpr int kDefaultStartBitrateBps = 5000000; // Update from 300k to 5MB for low latency mode
45+
static constexpr int kDefaultStartBitrateBps = 300000;
4646
};
4747

4848
} // namespace webrtc

api/video_codecs/video_codec.cc

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ bool VideoCodecH264::operator==(const VideoCodecH264& other) const {
5353
numberOfTemporalLayers == other.numberOfTemporalLayers);
5454
}
5555

56-
#ifndef DISABLE_H265
5756
bool VideoCodecH265::operator==(const VideoCodecH265& other) const {
5857
return (frameDroppingOn == other.frameDroppingOn &&
5958
keyFrameInterval == other.keyFrameInterval &&
@@ -62,18 +61,6 @@ bool VideoCodecH265::operator==(const VideoCodecH265& other) const {
6261
(spsLen == 0 || memcmp(spsData, other.spsData, spsLen) == 0) &&
6362
(ppsLen == 0 || memcmp(ppsData, other.ppsData, ppsLen) == 0));
6463
}
65-
#endif
66-
67-
#ifdef WEBRTC_USE_H265
68-
bool VideoCodecH265::operator==(const VideoCodecH265& other) const {
69-
return (frameDroppingOn == other.frameDroppingOn &&
70-
keyFrameInterval == other.keyFrameInterval &&
71-
vpsLen == other.vpsLen && spsLen == other.spsLen &&
72-
ppsLen == other.ppsLen &&
73-
(spsLen == 0 || memcmp(spsData, other.spsData, spsLen) == 0) &&
74-
(ppsLen == 0 || memcmp(ppsData, other.ppsData, ppsLen) == 0));
75-
}
76-
#endif
7764

7865
VideoCodec::VideoCodec()
7966
: codecType(kVideoCodecGeneric),
@@ -134,7 +121,6 @@ const VideoCodecH265& VideoCodec::H265() const {
134121
RTC_DCHECK_EQ(codecType, kVideoCodecH265);
135122
return codec_specific_.H265;
136123
}
137-
#endif
138124

139125
const char* CodecTypeToPayloadString(VideoCodecType type) {
140126
switch (type) {
@@ -148,7 +134,6 @@ const char* CodecTypeToPayloadString(VideoCodecType type) {
148134
return kPayloadNameH264;
149135
case kVideoCodecH265:
150136
return kPayloadNameH265;
151-
#endif
152137
case kVideoCodecMultiplex:
153138
return kPayloadNameMultiplex;
154139
case kVideoCodecGeneric:
@@ -172,7 +157,6 @@ VideoCodecType PayloadStringToCodecType(const std::string& name) {
172157
return kVideoCodecMultiplex;
173158
if (absl::EqualsIgnoreCase(name, kPayloadNameH265))
174159
return kVideoCodecH265;
175-
#endif
176160
return kVideoCodecGeneric;
177161
}
178162

api/video_codecs/video_codec.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,6 @@ struct VideoCodecH265 {
112112
size_t ppsLen;
113113
};
114114

115-
#ifndef DISABLE_H265
116-
struct VideoCodecH265 {
117-
bool operator==(const VideoCodecH265& other) const;
118-
bool operator!=(const VideoCodecH265& other) const {
119-
return !(*this == other);
120-
}
121-
bool frameDroppingOn;
122-
int keyFrameInterval;
123-
const uint8_t* vpsData;
124-
size_t vpsLen;
125-
const uint8_t* spsData;
126-
size_t spsLen;
127-
const uint8_t* ppsData;
128-
size_t ppsLen;
129-
};
130-
#endif
131-
132115
// Translates from name of codec to codec type and vice versa.
133116
RTC_EXPORT const char* CodecTypeToPayloadString(VideoCodecType type);
134117
RTC_EXPORT VideoCodecType PayloadStringToCodecType(const std::string& name);
@@ -137,9 +120,7 @@ union VideoCodecUnion {
137120
VideoCodecVP8 VP8;
138121
VideoCodecVP9 VP9;
139122
VideoCodecH264 H264;
140-
#ifndef DISABLE_H265
141123
VideoCodecH265 H265;
142-
#endif
143124
};
144125

145126
enum class VideoCodecMode { kRealtimeVideo, kScreensharing };

call/call_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ struct CallConfig {
3838
RtpTransportConfig ExtractTransportConfig() const;
3939
~CallConfig();
4040

41-
RTC_DEPRECATED static constexpr int kDefaultStartBitrateBps = 300000;
4241
// Bitrate config used until valid bitrate estimates are calculated. Also
4342
// used to cap total bitrate used. This comes from the remote connection.
4443
BitrateConstraints bitrate_config;

call/rtp_payload_params.cc

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
#include "absl/types/variant.h"
2020
#include "api/video/video_timing.h"
2121
#include "modules/video_coding/codecs/h264/include/h264_globals.h"
22-
#ifndef DISABLE_H265
2322
#include "modules/video_coding/codecs/h265/include/h265_globals.h"
24-
#endif
2523
#include "modules/video_coding/codecs/interface/common_constants.h"
2624
#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
2725
#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
@@ -317,32 +315,25 @@ void RtpPayloadParams::SetGeneric(const CodecSpecificInfo* codec_specific_info,
317315
int64_t frame_id,
318316
bool is_keyframe,
319317
RTPVideoHeader* rtp_video_header) {
320-
321-
#ifdef WEBRTC_USE_H265
322318
if (codec_specific_info->codecType == webrtc::kVideoCodecH265 &&
323319
codec_specific_info->codecSpecific.H265.picture_id > 0) {
324320
// H265ToGeneric implementation. Only set it when picture id is valid.
325321
rtp_video_header->generic->frame_id =
326322
codec_specific_info->codecSpecific.H265.picture_id;
327-
rtp_video_header->generic->discardable =
328-
codec_specific_info->codecSpecific.H265.discardable;
329-
rtp_video_header->generic->spatial_index = 0; // Not enabled at present.
323+
rtp_video_header->generic->spatial_index = 0; // Not enabled at present.
330324
rtp_video_header->generic->temporal_index = 0; // Not enabled at present.
331325
for (int dep_idx = 0; dep_idx < 5; dep_idx++) {
332326
if (codec_specific_info->codecSpecific.H265.dependencies[dep_idx] <= 0)
333327
break;
334328
rtp_video_header->generic->dependencies[dep_idx] =
335329
codec_specific_info->codecSpecific.H265.dependencies[dep_idx];
336330
}
337-
// Not filling DTIs at present.
338-
rtp_video_header->generic->discardable =
339-
codec_specific_info->codecSpecific.H265.discardable;
340331
return;
341332
}
342-
#else
343-
if (codec_specific_info && codec_specific_info->generic_frame_info &&
333+
if (codec_specific_info && codec_specific_info->generic_frame_info &&
344334
!codec_specific_info->generic_frame_info->encoder_buffers.empty()) {
345-
// If generic frame info is provided for other codecs, use generic frame info.
335+
// If generic frame info is provided for other codecs, use generic frame
336+
// info.
346337
if (is_keyframe) {
347338
// Key frame resets all chains it is in.
348339
chains_calculator_.Reset(
@@ -352,8 +343,6 @@ void RtpPayloadParams::SetGeneric(const CodecSpecificInfo* codec_specific_info,
352343
*codec_specific_info->generic_frame_info, frame_id);
353344
return;
354345
}
355-
#endif
356-
357346

358347
switch (rtp_video_header->codec) {
359348
case VideoCodecType::kVideoCodecGeneric:
@@ -380,10 +369,8 @@ void RtpPayloadParams::SetGeneric(const CodecSpecificInfo* codec_specific_info,
380369
is_keyframe, rtp_video_header);
381370
}
382371
return;
383-
#ifndef DISABLE_H265
384372
// No further special handling for H.265
385373
case VideoCodecType::kVideoCodecH265:
386-
#endif
387374
case VideoCodecType::kVideoCodecMultiplex:
388375
return;
389376
}

call/rtp_transport_controller_send.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ static const int64_t kRetransmitWindowSizeMs = 500;
3636
static const size_t kMaxOverheadBytes = 500;
3737

3838
constexpr TimeDelta kPacerQueueUpdateInterval = TimeDelta::Millis(25);
39-
const char kLowLatencyStreaming[] = "OWT-LowLatencyMode";
4039

4140
TargetRateConstraints ConvertConstraints(int min_bitrate_bps,
4241
int max_bitrate_bps,
@@ -55,11 +54,6 @@ TargetRateConstraints ConvertConstraints(int min_bitrate_bps,
5554
return msg;
5655
}
5756

58-
bool LowLatencyStreamingEnabled() {
59-
std::string trial = webrtc::field_trial::FindFullName(kLowLatencyStreaming);
60-
return trial.find("Enabled") == 0;
61-
}
62-
6357
TargetRateConstraints ConvertConstraints(const BitrateConstraints& contraints,
6458
Clock* clock) {
6559
return ConvertConstraints(contraints.min_bitrate_bps,

call/rtp_video_sender.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -613,17 +613,13 @@ EncodedImageCallback::Result RtpVideoSender::OnEncodedImage(
613613
codec_specific_info->codecSpecific.H264.last_fragment_in_frame)
614614
absl::get<RTPVideoHeaderH264>(rtp_video_header.video_type_header)
615615
.has_last_fragement = true;
616-
#ifndef DISABLE_H265
617-
else if (codec_specific_info->codecType ==
618-
kVideoCodecH265 && codec_specific_info->codecSpecific.H265
619-
.last_fragment_in_frame)
616+
else if (codec_specific_info->codecType == kVideoCodecH265 &&
617+
codec_specific_info->codecSpecific.H265.last_fragment_in_frame)
620618
absl::get<RTPVideoHeaderH265>(rtp_video_header.video_type_header)
621619
.has_last_fragement = true;
622-
#endif
623620
bool send_result = rtp_streams_[stream_index].sender_video->SendEncodedImage(
624621
rtp_config_.payload_type, codec_type_, rtp_timestamp, encoded_image,
625-
rtp_video_header,
626-
expected_retransmission_time_ms);
622+
rtp_video_header, expected_retransmission_time_ms);
627623
if (frame_count_observer_) {
628624
FrameCounts& counts = frame_counts_[stream_index];
629625
if (encoded_image._frameType == VideoFrameType::kVideoFrameKey) {

0 commit comments

Comments
 (0)