Skip to content

Commit 296b64e

Browse files
zhihuang0718Commit Bot
authored and
Commit Bot
committed
Revert of Modify profiles for H264 encode SW fallback (patchset #2 id:20001 of https://codereview.webrtc.org/2997913003/ )
Reason for revert: Breaks the internal bots. Root cause: The "public_deps" is defined behind an "if" condition which may not be true. Original issue's description: > Modify profiles for H264 encode SW fallback > > We have only Constrained Baseline profile available in SW encoder impl > so modify the profile to that in case of a fallback > > BUG=chromium:735959 > > Review-Url: https://codereview.webrtc.org/2997913003 > Cr-Commit-Position: refs/heads/master@{#19436} > Committed: https://chromium.googlesource.com/external/webrtc/+/1fd66656b3754c22a43f4eded57e022916bb6064 [email protected],[email protected] # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:735959 Review-Url: https://codereview.webrtc.org/2995373002 Cr-Commit-Position: refs/heads/master@{#19438}
1 parent 565d046 commit 296b64e

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

webrtc/media/BUILD.gn

+1-2
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,14 @@ rtc_static_library("rtc_media_base") {
112112
}
113113

114114
deps += [
115+
":rtc_h264_profile_id",
115116
"..:webrtc_common",
116117
"../api:libjingle_peerconnection_api",
117118
"../p2p",
118119
"../rtc_base:rtc_base",
119120
"../rtc_base:rtc_base_approved",
120121
]
121122

122-
public_deps += [ ":rtc_h264_profile_id" ]
123-
124123
if (is_nacl) {
125124
deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
126125
}

webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc

-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include "webrtc/media/engine/videoencodersoftwarefallbackwrapper.h"
1212

13-
#include "webrtc/media/base/h264_profile_level_id.h"
1413
#include "webrtc/media/engine/internalencoderfactory.h"
1514
#include "webrtc/modules/video_coding/include/video_error_codes.h"
1615
#include "webrtc/rtc_base/checks.h"
@@ -90,7 +89,6 @@ VideoEncoderSoftwareFallbackWrapper::VideoEncoderSoftwareFallbackWrapper(
9089
}
9190

9291
bool VideoEncoderSoftwareFallbackWrapper::InitFallbackEncoder() {
93-
MaybeModifyCodecForFallback();
9492
cricket::InternalEncoderFactory internal_factory;
9593
if (!FindMatchingCodec(internal_factory.supported_codecs(), codec_)) {
9694
LOG(LS_WARNING)
@@ -357,13 +355,4 @@ bool VideoEncoderSoftwareFallbackWrapper::ForcedFallbackParams::ShouldStop(
357355
(codec.width * codec.height >= kMinPixelsStop);
358356
}
359357

360-
void VideoEncoderSoftwareFallbackWrapper::MaybeModifyCodecForFallback() {
361-
// We have a specific case for H264 ConstrainedBaseline because that is the
362-
// only supported profile in Sw fallback.
363-
if (!cricket::CodecNamesEq(codec_.name.c_str(), cricket::kH264CodecName))
364-
return;
365-
codec_.SetParam(cricket::kH264FmtpProfileLevelId,
366-
cricket::kH264ProfileLevelConstrainedBaseline);
367-
}
368-
369358
} // namespace webrtc

webrtc/media/engine/videoencodersoftwarefallbackwrapper.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder {
7777
bool TryReInitForcedFallbackEncoder();
7878
void ValidateSettingsForForcedFallback();
7979
bool IsForcedFallbackActive() const;
80-
void MaybeModifyCodecForFallback();
8180

8281
// Settings used in the last InitEncode call and used if a dynamic fallback to
8382
// software is required.
@@ -95,7 +94,7 @@ class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder {
9594
uint32_t packet_loss_;
9695
int64_t rtt_;
9796

98-
cricket::VideoCodec codec_;
97+
const cricket::VideoCodec codec_;
9998
webrtc::VideoEncoder* const encoder_;
10099

101100
std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_;

0 commit comments

Comments
 (0)