Added
Link Here
|
1 |
diff --git Source/WTF/wtf/PlatformHave.h Source/WTF/wtf/PlatformHave.h |
2 |
index 4c5f1d2..e61e7fc 100644 |
3 |
--- Source/WTF/wtf/PlatformHave.h |
4 |
+++ Source/WTF/wtf/PlatformHave.h |
5 |
@@ -909,6 +909,12 @@ |
6 |
#endif |
7 |
#endif |
8 |
|
9 |
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300 |
10 |
+#if !defined(HAVE_MT_PLUGIN_SAMPLE_CURSOR_PLAYABLE_HORIZON) |
11 |
+#define HAVE_MT_PLUGIN_SAMPLE_CURSOR_PLAYABLE_HORIZON 1 |
12 |
+#endif |
13 |
+#endif |
14 |
+ |
15 |
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110200) \ |
16 |
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140400) |
17 |
#define HAVE_AVCONTENTKEYREQUEST_PENDING_PROTECTION_STATUS 1 |
18 |
diff --git Source/WebCore/page/RuntimeEnabledFeatures.h Source/WebCore/page/RuntimeEnabledFeatures.h |
19 |
index c97386f..6bb9794 100644 |
20 |
--- Source/WebCore/page/RuntimeEnabledFeatures.h |
21 |
+++ Source/WebCore/page/RuntimeEnabledFeatures.h |
22 |
@@ -243,6 +243,11 @@ public: |
23 |
void setDisableMediaExperiencePIDInheritance(bool isDisabled) { m_disableMediaExperiencePIDInheritance = isDisabled; } |
24 |
bool disableMediaExperiencePIDInheritance() const { return m_disableMediaExperiencePIDInheritance; } |
25 |
#endif |
26 |
+ |
27 |
+#if HAVE(MT_PLUGIN_FORMAT_READER) |
28 |
+ void setWebMFormatReaderEnabled(bool isEnabled) { m_webMFormatReaderEnabled = isEnabled; } |
29 |
+ bool webMFormatReaderEnabled() const { return m_webMFormatReaderEnabled; } |
30 |
+#endif |
31 |
|
32 |
#if ENABLE(VORBIS) |
33 |
WEBCORE_EXPORT void setVorbisDecoderEnabled(bool isEnabled); |
34 |
@@ -375,6 +380,10 @@ private: |
35 |
bool m_webMFormatReaderEnabled { false }; |
36 |
#endif |
37 |
|
38 |
+#if HAVE(MT_PLUGIN_FORMAT_READER) |
39 |
+ bool m_webMFormatReaderEnabled { false }; |
40 |
+#endif |
41 |
+ |
42 |
#if ENABLE(MEDIA_SOURCE) |
43 |
bool m_webMParserEnabled { false }; |
44 |
bool m_webMWebAudioEnabled { false }; |
45 |
diff --git Source/WebCore/platform/MediaSample.h Source/WebCore/platform/MediaSample.h |
46 |
index 0847b97..d34ba7f 100644 |
47 |
--- Source/WebCore/platform/MediaSample.h |
48 |
+++ Source/WebCore/platform/MediaSample.h |
49 |
@@ -34,8 +34,6 @@ |
50 |
|
51 |
typedef struct opaqueCMSampleBuffer *CMSampleBufferRef; |
52 |
typedef struct _GstSample GstSample; |
53 |
-typedef struct OpaqueMTPluginByteSource *MTPluginByteSourceRef; |
54 |
-typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef; |
55 |
|
56 |
namespace WebCore { |
57 |
|
58 |
@@ -47,13 +45,11 @@ struct PlatformSample { |
59 |
MockSampleBoxType, |
60 |
CMSampleBufferType, |
61 |
GStreamerSampleType, |
62 |
- ByteRangeSampleType, |
63 |
} type; |
64 |
union { |
65 |
MockSampleBox* mockSampleBox; |
66 |
CMSampleBufferRef cmSampleBuffer; |
67 |
GstSample* gstSample; |
68 |
- std::pair<MTPluginByteSourceRef, CMFormatDescriptionRef> byteRangeSample; |
69 |
} sample; |
70 |
}; |
71 |
|
72 |
@@ -91,12 +87,6 @@ public: |
73 |
virtual SampleFlags flags() const = 0; |
74 |
virtual PlatformSample platformSample() = 0; |
75 |
|
76 |
- struct ByteRange { |
77 |
- size_t byteOffset { 0 }; |
78 |
- size_t byteLength { 0 }; |
79 |
- }; |
80 |
- virtual std::optional<ByteRange> byteRange() const = 0; |
81 |
- |
82 |
enum class VideoRotation { |
83 |
None = 0, |
84 |
UpsideDown = 180, |
85 |
diff --git Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h |
86 |
index d7a49b9..874c3dc 100644 |
87 |
--- Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h |
88 |
+++ Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h |
89 |
@@ -57,7 +57,6 @@ public: |
90 |
Ref<MediaSample> createNonDisplayingCopy() const override; |
91 |
SampleFlags flags() const override { return m_flags; } |
92 |
PlatformSample platformSample() override; |
93 |
- std::optional<ByteRange> byteRange() const override { return std::nullopt; } |
94 |
void dump(PrintStream&) const override; |
95 |
RefPtr<JSC::Uint8ClampedArray> getRGBAImageData() const final; |
96 |
|
97 |
diff --git Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp |
98 |
index 5cb60b9..83da5b0 100644 |
99 |
--- Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp |
100 |
+++ Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp |
101 |
@@ -62,7 +62,6 @@ private: |
102 |
size_t sizeInBytes() const override { return sizeof(m_box); } |
103 |
SampleFlags flags() const override; |
104 |
PlatformSample platformSample() override; |
105 |
- std::optional<ByteRange> byteRange() const override { return std::nullopt; } |
106 |
FloatSize presentationSize() const override { return FloatSize(); } |
107 |
void dump(PrintStream&) const override; |
108 |
void offsetTimestampsBy(const MediaTime& offset) override { m_box.offsetTimestampsBy(offset); } |
109 |
diff --git Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp |
110 |
index 496e42a..43664ed 100644 |
111 |
--- Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp |
112 |
+++ Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp |
113 |
@@ -23,14 +23,15 @@ |
114 |
* THE POSSIBILITY OF SUCH DAMAGE. |
115 |
*/ |
116 |
|
117 |
-#include <WebKit/WKMediaFormatReader.h> |
118 |
+#include "config.h" |
119 |
|
120 |
-extern "C" WK_EXPORT OSStatus CreateMediaFormatReaderInstance(MTPluginByteSourceRef, CFAllocatorRef, CFDictionaryRef, MTPluginFormatReaderRef*); |
121 |
+#if HAVE(MT_PLUGIN_FORMAT_READER) |
122 |
|
123 |
-OSStatus CreateMediaFormatReaderInstance(MTPluginByteSourceRef byteSource, CFAllocatorRef allocator, CFDictionaryRef, MTPluginFormatReaderRef* formatReader) |
124 |
+OSStatus CreateMediaFormatReaderInstance(MTPluginByteSourceRef, CFAllocatorRef, CFDictionary |
125 |
+Ref, MTPluginFormatReaderRef* formatReader) |
126 |
{ |
127 |
- OSStatus status = WKMediaFormatReaderCreate(allocator, formatReader); |
128 |
- if (status != noErr) |
129 |
- return status; |
130 |
- return WKMediaFormatReaderStartOnMainThread(*formatReader, byteSource); |
131 |
+ *formatReader = nullptr; |
132 |
+ return kMTPluginFormatReaderError_InternalFailure; |
133 |
} |
134 |
+ |
135 |
+#endif // HAVE(MT_PLUGIN_FORMAT_READER) |
136 |
diff --git Source/WebKit/Shared/WebPreferencesDefaultValues.cpp Source/WebKit/Shared/WebPreferencesDefaultValues.cpp |
137 |
index 8b24061..83e3a04 100644 |
138 |
--- Source/WebKit/Shared/WebPreferencesDefaultValues.cpp |
139 |
+++ Source/WebKit/Shared/WebPreferencesDefaultValues.cpp |
140 |
@@ -289,6 +289,19 @@ bool defaultWebMFormatReaderEnabled() |
141 |
|
142 |
#endif // ENABLE(WEBM_FORMAT_READER) |
143 |
|
144 |
+#if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER) |
145 |
+ |
146 |
+bool defaultWebMFormatReaderEnabled() |
147 |
+{ |
148 |
+#if HAVE(SYSTEM_FEATURE_FLAGS) |
149 |
+ return isFeatureFlagEnabled("webm_format_reader"); |
150 |
+#endif |
151 |
+ |
152 |
+ return false; |
153 |
+} |
154 |
+ |
155 |
+#endif |
156 |
+ |
157 |
#if ENABLE(VP9) |
158 |
|
159 |
bool defaultVP8DecoderEnabled() |
160 |
diff --git Source/WebKit/Shared/WebPreferencesDefaultValues.h Source/WebKit/Shared/WebPreferencesDefaultValues.h |
161 |
index c7af0cb..c1c91ed 100644 |
162 |
--- Source/WebKit/Shared/WebPreferencesDefaultValues.h |
163 |
+++ Source/WebKit/Shared/WebPreferencesDefaultValues.h |
164 |
@@ -95,6 +95,10 @@ bool defaultWebXREnabled(); |
165 |
bool defaultWebMFormatReaderEnabled(); |
166 |
#endif |
167 |
|
168 |
+#if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER) |
169 |
+bool defaultWebMFormatReaderEnabled(); |
170 |
+#endif |
171 |
+ |
172 |
#if ENABLE(VP9) |
173 |
bool defaultVP8DecoderEnabled(); |
174 |
bool defaultVP9DecoderEnabled(); |
175 |
diff --git Source/WebKit/SourcesCocoa.txt Source/WebKit/SourcesCocoa.txt |
176 |
index 78fb424..ac04aa8 100644 |
177 |
--- Source/WebKit/SourcesCocoa.txt |
178 |
+++ Source/WebKit/SourcesCocoa.txt |
179 |
@@ -229,6 +229,11 @@ Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp |
180 |
Shared/mac/MediaFormatReader/MediaSampleCursor.cpp |
181 |
Shared/mac/MediaFormatReader/MediaTrackReader.cpp |
182 |
|
183 |
+Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp |
184 |
+Shared/mac/MediaFormatReader/FormatReader.cpp |
185 |
+Shared/mac/MediaFormatReader/SampleCursor.cpp |
186 |
+Shared/mac/MediaFormatReader/TrackReader.cpp |
187 |
+ |
188 |
Shared/Plugins/mac/PluginSandboxProfile.mm |
189 |
|
190 |
Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm |