Bug 1885061 - Fix building AppleVTDecoder.cpp for iOS. r=media-playback-reviewers,gfx-reviewers,jrmuizel,padenot

and re-enable AppleMedia on iOS.

Differential Revision: https://phabricator.services.mozilla.com/D204455
This commit is contained in:
Mike Hommey 2024-03-15 01:34:23 +00:00
parent c70ca80cfd
commit aeca3a63a3
4 changed files with 3 additions and 12 deletions

View File

@ -7,7 +7,7 @@
#include "AppleVTDecoder.h"
#include <CoreVideo/CVPixelBufferIOSurface.h>
#include <IOSurface/IOSurface.h>
#include <IOSurface/IOSurfaceRef.h>
#include <limits>
#include "AppleDecoderModule.h"
@ -486,7 +486,6 @@ void AppleVTDecoder::OutputFrame(CVPixelBufferRef aImage,
// Unlock the returned image data.
CVPixelBufferUnlockBaseAddress(aImage, kCVPixelBufferLock_ReadOnly);
} else {
#ifndef MOZ_WIDGET_UIKIT
// Set pixel buffer properties on aImage before we extract its surface.
// This ensures that we can use defined enums to set values instead
// of later setting magic CFSTR values on the surface itself.
@ -535,9 +534,6 @@ void AppleVTDecoder::OutputFrame(CVPixelBufferRef aImage,
info.mDisplay, aFrameRef.byte_offset, aFrameRef.composition_timestamp,
aFrameRef.duration, image.forget(), aFrameRef.is_sync_point,
aFrameRef.decode_timestamp);
#else
MOZ_ASSERT_UNREACHABLE("No MacIOSurface on iOS");
#endif
}
if (!data) {
@ -719,7 +715,6 @@ CFDictionaryRef AppleVTDecoder::CreateOutputConfiguration() {
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}
#ifndef MOZ_WIDGET_UIKIT
// Output format type:
bool is10Bit = (gfx::BitDepthForColorDepth(mColorDepth) == 10);
@ -754,9 +749,6 @@ CFDictionaryRef AppleVTDecoder::CreateOutputConfiguration() {
return CFDictionaryCreate(
kCFAllocatorDefault, outputKeys, outputValues, ArrayLength(outputKeys),
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
#else
MOZ_ASSERT_UNREACHABLE("No MacIOSurface on iOS");
#endif
}
} // namespace mozilla

View File

@ -458,7 +458,7 @@ DEFINES["GOOGLE_PROTOBUF_NO_RTTI"] = True
DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True
DEFINES["MOZ_APP_VERSION"] = CONFIG["MOZ_APP_VERSION"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "uikit"):
SOURCES += [
"opengl/MacIOSurfaceTextureClientOGL.cpp",
"opengl/MacIOSurfaceTextureHostOGL.cpp",

View File

@ -10,7 +10,6 @@
#include "mozilla/webrender/RenderMacIOSurfaceTextureHost.h"
#include "mozilla/webrender/RenderThread.h"
#include "mozilla/webrender/WebRenderAPI.h"
#include "GLContextCGL.h"
namespace mozilla {
namespace layers {

View File

@ -686,7 +686,7 @@ set_define("MOZ_HAVE_FREETYPE2", depends_if(freetype2_info)(lambda _: True))
# ==============================================================
@depends(toolkit)
def applemedia(toolkit):
if toolkit == "cocoa":
if toolkit in ("cocoa", "uikit"):
return True