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

Commit 1bd6cc5

Browse files
Sergey SilkinCommit Bot
authored andcommitted
Make SEA to be codec agnostic.
Bug: none Change-Id: I803eebe710e8278bb62daa4468ffff5f1188c6db Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192792 Reviewed-by: Ilya Nikolaevskiy <[email protected]> Commit-Queue: Sergey Silkin <[email protected]> Cr-Commit-Position: refs/heads/master@{#32593}
1 parent 728b5d0 commit 1bd6cc5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

media/engine/simulcast_encoder_adapter.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,6 @@ int SimulcastEncoderAdapter::InitEncode(
240240
RTC_DCHECK_LT(lowest_resolution_stream_index, number_of_streams);
241241
RTC_DCHECK_LT(highest_resolution_stream_index, number_of_streams);
242242

243-
const SdpVideoFormat format(
244-
codec_.codecType == webrtc::kVideoCodecVP8 ? "VP8" : "H264",
245-
video_format_.parameters);
246-
247243
for (int i = 0; i < number_of_streams; ++i) {
248244
// If an existing encoder instance exists, reuse it.
249245
// TODO(brandtr): Set initial RTP state (e.g., picture_id/tl0_pic_idx) here,
@@ -253,10 +249,10 @@ int SimulcastEncoderAdapter::InitEncode(
253249
encoder = std::move(stored_encoders_.top());
254250
stored_encoders_.pop();
255251
} else {
256-
encoder = primary_encoder_factory_->CreateVideoEncoder(format);
252+
encoder = primary_encoder_factory_->CreateVideoEncoder(video_format_);
257253
if (fallback_encoder_factory_ != nullptr) {
258254
encoder = CreateVideoEncoderSoftwareFallbackWrapper(
259-
fallback_encoder_factory_->CreateVideoEncoder(format),
255+
fallback_encoder_factory_->CreateVideoEncoder(video_format_),
260256
std::move(encoder),
261257
i == lowest_resolution_stream_index &&
262258
prefer_temporal_support_on_base_layer_);

0 commit comments

Comments
 (0)