summaryrefslogtreecommitdiffstats
path: root/dom/media/mediacapabilities/MediaCapabilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/mediacapabilities/MediaCapabilities.cpp')
-rw-r--r--dom/media/mediacapabilities/MediaCapabilities.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/dom/media/mediacapabilities/MediaCapabilities.cpp b/dom/media/mediacapabilities/MediaCapabilities.cpp
index abc83dae4d..d3123f913b 100644
--- a/dom/media/mediacapabilities/MediaCapabilities.cpp
+++ b/dom/media/mediacapabilities/MediaCapabilities.cpp
@@ -45,21 +45,6 @@ static nsCString VideoConfigurationToStr(const VideoConfiguration* aConfig) {
return nsCString();
}
- nsCString hdrMetaType(
- aConfig->mHdrMetadataType.WasPassed()
- ? HdrMetadataTypeValues::GetString(aConfig->mHdrMetadataType.Value())
- : "?");
-
- nsCString colorGamut(
- aConfig->mColorGamut.WasPassed()
- ? ColorGamutValues::GetString(aConfig->mColorGamut.Value())
- : "?");
-
- nsCString transferFunction(aConfig->mTransferFunction.WasPassed()
- ? TransferFunctionValues::GetString(
- aConfig->mTransferFunction.Value())
- : "?");
-
auto str = nsPrintfCString(
"[contentType:%s width:%d height:%d bitrate:%" PRIu64
" framerate:%lf hasAlphaChannel:%s hdrMetadataType:%s colorGamut:%s "
@@ -69,7 +54,15 @@ static nsCString VideoConfigurationToStr(const VideoConfiguration* aConfig) {
aConfig->mHasAlphaChannel.WasPassed()
? aConfig->mHasAlphaChannel.Value() ? "true" : "false"
: "?",
- hdrMetaType.get(), colorGamut.get(), transferFunction.get(),
+ aConfig->mHdrMetadataType.WasPassed()
+ ? GetEnumString(aConfig->mHdrMetadataType.Value()).get()
+ : "?",
+ aConfig->mColorGamut.WasPassed()
+ ? GetEnumString(aConfig->mColorGamut.Value()).get()
+ : "?",
+ aConfig->mTransferFunction.WasPassed()
+ ? GetEnumString(aConfig->mTransferFunction.Value()).get()
+ : "?",
aConfig->mScalabilityMode.WasPassed()
? NS_ConvertUTF16toUTF8(aConfig->mScalabilityMode.Value()).get()
: "?");