Revert "Reland "Rename stereo video codec to multiplex""
This reverts commit 4954a77cf81e6793245f52d485834acd3e6eab1c.
Reason for revert: Breaks downstream build which was depending on the name "kVideoCodecStereo". Will need to do some sort of trickery to make this change without breaking the relevant code. Sorry. :(
Original change's description:
> Reland "Rename stereo video codec to multiplex"
>
> This is a reland of bbdabe50db0cf09f6007dda12a6476dc4602b174.
> This was reverted because of breaking internal build. I contacted sheriff
> and looked at logs but cannot find anything related to this CL. This was landed
> with #3850 build which caused exception, but 3847-3855 seem to all have failed.
> I am relanding to see if it will work this time or it will give some related
> error message that can guide me.
>
> Original change's description:
> > Rename stereo video codec to multiplex
> >
> > This CL only does the rename from"stereo" to multiplex". With this we have a
> > better name that doesn't clash with audio's usage of stereo.
> >
> > Bug: webrtc:7671
> > Change-Id: Iebc3fc20839025f1bc8bcf0e16141bf9744ef652
> > Reviewed-on: https://webrtc-review.googlesource.com/43242
> > Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> > Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21769}
>
> TBR=niklas.enbom@webrtc.org
>
> Bug: webrtc:7671
> Change-Id: I5934abad1ce28acf02842ea8ee2af7768a826eb8
> Reviewed-on: https://webrtc-review.googlesource.com/44520
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21780}
TBR=sprang@webrtc.org,niklas.enbom@webrtc.org,qiangchen@chromium.org,emircan@webrtc.org
Change-Id: I0a71327c2ddfdd030b1e058cd6a41b1689836719
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7671
Reviewed-on: https://webrtc-review.googlesource.com/44621
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21783}
diff --git a/common_types.cc b/common_types.cc
index 03d5d67..61e58b7 100644
--- a/common_types.cc
+++ b/common_types.cc
@@ -78,7 +78,7 @@
static const char* kPayloadNameRED = "RED";
static const char* kPayloadNameULPFEC = "ULPFEC";
static const char* kPayloadNameGeneric = "Generic";
-static const char* kPayloadNameMultiplex = "Multiplex";
+static const char* kPayloadNameStereo = "Stereo";
static bool CodecNamesEq(const char* name1, const char* name2) {
return _stricmp(name1, name2) == 0;
@@ -99,7 +99,7 @@
case kVideoCodecULPFEC:
return kPayloadNameULPFEC;
// Other codecs default to generic.
- case kVideoCodecMultiplex:
+ case kVideoCodecStereo:
case kVideoCodecFlexfec:
case kVideoCodecGeneric:
case kVideoCodecUnknown:
@@ -121,8 +121,8 @@
return kVideoCodecRED;
if (CodecNamesEq(name.c_str(), kPayloadNameULPFEC))
return kVideoCodecULPFEC;
- if (CodecNamesEq(name.c_str(), kPayloadNameMultiplex))
- return kVideoCodecMultiplex;
+ if (CodecNamesEq(name.c_str(), kPayloadNameStereo))
+ return kVideoCodecStereo;
return kVideoCodecGeneric;
}
diff --git a/common_types.h b/common_types.h
index bd23f0f..5f9d77a 100644
--- a/common_types.h
+++ b/common_types.h
@@ -485,7 +485,7 @@
kVideoCodecULPFEC,
kVideoCodecFlexfec,
kVideoCodecGeneric,
- kVideoCodecMultiplex,
+ kVideoCodecStereo,
kVideoCodecUnknown
};
diff --git a/common_video/video_frame.cc b/common_video/video_frame.cc
index 1447fc1..58342a91 100644
--- a/common_video/video_frame.cc
+++ b/common_video/video_frame.cc
@@ -35,7 +35,7 @@
case kVideoCodecULPFEC:
case kVideoCodecFlexfec:
case kVideoCodecGeneric:
- case kVideoCodecMultiplex:
+ case kVideoCodecStereo:
case kVideoCodecUnknown:
return 0;
}
diff --git a/media/BUILD.gn b/media/BUILD.gn
index db6b10f..a1a00fc 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -164,8 +164,6 @@
"engine/internaldecoderfactory.h",
"engine/internalencoderfactory.cc",
"engine/internalencoderfactory.h",
- "engine/multiplexcodecfactory.cc",
- "engine/multiplexcodecfactory.h",
"engine/scopedvideodecoder.cc",
"engine/scopedvideodecoder.h",
"engine/scopedvideoencoder.cc",
@@ -174,6 +172,8 @@
"engine/simulcast.h",
"engine/simulcast_encoder_adapter.cc",
"engine/simulcast_encoder_adapter.h",
+ "engine/stereocodecfactory.cc",
+ "engine/stereocodecfactory.h",
"engine/videodecodersoftwarefallbackwrapper.cc",
"engine/videodecodersoftwarefallbackwrapper.h",
"engine/videoencodersoftwarefallbackwrapper.cc",
@@ -213,7 +213,7 @@
"../call:call_interfaces",
"../call:video_stream_api",
"../modules/video_coding:webrtc_h264",
- "../modules/video_coding:webrtc_multiplex",
+ "../modules/video_coding:webrtc_stereo",
"../modules/video_coding:webrtc_vp8",
"../modules/video_coding:webrtc_vp8_helpers",
"../modules/video_coding:webrtc_vp9",
@@ -529,11 +529,11 @@
"base/videoengine_unittest.h",
"engine/apm_helpers_unittest.cc",
"engine/internaldecoderfactory_unittest.cc",
- "engine/multiplexcodecfactory_unittest.cc",
"engine/nullwebrtcvideoengine_unittest.cc",
"engine/payload_type_mapper_unittest.cc",
"engine/simulcast_encoder_adapter_unittest.cc",
"engine/simulcast_unittest.cc",
+ "engine/stereocodecfactory_unittest.cc",
"engine/videodecodersoftwarefallbackwrapper_unittest.cc",
"engine/videoencodersoftwarefallbackwrapper_unittest.cc",
"engine/vp8_encoder_simulcast_proxy_unittest.cc",
diff --git a/media/base/mediaconstants.cc b/media/base/mediaconstants.cc
index e3a1d9b..9496d9f 100644
--- a/media/base/mediaconstants.cc
+++ b/media/base/mediaconstants.cc
@@ -25,7 +25,7 @@
const char kRtxCodecName[] = "rtx";
const char kRedCodecName[] = "red";
const char kUlpfecCodecName[] = "ulpfec";
-const char kMultiplexCodecName[] = "multiplex";
+const char kStereoCodecName[] = "stereo";
// TODO(brandtr): Change this to 'flexfec' when we are confident that the
// header format is not changing anymore.
diff --git a/media/base/mediaconstants.h b/media/base/mediaconstants.h
index 73bbb8d..58a66d9 100644
--- a/media/base/mediaconstants.h
+++ b/media/base/mediaconstants.h
@@ -30,7 +30,7 @@
extern const char kRedCodecName[];
extern const char kUlpfecCodecName[];
extern const char kFlexfecCodecName[];
-extern const char kMultiplexCodecName[];
+extern const char kStereoCodecName[];
extern const char kFlexfecFmtpRepairWindow[];
diff --git a/media/engine/multiplexcodecfactory.cc b/media/engine/multiplexcodecfactory.cc
deleted file mode 100644
index 23d34f9..0000000
--- a/media/engine/multiplexcodecfactory.cc
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "media/engine/multiplexcodecfactory.h"
-
-#include <utility>
-
-#include "api/video_codecs/sdp_video_format.h"
-#include "media/base/codec.h"
-#include "media/base/mediaconstants.h"
-#include "modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h"
-#include "modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h"
-#include "rtc_base/logging.h"
-
-namespace {
-
-bool IsMultiplexCodec(const cricket::VideoCodec& codec) {
- return cricket::CodecNamesEq(codec.name.c_str(),
- cricket::kMultiplexCodecName);
-}
-
-} // anonymous namespace
-
-namespace webrtc {
-
-constexpr const char* kMultiplexAssociatedCodecName = cricket::kVp9CodecName;
-
-MultiplexEncoderFactory::MultiplexEncoderFactory(
- std::unique_ptr<VideoEncoderFactory> factory)
- : factory_(std::move(factory)) {}
-
-std::vector<SdpVideoFormat> MultiplexEncoderFactory::GetSupportedFormats()
- const {
- std::vector<SdpVideoFormat> formats = factory_->GetSupportedFormats();
- for (const auto& format : formats) {
- if (cricket::CodecNamesEq(format.name, kMultiplexAssociatedCodecName)) {
- SdpVideoFormat multiplex_format = format;
- multiplex_format.parameters[cricket::kCodecParamAssociatedCodecName] =
- format.name;
- multiplex_format.name = cricket::kMultiplexCodecName;
- formats.push_back(multiplex_format);
- break;
- }
- }
- return formats;
-}
-
-VideoEncoderFactory::CodecInfo MultiplexEncoderFactory::QueryVideoEncoder(
- const SdpVideoFormat& format) const {
- if (!IsMultiplexCodec(cricket::VideoCodec(format)))
- return factory_->QueryVideoEncoder(format);
- return factory_->QueryVideoEncoder(
- SdpVideoFormat(kMultiplexAssociatedCodecName));
-}
-
-std::unique_ptr<VideoEncoder> MultiplexEncoderFactory::CreateVideoEncoder(
- const SdpVideoFormat& format) {
- if (!IsMultiplexCodec(cricket::VideoCodec(format)))
- return factory_->CreateVideoEncoder(format);
- const auto& it =
- format.parameters.find(cricket::kCodecParamAssociatedCodecName);
- if (it == format.parameters.end()) {
- RTC_LOG(LS_ERROR) << "No assicated codec for multiplex.";
- return nullptr;
- }
- SdpVideoFormat associated_format = format;
- associated_format.name = it->second;
- return std::unique_ptr<VideoEncoder>(
- new MultiplexEncoderAdapter(factory_.get(), associated_format));
-}
-
-MultiplexDecoderFactory::MultiplexDecoderFactory(
- std::unique_ptr<VideoDecoderFactory> factory)
- : factory_(std::move(factory)) {}
-
-std::vector<SdpVideoFormat> MultiplexDecoderFactory::GetSupportedFormats()
- const {
- std::vector<SdpVideoFormat> formats = factory_->GetSupportedFormats();
- for (const auto& format : formats) {
- if (cricket::CodecNamesEq(format.name, kMultiplexAssociatedCodecName)) {
- SdpVideoFormat multiplex_format = format;
- multiplex_format.parameters[cricket::kCodecParamAssociatedCodecName] =
- format.name;
- multiplex_format.name = cricket::kMultiplexCodecName;
- formats.push_back(multiplex_format);
- }
- }
- return formats;
-}
-
-std::unique_ptr<VideoDecoder> MultiplexDecoderFactory::CreateVideoDecoder(
- const SdpVideoFormat& format) {
- if (!IsMultiplexCodec(cricket::VideoCodec(format)))
- return factory_->CreateVideoDecoder(format);
- const auto& it =
- format.parameters.find(cricket::kCodecParamAssociatedCodecName);
- if (it == format.parameters.end()) {
- RTC_LOG(LS_ERROR) << "No assicated codec for multiplex.";
- return nullptr;
- }
- SdpVideoFormat associated_format = format;
- associated_format.name = it->second;
- return std::unique_ptr<VideoDecoder>(
- new MultiplexDecoderAdapter(factory_.get(), associated_format));
-}
-
-} // namespace webrtc
diff --git a/media/engine/stereocodecfactory.cc b/media/engine/stereocodecfactory.cc
new file mode 100644
index 0000000..5ffb0c4
--- /dev/null
+++ b/media/engine/stereocodecfactory.cc
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "media/engine/stereocodecfactory.h"
+
+#include <utility>
+
+#include "api/video_codecs/sdp_video_format.h"
+#include "media/base/codec.h"
+#include "media/base/mediaconstants.h"
+#include "modules/video_coding/codecs/stereo/include/stereo_decoder_adapter.h"
+#include "modules/video_coding/codecs/stereo/include/stereo_encoder_adapter.h"
+#include "rtc_base/logging.h"
+
+namespace {
+
+bool IsStereoCodec(const cricket::VideoCodec& codec) {
+ return cricket::CodecNamesEq(codec.name.c_str(), cricket::kStereoCodecName);
+}
+
+} // anonymous namespace
+
+namespace webrtc {
+
+constexpr const char* kStereoAssociatedCodecName = cricket::kVp9CodecName;
+
+StereoEncoderFactory::StereoEncoderFactory(
+ std::unique_ptr<VideoEncoderFactory> factory)
+ : factory_(std::move(factory)) {}
+
+std::vector<SdpVideoFormat> StereoEncoderFactory::GetSupportedFormats() const {
+ std::vector<SdpVideoFormat> formats = factory_->GetSupportedFormats();
+ for (const auto& format : formats) {
+ if (cricket::CodecNamesEq(format.name, kStereoAssociatedCodecName)) {
+ SdpVideoFormat stereo_format = format;
+ stereo_format.parameters[cricket::kCodecParamAssociatedCodecName] =
+ format.name;
+ stereo_format.name = cricket::kStereoCodecName;
+ formats.push_back(stereo_format);
+ break;
+ }
+ }
+ return formats;
+}
+
+VideoEncoderFactory::CodecInfo StereoEncoderFactory::QueryVideoEncoder(
+ const SdpVideoFormat& format) const {
+ if (!IsStereoCodec(cricket::VideoCodec(format)))
+ return factory_->QueryVideoEncoder(format);
+ return factory_->QueryVideoEncoder(
+ SdpVideoFormat(kStereoAssociatedCodecName));
+}
+
+std::unique_ptr<VideoEncoder> StereoEncoderFactory::CreateVideoEncoder(
+ const SdpVideoFormat& format) {
+ if (!IsStereoCodec(cricket::VideoCodec(format)))
+ return factory_->CreateVideoEncoder(format);
+ const auto& it =
+ format.parameters.find(cricket::kCodecParamAssociatedCodecName);
+ if (it == format.parameters.end()) {
+ RTC_LOG(LS_ERROR) << "No assicated codec for stereo.";
+ return nullptr;
+ }
+ SdpVideoFormat associated_format = format;
+ associated_format.name = it->second;
+ return std::unique_ptr<VideoEncoder>(
+ new StereoEncoderAdapter(factory_.get(), associated_format));
+}
+
+StereoDecoderFactory::StereoDecoderFactory(
+ std::unique_ptr<VideoDecoderFactory> factory)
+ : factory_(std::move(factory)) {}
+
+std::vector<SdpVideoFormat> StereoDecoderFactory::GetSupportedFormats() const {
+ std::vector<SdpVideoFormat> formats = factory_->GetSupportedFormats();
+ for (const auto& format : formats) {
+ if (cricket::CodecNamesEq(format.name, kStereoAssociatedCodecName)) {
+ SdpVideoFormat stereo_format = format;
+ stereo_format.parameters[cricket::kCodecParamAssociatedCodecName] =
+ format.name;
+ stereo_format.name = cricket::kStereoCodecName;
+ formats.push_back(stereo_format);
+ }
+ }
+ return formats;
+}
+
+std::unique_ptr<VideoDecoder> StereoDecoderFactory::CreateVideoDecoder(
+ const SdpVideoFormat& format) {
+ if (!IsStereoCodec(cricket::VideoCodec(format)))
+ return factory_->CreateVideoDecoder(format);
+ const auto& it =
+ format.parameters.find(cricket::kCodecParamAssociatedCodecName);
+ if (it == format.parameters.end()) {
+ RTC_LOG(LS_ERROR) << "No assicated codec for stereo.";
+ return nullptr;
+ }
+ SdpVideoFormat associated_format = format;
+ associated_format.name = it->second;
+ return std::unique_ptr<VideoDecoder>(
+ new StereoDecoderAdapter(factory_.get(), associated_format));
+}
+
+} // namespace webrtc
diff --git a/media/engine/multiplexcodecfactory.h b/media/engine/stereocodecfactory.h
similarity index 72%
rename from media/engine/multiplexcodecfactory.h
rename to media/engine/stereocodecfactory.h
index c622af5..468d2fa 100644
--- a/media/engine/multiplexcodecfactory.h
+++ b/media/engine/stereocodecfactory.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef MEDIA_ENGINE_MULTIPLEXCODECFACTORY_H_
-#define MEDIA_ENGINE_MULTIPLEXCODECFACTORY_H_
+#ifndef MEDIA_ENGINE_STEREOCODECFACTORY_H_
+#define MEDIA_ENGINE_STEREOCODECFACTORY_H_
#include <memory>
#include <vector>
@@ -19,10 +19,9 @@
namespace webrtc {
-class MultiplexEncoderFactory : public VideoEncoderFactory {
+class StereoEncoderFactory : public VideoEncoderFactory {
public:
- explicit MultiplexEncoderFactory(
- std::unique_ptr<VideoEncoderFactory> factory);
+ explicit StereoEncoderFactory(std::unique_ptr<VideoEncoderFactory> factory);
std::vector<SdpVideoFormat> GetSupportedFormats() const override;
CodecInfo QueryVideoEncoder(const SdpVideoFormat& format) const override;
@@ -33,10 +32,9 @@
std::unique_ptr<VideoEncoderFactory> factory_;
};
-class MultiplexDecoderFactory : public VideoDecoderFactory {
+class StereoDecoderFactory : public VideoDecoderFactory {
public:
- explicit MultiplexDecoderFactory(
- std::unique_ptr<VideoDecoderFactory> factory);
+ explicit StereoDecoderFactory(std::unique_ptr<VideoDecoderFactory> factory);
std::vector<SdpVideoFormat> GetSupportedFormats() const override;
std::unique_ptr<VideoDecoder> CreateVideoDecoder(
@@ -48,4 +46,4 @@
} // namespace webrtc
-#endif // MEDIA_ENGINE_MULTIPLEXCODECFACTORY_H_
+#endif // MEDIA_ENGINE_STEREOCODECFACTORY_H_
diff --git a/media/engine/multiplexcodecfactory_unittest.cc b/media/engine/stereocodecfactory_unittest.cc
similarity index 79%
rename from media/engine/multiplexcodecfactory_unittest.cc
rename to media/engine/stereocodecfactory_unittest.cc
index bc30f60..a86eff0 100644
--- a/media/engine/multiplexcodecfactory_unittest.cc
+++ b/media/engine/stereocodecfactory_unittest.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "media/engine/multiplexcodecfactory.h"
+#include "media/engine/stereocodecfactory.h"
#include <utility>
@@ -22,24 +22,24 @@
namespace webrtc {
-TEST(MultiplexDecoderFactory, CreateVideoDecoder) {
+TEST(StereoDecoderFactory, CreateVideoDecoder) {
std::unique_ptr<VideoDecoderFactory> internal_factory(
new InternalDecoderFactory());
- MultiplexDecoderFactory factory(std::move(internal_factory));
+ StereoDecoderFactory factory(std::move(internal_factory));
std::unique_ptr<VideoDecoder> decoder =
factory.CreateVideoDecoder(SdpVideoFormat(
- cricket::kMultiplexCodecName,
+ cricket::kStereoCodecName,
{{cricket::kCodecParamAssociatedCodecName, cricket::kVp9CodecName}}));
EXPECT_TRUE(decoder);
}
-TEST(MultiplexEncoderFactory, CreateVideoEncoder) {
+TEST(StereoEncoderFactory, CreateVideoEncoder) {
std::unique_ptr<VideoEncoderFactory> internal_factory(
new InternalEncoderFactory());
- MultiplexEncoderFactory factory(std::move(internal_factory));
+ StereoEncoderFactory factory(std::move(internal_factory));
std::unique_ptr<VideoEncoder> encoder =
factory.CreateVideoEncoder(SdpVideoFormat(
- cricket::kMultiplexCodecName,
+ cricket::kStereoCodecName,
{{cricket::kCodecParamAssociatedCodecName, cricket::kVp9CodecName}}));
EXPECT_TRUE(encoder);
}
diff --git a/modules/rtp_rtcp/source/rtp_payload_registry.cc b/modules/rtp_rtcp/source/rtp_payload_registry.cc
index 6cb9c86..631ffae 100644
--- a/modules/rtp_rtcp/source/rtp_payload_registry.cc
+++ b/modules/rtp_rtcp/source/rtp_payload_registry.cc
@@ -61,7 +61,7 @@
case kVideoCodecI420:
case kVideoCodecFlexfec:
case kVideoCodecGeneric:
- case kVideoCodecMultiplex:
+ case kVideoCodecStereo:
case kVideoCodecUnknown:
return kRtpVideoGeneric;
}
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index c467ea9..416cfb4 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -94,7 +94,7 @@
":video_coding_utility",
":webrtc_h264",
":webrtc_i420",
- ":webrtc_multiplex",
+ ":webrtc_stereo",
":webrtc_vp8",
":webrtc_vp8_helpers",
":webrtc_vp9",
@@ -289,14 +289,14 @@
]
}
-rtc_static_library("webrtc_multiplex") {
+rtc_static_library("webrtc_stereo") {
sources = [
- "codecs/multiplex/include/multiplex_decoder_adapter.h",
- "codecs/multiplex/include/multiplex_encoded_image_packer.h",
- "codecs/multiplex/include/multiplex_encoder_adapter.h",
- "codecs/multiplex/multiplex_decoder_adapter.cc",
- "codecs/multiplex/multiplex_encoded_image_packer.cc",
- "codecs/multiplex/multiplex_encoder_adapter.cc",
+ "codecs/stereo/include/multiplex_encoded_image_packer.h",
+ "codecs/stereo/include/stereo_decoder_adapter.h",
+ "codecs/stereo/include/stereo_encoder_adapter.h",
+ "codecs/stereo/multiplex_encoded_image_packer.cc",
+ "codecs/stereo/stereo_decoder_adapter.cc",
+ "codecs/stereo/stereo_encoder_adapter.cc",
]
if (!build_with_chromium && is_clang) {
@@ -545,7 +545,7 @@
sources = [
"codecs/h264/test/h264_impl_unittest.cc",
- "codecs/multiplex/test/multiplex_adapter_unittest.cc",
+ "codecs/stereo/test/stereo_adapter_unittest.cc",
"codecs/test/videoprocessor_integrationtest.cc",
"codecs/test/videoprocessor_integrationtest.h",
"codecs/test/videoprocessor_integrationtest_libvpx.cc",
@@ -561,7 +561,7 @@
":video_coding",
":video_coding_utility",
":webrtc_h264",
- ":webrtc_multiplex",
+ ":webrtc_stereo",
":webrtc_vp8",
":webrtc_vp8_helpers",
":webrtc_vp9",
diff --git a/modules/video_coding/codec_database.cc b/modules/video_coding/codec_database.cc
index 0108019..e300ad3 100644
--- a/modules/video_coding/codec_database.cc
+++ b/modules/video_coding/codec_database.cc
@@ -254,7 +254,7 @@
case kVideoCodecRED:
case kVideoCodecULPFEC:
case kVideoCodecFlexfec:
- case kVideoCodecMultiplex:
+ case kVideoCodecStereo:
break;
// Unknown codec type, reset just to be sure.
case kVideoCodecUnknown:
diff --git a/modules/video_coding/codecs/multiplex/OWNERS b/modules/video_coding/codecs/stereo/OWNERS
similarity index 100%
rename from modules/video_coding/codecs/multiplex/OWNERS
rename to modules/video_coding/codecs/stereo/OWNERS
diff --git a/modules/video_coding/codecs/multiplex/include/multiplex_encoded_image_packer.h b/modules/video_coding/codecs/stereo/include/multiplex_encoded_image_packer.h
similarity index 93%
rename from modules/video_coding/codecs/multiplex/include/multiplex_encoded_image_packer.h
rename to modules/video_coding/codecs/stereo/include/multiplex_encoded_image_packer.h
index a84c52d..f7557ba 100644
--- a/modules/video_coding/codecs/multiplex/include/multiplex_encoded_image_packer.h
+++ b/modules/video_coding/codecs/stereo/include/multiplex_encoded_image_packer.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_ENCODED_IMAGE_PACKER_H_
-#define MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_ENCODED_IMAGE_PACKER_H_
+#ifndef MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_MULTIPLEX_ENCODED_IMAGE_PACKER_H_
+#define MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_MULTIPLEX_ENCODED_IMAGE_PACKER_H_
#include <vector>
@@ -103,4 +103,4 @@
} // namespace webrtc
-#endif // MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_ENCODED_IMAGE_PACKER_H_
+#endif // MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_MULTIPLEX_ENCODED_IMAGE_PACKER_H_
diff --git a/modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h b/modules/video_coding/codecs/stereo/include/stereo_decoder_adapter.h
similarity index 73%
rename from modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h
rename to modules/video_coding/codecs/stereo/include/stereo_decoder_adapter.h
index 95d5783..c6237ee 100644
--- a/modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h
+++ b/modules/video_coding/codecs/stereo/include/stereo_decoder_adapter.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_DECODER_ADAPTER_H_
-#define MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_DECODER_ADAPTER_H_
+#ifndef MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_STEREO_DECODER_ADAPTER_H_
+#define MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_STEREO_DECODER_ADAPTER_H_
#include <map>
#include <memory>
@@ -18,16 +18,16 @@
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_decoder_factory.h"
-#include "modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h"
+#include "modules/video_coding/codecs/stereo/include/stereo_encoder_adapter.h"
namespace webrtc {
-class MultiplexDecoderAdapter : public VideoDecoder {
+class StereoDecoderAdapter : public VideoDecoder {
public:
// |factory| is not owned and expected to outlive this class' lifetime.
- explicit MultiplexDecoderAdapter(VideoDecoderFactory* factory,
- const SdpVideoFormat& associated_format);
- virtual ~MultiplexDecoderAdapter();
+ explicit StereoDecoderAdapter(VideoDecoderFactory* factory,
+ const SdpVideoFormat& associated_format);
+ virtual ~StereoDecoderAdapter();
// Implements VideoDecoder
int32_t InitDecode(const VideoCodec* codec_settings,
@@ -56,9 +56,9 @@
void MergeAlphaImages(VideoFrame* decoded_image,
const rtc::Optional<int32_t>& decode_time_ms,
const rtc::Optional<uint8_t>& qp,
- VideoFrame* multiplex_decoded_image,
- const rtc::Optional<int32_t>& multiplex_decode_time_ms,
- const rtc::Optional<uint8_t>& multiplex_qp);
+ VideoFrame* stereo_decoded_image,
+ const rtc::Optional<int32_t>& stereo_decode_time_ms,
+ const rtc::Optional<uint8_t>& stereo_qp);
VideoDecoderFactory* const factory_;
const SdpVideoFormat associated_format_;
@@ -72,4 +72,4 @@
} // namespace webrtc
-#endif // MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_DECODER_ADAPTER_H_
+#endif // MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_STEREO_DECODER_ADAPTER_H_
diff --git a/modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h b/modules/video_coding/codecs/stereo/include/stereo_encoder_adapter.h
similarity index 78%
rename from modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h
rename to modules/video_coding/codecs/stereo/include/stereo_encoder_adapter.h
index 7488f20..544a218 100644
--- a/modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h
+++ b/modules/video_coding/codecs/stereo/include/stereo_encoder_adapter.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_ENCODER_ADAPTER_H_
-#define MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_ENCODER_ADAPTER_H_
+#ifndef MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_STEREO_ENCODER_ADAPTER_H_
+#define MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_STEREO_ENCODER_ADAPTER_H_
#include <map>
#include <memory>
@@ -18,7 +18,7 @@
#include "api/video_codecs/sdp_video_format.h"
#include "api/video_codecs/video_encoder.h"
#include "api/video_codecs/video_encoder_factory.h"
-#include "modules/video_coding/codecs/multiplex/include/multiplex_encoded_image_packer.h"
+#include "modules/video_coding/codecs/stereo/include/multiplex_encoded_image_packer.h"
#include "modules/video_coding/include/video_codec_interface.h"
namespace webrtc {
@@ -29,12 +29,12 @@
kAlphaCodecStreams = 2,
};
-class MultiplexEncoderAdapter : public VideoEncoder {
+class StereoEncoderAdapter : public VideoEncoder {
public:
// |factory| is not owned and expected to outlive this class' lifetime.
- explicit MultiplexEncoderAdapter(VideoEncoderFactory* factory,
- const SdpVideoFormat& associated_format);
- virtual ~MultiplexEncoderAdapter();
+ explicit StereoEncoderAdapter(VideoEncoderFactory* factory,
+ const SdpVideoFormat& associated_format);
+ virtual ~StereoEncoderAdapter();
// Implements VideoEncoder
int InitEncode(const VideoCodec* inst,
@@ -69,7 +69,7 @@
std::map<uint32_t /* timestamp */, MultiplexImage> stashed_images_;
uint16_t picture_index_ = 0;
- std::vector<uint8_t> multiplex_dummy_planes_;
+ std::vector<uint8_t> stereo_dummy_planes_;
int key_frame_interval_;
EncodedImage combined_image_;
@@ -77,4 +77,4 @@
} // namespace webrtc
-#endif // MODULES_VIDEO_CODING_CODECS_MULTIPLEX_INCLUDE_MULTIPLEX_ENCODER_ADAPTER_H_
+#endif // MODULES_VIDEO_CODING_CODECS_STEREO_INCLUDE_STEREO_ENCODER_ADAPTER_H_
diff --git a/modules/video_coding/codecs/multiplex/multiplex_encoded_image_packer.cc b/modules/video_coding/codecs/stereo/multiplex_encoded_image_packer.cc
similarity index 98%
rename from modules/video_coding/codecs/multiplex/multiplex_encoded_image_packer.cc
rename to modules/video_coding/codecs/stereo/multiplex_encoded_image_packer.cc
index 6e02a65..6a33bb1 100644
--- a/modules/video_coding/codecs/multiplex/multiplex_encoded_image_packer.cc
+++ b/modules/video_coding/codecs/stereo/multiplex_encoded_image_packer.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/video_coding/codecs/multiplex/include/multiplex_encoded_image_packer.h"
+#include "modules/video_coding/codecs/stereo/include/multiplex_encoded_image_packer.h"
#include <cstring>
diff --git a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc b/modules/video_coding/codecs/stereo/stereo_decoder_adapter.cc
similarity index 85%
rename from modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
rename to modules/video_coding/codecs/stereo/stereo_decoder_adapter.cc
index 899dcee..59fcc50 100644
--- a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
+++ b/modules/video_coding/codecs/stereo/stereo_decoder_adapter.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h"
+#include "modules/video_coding/codecs/stereo/include/stereo_decoder_adapter.h"
#include "api/video/i420_buffer.h"
#include "api/video/video_frame_buffer.h"
@@ -25,10 +25,10 @@
namespace webrtc {
-class MultiplexDecoderAdapter::AdapterDecodedImageCallback
+class StereoDecoderAdapter::AdapterDecodedImageCallback
: public webrtc::DecodedImageCallback {
public:
- AdapterDecodedImageCallback(webrtc::MultiplexDecoderAdapter* adapter,
+ AdapterDecodedImageCallback(webrtc::StereoDecoderAdapter* adapter,
AlphaCodecStream stream_idx)
: adapter_(adapter), stream_idx_(stream_idx) {}
@@ -49,11 +49,11 @@
}
private:
- MultiplexDecoderAdapter* adapter_;
+ StereoDecoderAdapter* adapter_;
const AlphaCodecStream stream_idx_;
};
-struct MultiplexDecoderAdapter::DecodedImageData {
+struct StereoDecoderAdapter::DecodedImageData {
explicit DecodedImageData(AlphaCodecStream stream_idx)
: stream_idx_(stream_idx),
decoded_image_(I420Buffer::Create(1 /* width */, 1 /* height */),
@@ -79,18 +79,18 @@
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DecodedImageData);
};
-MultiplexDecoderAdapter::MultiplexDecoderAdapter(
+StereoDecoderAdapter::StereoDecoderAdapter(
VideoDecoderFactory* factory,
const SdpVideoFormat& associated_format)
: factory_(factory), associated_format_(associated_format) {}
-MultiplexDecoderAdapter::~MultiplexDecoderAdapter() {
+StereoDecoderAdapter::~StereoDecoderAdapter() {
Release();
}
-int32_t MultiplexDecoderAdapter::InitDecode(const VideoCodec* codec_settings,
- int32_t number_of_cores) {
- RTC_DCHECK_EQ(kVideoCodecMultiplex, codec_settings->codecType);
+int32_t StereoDecoderAdapter::InitDecode(const VideoCodec* codec_settings,
+ int32_t number_of_cores) {
+ RTC_DCHECK_EQ(kVideoCodecStereo, codec_settings->codecType);
VideoCodec settings = *codec_settings;
settings.codecType = PayloadStringToCodecType(associated_format_.name);
for (size_t i = 0; i < kAlphaCodecStreams; ++i) {
@@ -100,7 +100,7 @@
if (rv)
return rv;
adapter_callbacks_.emplace_back(
- new MultiplexDecoderAdapter::AdapterDecodedImageCallback(
+ new StereoDecoderAdapter::AdapterDecodedImageCallback(
this, static_cast<AlphaCodecStream>(i)));
decoder->RegisterDecodeCompleteCallback(adapter_callbacks_.back().get());
decoders_.emplace_back(std::move(decoder));
@@ -108,7 +108,7 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-int32_t MultiplexDecoderAdapter::Decode(
+int32_t StereoDecoderAdapter::Decode(
const EncodedImage& input_image,
bool missing_frames,
const RTPFragmentationHeader* /*fragmentation*/,
@@ -135,13 +135,13 @@
return rv;
}
-int32_t MultiplexDecoderAdapter::RegisterDecodeCompleteCallback(
+int32_t StereoDecoderAdapter::RegisterDecodeCompleteCallback(
DecodedImageCallback* callback) {
decoded_complete_callback_ = callback;
return WEBRTC_VIDEO_CODEC_OK;
}
-int32_t MultiplexDecoderAdapter::Release() {
+int32_t StereoDecoderAdapter::Release() {
for (auto& decoder : decoders_) {
const int32_t rv = decoder->Release();
if (rv)
@@ -152,10 +152,10 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-void MultiplexDecoderAdapter::Decoded(AlphaCodecStream stream_idx,
- VideoFrame* decoded_image,
- rtc::Optional<int32_t> decode_time_ms,
- rtc::Optional<uint8_t> qp) {
+void StereoDecoderAdapter::Decoded(AlphaCodecStream stream_idx,
+ VideoFrame* decoded_image,
+ rtc::Optional<int32_t> decode_time_ms,
+ rtc::Optional<uint8_t> qp) {
const auto& other_decoded_data_it =
decoded_data_.find(decoded_image->timestamp());
if (other_decoded_data_it != decoded_data_.end()) {
@@ -183,7 +183,7 @@
std::forward_as_tuple(stream_idx, *decoded_image, decode_time_ms, qp));
}
-void MultiplexDecoderAdapter::MergeAlphaImages(
+void StereoDecoderAdapter::MergeAlphaImages(
VideoFrame* decoded_image,
const rtc::Optional<int32_t>& decode_time_ms,
const rtc::Optional<uint8_t>& qp,
diff --git a/modules/video_coding/codecs/multiplex/multiplex_encoder_adapter.cc b/modules/video_coding/codecs/stereo/stereo_encoder_adapter.cc
similarity index 81%
rename from modules/video_coding/codecs/multiplex/multiplex_encoder_adapter.cc
rename to modules/video_coding/codecs/stereo/stereo_encoder_adapter.cc
index 2754b39..3c1cc53 100644
--- a/modules/video_coding/codecs/multiplex/multiplex_encoder_adapter.cc
+++ b/modules/video_coding/codecs/stereo/stereo_encoder_adapter.cc
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h"
+#include "modules/video_coding/codecs/stereo/include/stereo_encoder_adapter.h"
#include <cstring>
@@ -23,10 +23,10 @@
// Callback wrapper that helps distinguish returned results from |encoders_|
// instances.
-class MultiplexEncoderAdapter::AdapterEncodedImageCallback
+class StereoEncoderAdapter::AdapterEncodedImageCallback
: public webrtc::EncodedImageCallback {
public:
- AdapterEncodedImageCallback(webrtc::MultiplexEncoderAdapter* adapter,
+ AdapterEncodedImageCallback(webrtc::StereoEncoderAdapter* adapter,
AlphaCodecStream stream_idx)
: adapter_(adapter), stream_idx_(stream_idx) {}
@@ -41,32 +41,31 @@
}
private:
- MultiplexEncoderAdapter* adapter_;
+ StereoEncoderAdapter* adapter_;
const AlphaCodecStream stream_idx_;
};
-MultiplexEncoderAdapter::MultiplexEncoderAdapter(
+StereoEncoderAdapter::StereoEncoderAdapter(
VideoEncoderFactory* factory,
const SdpVideoFormat& associated_format)
: factory_(factory),
associated_format_(associated_format),
encoded_complete_callback_(nullptr) {}
-MultiplexEncoderAdapter::~MultiplexEncoderAdapter() {
+StereoEncoderAdapter::~StereoEncoderAdapter() {
Release();
}
-int MultiplexEncoderAdapter::InitEncode(const VideoCodec* inst,
- int number_of_cores,
- size_t max_payload_size) {
+int StereoEncoderAdapter::InitEncode(const VideoCodec* inst,
+ int number_of_cores,
+ size_t max_payload_size) {
const size_t buffer_size =
CalcBufferSize(VideoType::kI420, inst->width, inst->height);
- multiplex_dummy_planes_.resize(buffer_size);
+ stereo_dummy_planes_.resize(buffer_size);
// It is more expensive to encode 0x00, so use 0x80 instead.
- std::fill(multiplex_dummy_planes_.begin(), multiplex_dummy_planes_.end(),
- 0x80);
+ std::fill(stereo_dummy_planes_.begin(), stereo_dummy_planes_.end(), 0x80);
- RTC_DCHECK_EQ(kVideoCodecMultiplex, inst->codecType);
+ RTC_DCHECK_EQ(kVideoCodecStereo, inst->codecType);
VideoCodec settings = *inst;
settings.codecType = PayloadStringToCodecType(associated_format_.name);
@@ -95,7 +94,7 @@
const int rv =
encoder->InitEncode(&settings, number_of_cores, max_payload_size);
if (rv) {
- RTC_LOG(LS_ERROR) << "Failed to create multiplex codec index " << i;
+ RTC_LOG(LS_ERROR) << "Failed to create stereo codec index " << i;
return rv;
}
adapter_callbacks_.emplace_back(new AdapterEncodedImageCallback(
@@ -106,10 +105,9 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-int MultiplexEncoderAdapter::Encode(
- const VideoFrame& input_image,
- const CodecSpecificInfo* codec_specific_info,
- const std::vector<FrameType>* frame_types) {
+int StereoEncoderAdapter::Encode(const VideoFrame& input_image,
+ const CodecSpecificInfo* codec_specific_info,
+ const std::vector<FrameType>* frame_types) {
if (!encoded_complete_callback_) {
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}
@@ -144,8 +142,8 @@
rtc::scoped_refptr<I420BufferInterface> alpha_buffer =
WrapI420Buffer(input_image.width(), input_image.height(),
yuva_buffer->DataA(), yuva_buffer->StrideA(),
- multiplex_dummy_planes_.data(), yuva_buffer->StrideU(),
- multiplex_dummy_planes_.data(), yuva_buffer->StrideV(),
+ stereo_dummy_planes_.data(), yuva_buffer->StrideU(),
+ stereo_dummy_planes_.data(), yuva_buffer->StrideV(),
rtc::KeepRefUntilDone(input_image.video_frame_buffer()));
VideoFrame alpha_image(alpha_buffer, input_image.timestamp(),
input_image.render_time_ms(), input_image.rotation());
@@ -154,14 +152,14 @@
return rv;
}
-int MultiplexEncoderAdapter::RegisterEncodeCompleteCallback(
+int StereoEncoderAdapter::RegisterEncodeCompleteCallback(
EncodedImageCallback* callback) {
encoded_complete_callback_ = callback;
return WEBRTC_VIDEO_CODEC_OK;
}
-int MultiplexEncoderAdapter::SetChannelParameters(uint32_t packet_loss,
- int64_t rtt) {
+int StereoEncoderAdapter::SetChannelParameters(uint32_t packet_loss,
+ int64_t rtt) {
for (auto& encoder : encoders_) {
const int rv = encoder->SetChannelParameters(packet_loss, rtt);
if (rv)
@@ -170,8 +168,8 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-int MultiplexEncoderAdapter::SetRateAllocation(const BitrateAllocation& bitrate,
- uint32_t framerate) {
+int StereoEncoderAdapter::SetRateAllocation(const BitrateAllocation& bitrate,
+ uint32_t framerate) {
for (auto& encoder : encoders_) {
// TODO(emircan): |framerate| is used to calculate duration in encoder
// instances. We report the total frame rate to keep real time for now.
@@ -184,7 +182,7 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-int MultiplexEncoderAdapter::Release() {
+int StereoEncoderAdapter::Release() {
for (auto& encoder : encoders_) {
const int rv = encoder->Release();
if (rv)
@@ -205,11 +203,11 @@
return WEBRTC_VIDEO_CODEC_OK;
}
-const char* MultiplexEncoderAdapter::ImplementationName() const {
- return "MultiplexEncoderAdapter";
+const char* StereoEncoderAdapter::ImplementationName() const {
+ return "StereoEncoderAdapter";
}
-EncodedImageCallback::Result MultiplexEncoderAdapter::OnEncodedImage(
+EncodedImageCallback::Result StereoEncoderAdapter::OnEncodedImage(
AlphaCodecStream stream_idx,
const EncodedImage& encodedImage,
const CodecSpecificInfo* codecSpecificInfo,
@@ -248,7 +246,7 @@
MultiplexEncodedImagePacker::PackAndRelease(iter->second);
CodecSpecificInfo codec_info = *codecSpecificInfo;
- codec_info.codecType = kVideoCodecMultiplex;
+ codec_info.codecType = kVideoCodecStereo;
codec_info.codecSpecific.generic.simulcast_idx = 0;
encoded_complete_callback_->OnEncodedImage(combined_image_, &codec_info,
fragmentation);
diff --git a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc b/modules/video_coding/codecs/stereo/test/stereo_adapter_unittest.cc
similarity index 79%
rename from modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
rename to modules/video_coding/codecs/stereo/test/stereo_adapter_unittest.cc
index d5e1fb6..b1e1275 100644
--- a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
+++ b/modules/video_coding/codecs/stereo/test/stereo_adapter_unittest.cc
@@ -14,8 +14,8 @@
#include "common_video/include/video_frame_buffer.h"
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "media/base/mediaconstants.h"
-#include "modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h"
-#include "modules/video_coding/codecs/multiplex/include/multiplex_encoder_adapter.h"
+#include "modules/video_coding/codecs/stereo/include/stereo_decoder_adapter.h"
+#include "modules/video_coding/codecs/stereo/include/stereo_encoder_adapter.h"
#include "modules/video_coding/codecs/test/video_codec_test.h"
#include "modules/video_coding/codecs/vp9/include/vp9.h"
#include "rtc_base/keep_ref_until_done.h"
@@ -26,33 +26,33 @@
namespace webrtc {
-constexpr const char* kMultiplexAssociatedCodecName = cricket::kVp9CodecName;
-const VideoCodecType kMultiplexAssociatedCodecType =
- PayloadStringToCodecType(kMultiplexAssociatedCodecName);
+constexpr const char* kStereoAssociatedCodecName = cricket::kVp9CodecName;
+const VideoCodecType kStereoAssociatedCodecType =
+ PayloadStringToCodecType(kStereoAssociatedCodecName);
-class TestMultiplexAdapter : public VideoCodecTest {
+class TestStereoAdapter : public VideoCodecTest {
public:
- TestMultiplexAdapter()
+ TestStereoAdapter()
: decoder_factory_(new webrtc::MockVideoDecoderFactory),
encoder_factory_(new webrtc::MockVideoEncoderFactory) {}
protected:
std::unique_ptr<VideoDecoder> CreateDecoder() override {
- return rtc::MakeUnique<MultiplexDecoderAdapter>(
- decoder_factory_.get(), SdpVideoFormat(kMultiplexAssociatedCodecName));
+ return rtc::MakeUnique<StereoDecoderAdapter>(
+ decoder_factory_.get(), SdpVideoFormat(kStereoAssociatedCodecName));
}
std::unique_ptr<VideoEncoder> CreateEncoder() override {
- return rtc::MakeUnique<MultiplexEncoderAdapter>(
- encoder_factory_.get(), SdpVideoFormat(kMultiplexAssociatedCodecName));
+ return rtc::MakeUnique<StereoEncoderAdapter>(
+ encoder_factory_.get(), SdpVideoFormat(kStereoAssociatedCodecName));
}
VideoCodec codec_settings() override {
VideoCodec codec_settings;
- codec_settings.codecType = kMultiplexAssociatedCodecType;
+ codec_settings.codecType = kStereoAssociatedCodecType;
codec_settings.VP9()->numberOfTemporalLayers = 1;
codec_settings.VP9()->numberOfSpatialLayers = 1;
- codec_settings.codecType = webrtc::kVideoCodecMultiplex;
+ codec_settings.codecType = webrtc::kVideoCodecStereo;
return codec_settings;
}
@@ -96,22 +96,22 @@
// TODO(emircan): Currently VideoCodecTest tests do a complete setup
// step that goes beyond constructing |decoder_|. Simplify these tests to do
// less.
-TEST_F(TestMultiplexAdapter, ConstructAndDestructDecoder) {
+TEST_F(TestStereoAdapter, ConstructAndDestructDecoder) {
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Release());
}
-TEST_F(TestMultiplexAdapter, ConstructAndDestructEncoder) {
+TEST_F(TestStereoAdapter, ConstructAndDestructEncoder) {
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->Release());
}
-TEST_F(TestMultiplexAdapter, EncodeDecodeI420Frame) {
+TEST_F(TestStereoAdapter, EncodeDecodeI420Frame) {
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
encoder_->Encode(*input_frame_, nullptr, nullptr));
EncodedImage encoded_frame;
CodecSpecificInfo codec_specific_info;
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
- EXPECT_EQ(kVideoCodecMultiplex, codec_specific_info.codecType);
+ EXPECT_EQ(kVideoCodecStereo, codec_specific_info.codecType);
EXPECT_EQ(
WEBRTC_VIDEO_CODEC_OK,
@@ -123,7 +123,7 @@
EXPECT_GT(I420PSNR(input_frame_.get(), decoded_frame.get()), 36);
}
-TEST_F(TestMultiplexAdapter, EncodeDecodeI420AFrame) {
+TEST_F(TestStereoAdapter, EncodeDecodeI420AFrame) {
std::unique_ptr<VideoFrame> yuva_frame = CreateI420AInputFrame();
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
encoder_->Encode(*yuva_frame, nullptr, nullptr));
@@ -131,7 +131,7 @@
CodecSpecificInfo codec_specific_info;
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
- EXPECT_EQ(kVideoCodecMultiplex, codec_specific_info.codecType);
+ EXPECT_EQ(kVideoCodecStereo, codec_specific_info.codecType);
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
decoder_->Decode(encoded_frame, false, nullptr, nullptr));
diff --git a/modules/video_coding/rtp_frame_reference_finder.cc b/modules/video_coding/rtp_frame_reference_finder.cc
index 512d6f2..0aaeaec 100644
--- a/modules/video_coding/rtp_frame_reference_finder.cc
+++ b/modules/video_coding/rtp_frame_reference_finder.cc
@@ -98,7 +98,7 @@
case kVideoCodecUnknown:
case kVideoCodecH264:
case kVideoCodecI420:
- case kVideoCodecMultiplex:
+ case kVideoCodecStereo:
case kVideoCodecGeneric:
return ManageFrameGeneric(frame, kNoPictureId);
}
diff --git a/modules/video_coding/video_codec_initializer.cc b/modules/video_coding/video_codec_initializer.cc
index 8a86571..24c9e7c 100644
--- a/modules/video_coding/video_codec_initializer.cc
+++ b/modules/video_coding/video_codec_initializer.cc
@@ -39,7 +39,7 @@
bool nack_enabled,
VideoCodec* codec,
std::unique_ptr<VideoBitrateAllocator>* bitrate_allocator) {
- if (PayloadStringToCodecType(settings.payload_name) == kVideoCodecMultiplex) {
+ if (PayloadStringToCodecType(settings.payload_name) == kVideoCodecStereo) {
VideoSendStream::Config::EncoderSettings associated_codec_settings =
settings;
associated_codec_settings.payload_name =
@@ -49,7 +49,7 @@
RTC_LOG(LS_ERROR) << "Failed to create stereo encoder configuration.";
return false;
}
- codec->codecType = kVideoCodecMultiplex;
+ codec->codecType = kVideoCodecStereo;
strncpy(codec->plName, settings.payload_name.c_str(),
sizeof(codec->plName));
return true;
diff --git a/modules/video_coding/video_codec_initializer_unittest.cc b/modules/video_coding/video_codec_initializer_unittest.cc
index ed6ad9c..e8925e1 100644
--- a/modules/video_coding/video_codec_initializer_unittest.cc
+++ b/modules/video_coding/video_codec_initializer_unittest.cc
@@ -79,7 +79,7 @@
webrtc::VideoEncoderConfig::Vp8EncoderSpecificSettings>(vp8_settings);
settings_.payload_name = kVp8PayloadName;
settings_.payload_type = kVp8PayloadType;
- } else if (type == VideoCodecType::kVideoCodecMultiplex) {
+ } else if (type == VideoCodecType::kVideoCodecStereo) {
} else {
ADD_FAILURE() << "Unexpected codec type: " << type;
}
@@ -94,7 +94,7 @@
&bitrate_allocator_out_)) {
return false;
}
- if (codec_out_.codecType == VideoCodecType::kVideoCodecMultiplex)
+ if (codec_out_.codecType == VideoCodecType::kVideoCodecStereo)
return true;
// Make sure temporal layers instances have been created.
if (codec_out_.codecType == VideoCodecType::kVideoCodecVP8) {
@@ -257,8 +257,8 @@
bitrate_allocation.GetBitrate(1, 1));
}
-TEST_F(VideoCodecInitializerTest, SingleStreamMultiplexCodec) {
- SetUpFor(VideoCodecType::kVideoCodecMultiplex, 1, 1, true);
+TEST_F(VideoCodecInitializerTest, SingleStreamStereoCodec) {
+ SetUpFor(VideoCodecType::kVideoCodecStereo, 1, 1, true);
streams_.push_back(DefaultStream());
EXPECT_TRUE(InitializeCodec());
}
diff --git a/test/video_codec_settings.h b/test/video_codec_settings.h
index bdf8ca5..5dabc70 100644
--- a/test/video_codec_settings.h
+++ b/test/video_codec_settings.h
@@ -103,7 +103,7 @@
case kVideoCodecRED:
case kVideoCodecULPFEC:
case kVideoCodecFlexfec:
- case kVideoCodecMultiplex:
+ case kVideoCodecStereo:
case kVideoCodecGeneric:
case kVideoCodecUnknown:
RTC_NOTREACHED();
diff --git a/video/payload_router.cc b/video/payload_router.cc
index 1d16fbd..743abc5 100644
--- a/video/payload_router.cc
+++ b/video/payload_router.cc
@@ -81,7 +81,7 @@
rtp->codecHeader.H264.packetization_mode =
info->codecSpecific.H264.packetization_mode;
return;
- case kVideoCodecMultiplex:
+ case kVideoCodecStereo:
case kVideoCodecGeneric:
rtp->codec = kRtpVideoGeneric;
rtp->simulcastIdx = info->codecSpecific.generic.simulcast_idx;
diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc
index dcffc9f..17ddb48 100644
--- a/video/video_receive_stream.cc
+++ b/video/video_receive_stream.cc
@@ -60,11 +60,11 @@
*(codec.H264()) = VideoEncoder::GetDefaultH264Settings();
codec.H264()->profile =
H264::ParseSdpProfileLevelId(decoder.codec_params)->profile;
- } else if (codec.codecType == kVideoCodecMultiplex) {
+ } else if (codec.codecType == kVideoCodecStereo) {
VideoReceiveStream::Decoder associated_decoder = decoder;
associated_decoder.payload_name = CodecTypeToPayloadString(kVideoCodecVP9);
VideoCodec associated_codec = CreateDecoderVideoCodec(associated_decoder);
- associated_codec.codecType = kVideoCodecMultiplex;
+ associated_codec.codecType = kVideoCodecStereo;
strncpy(associated_codec.plName, decoder.payload_name.c_str(),
sizeof(associated_codec.plName));
return associated_codec;