summaryrefslogtreecommitdiffstats
path: root/dom/media/webcodecs/DecoderTemplate.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/media/webcodecs/DecoderTemplate.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/webcodecs/DecoderTemplate.cpp')
-rw-r--r--dom/media/webcodecs/DecoderTemplate.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/dom/media/webcodecs/DecoderTemplate.cpp b/dom/media/webcodecs/DecoderTemplate.cpp
index 0fa25a208b..4d1c310737 100644
--- a/dom/media/webcodecs/DecoderTemplate.cpp
+++ b/dom/media/webcodecs/DecoderTemplate.cpp
@@ -139,8 +139,8 @@ void DecoderTemplate<DecoderType>::Configure(const ConfigType& aConfig,
nsCString errorMessage;
if (!DecoderType::Validate(aConfig, errorMessage)) {
- aRv.ThrowTypeError(
- nsPrintfCString("config is invalid: %s", errorMessage.get()));
+ LOG("Configure: Validate error: %s", errorMessage.get());
+ aRv.ThrowTypeError(errorMessage);
return;
}
@@ -322,13 +322,13 @@ void DecoderTemplate<DecoderType>::OutputDecodedData(
MOZ_ASSERT(mState == CodecState::Configured);
MOZ_ASSERT(mActiveConfig);
- nsTArray<RefPtr<VideoFrame>> frames = DecodedDataToOutputType(
+ nsTArray<RefPtr<OutputType>> frames = DecodedDataToOutputType(
GetParentObject(), std::move(aData), *mActiveConfig);
- RefPtr<VideoFrameOutputCallback> cb(mOutputCallback);
- for (RefPtr<VideoFrame>& frame : frames) {
+ RefPtr<OutputCallbackType> cb(mOutputCallback);
+ for (RefPtr<OutputType>& frame : frames) {
LOG("Outputing decoded data: ts: %" PRId64, frame->Timestamp());
- RefPtr<VideoFrame> f = frame;
- cb->Call((VideoFrame&)(*f));
+ RefPtr<OutputType> f = frame;
+ cb->Call((OutputType&)(*f));
}
}
@@ -881,6 +881,7 @@ void DecoderTemplate<DecoderType>::DestroyDecoderAgentIfAny() {
}
template class DecoderTemplate<VideoDecoderTraits>;
+template class DecoderTemplate<AudioDecoderTraits>;
#undef LOG
#undef LOGW