summaryrefslogtreecommitdiffstats
path: root/dom/media/VideoFrameConverter.h
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/VideoFrameConverter.h
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/VideoFrameConverter.h')
-rw-r--r--dom/media/VideoFrameConverter.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/dom/media/VideoFrameConverter.h b/dom/media/VideoFrameConverter.h
index 36132c1b45..31b3104955 100644
--- a/dom/media/VideoFrameConverter.h
+++ b/dom/media/VideoFrameConverter.h
@@ -109,8 +109,8 @@ class VideoFrameConverter {
// for processing so it can be immediately sent.
mLastFrameQueuedForProcessing.mTime = time;
- MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(
- NewRunnableMethod<StoreCopyPassByLRef<FrameToProcess>>(
+ MOZ_ALWAYS_SUCCEEDS(
+ mTaskQueue->Dispatch(NewRunnableMethod<FrameToProcess>(
"VideoFrameConverter::ProcessVideoFrame", this,
&VideoFrameConverter::ProcessVideoFrame,
mLastFrameQueuedForProcessing)));
@@ -138,8 +138,8 @@ class VideoFrameConverter {
mLastFrameQueuedForProcessing.mForceBlack = true;
mLastFrameQueuedForProcessing.mImage = nullptr;
- MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(
- NewRunnableMethod<StoreCopyPassByLRef<FrameToProcess>>(
+ MOZ_ALWAYS_SUCCEEDS(
+ mTaskQueue->Dispatch(NewRunnableMethod<FrameToProcess>(
"VideoFrameConverter::ProcessVideoFrame", this,
&VideoFrameConverter::ProcessVideoFrame,
mLastFrameQueuedForProcessing)));
@@ -293,11 +293,10 @@ class VideoFrameConverter {
return;
}
- MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(
- NewRunnableMethod<StoreCopyPassByLRef<FrameToProcess>>(
- "VideoFrameConverter::ProcessVideoFrame", this,
- &VideoFrameConverter::ProcessVideoFrame,
- mLastFrameQueuedForProcessing)));
+ MOZ_ALWAYS_SUCCEEDS(mTaskQueue->Dispatch(NewRunnableMethod<FrameToProcess>(
+ "VideoFrameConverter::ProcessVideoFrame", this,
+ &VideoFrameConverter::ProcessVideoFrame,
+ mLastFrameQueuedForProcessing)));
}
void ProcessVideoFrame(const FrameToProcess& aFrame) {
@@ -364,7 +363,9 @@ class VideoFrameConverter {
aFrame.mImage->AsPlanarYCbCrImage();
if (image) {
dom::ImageUtils utils(image);
- if (utils.GetFormat() == dom::ImageBitmapFormat::YUV420P &&
+ Maybe<dom::ImageBitmapFormat> format = utils.GetFormat();
+ if (format.isSome() &&
+ format.value() == dom::ImageBitmapFormat::YUV420P &&
image->GetData()) {
const layers::PlanarYCbCrData* data = image->GetData();
rtc::scoped_refptr<webrtc::I420BufferInterface> video_frame_buffer =