summaryrefslogtreecommitdiff
path: root/www/webkit2-gtk3/files/patch-revert-11ccaf183fad
blob: 23ad25609a5bea12b54c7a6525ca4f8c22c71649 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
Regressed by: https://github.com/WebKit/WebKit/commit/11ccaf183fad

GStreamer.cpp.o -c /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/p
latform/graphics/gstreamer/MediaSampleGStreamer.cpp
/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/platform/graphics/gs
treamer/MediaSampleGStreamer.cpp:220:12: error: call to implicitly-deleted copy constructor o
f 'WebCore::PlatformSample'
    return sample;
           ^~~~~~
/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/platform/MediaSample
.h:57:7: note: copy constructor of 'PlatformSample' is implicitly deleted because field 'samp
le' has a deleted copy constructor
    } sample;
      ^
/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/platform/MediaSample
.h:56:66: note: copy constructor of '' is implicitly deleted because variant field 'byteRange
Sample' has a non-trivial copy constructor
        std::pair<MTPluginByteSourceRef, CMFormatDescriptionRef> byteRangeSample;
                                                                 ^
1 error generated.

diff --git Source/WTF/wtf/PlatformHave.h Source/WTF/wtf/PlatformHave.h
index 4c5f1d2..e61e7fc 100644
--- Source/WTF/wtf/PlatformHave.h
+++ Source/WTF/wtf/PlatformHave.h
@@ -909,6 +909,12 @@
 #endif
 #endif
 
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
+#if !defined(HAVE_MT_PLUGIN_SAMPLE_CURSOR_PLAYABLE_HORIZON)
+#define HAVE_MT_PLUGIN_SAMPLE_CURSOR_PLAYABLE_HORIZON 1
+#endif
+#endif
+
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110200) \
     || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140400)
 #define HAVE_AVCONTENTKEYREQUEST_PENDING_PROTECTION_STATUS 1
diff --git Source/WebCore/page/RuntimeEnabledFeatures.h Source/WebCore/page/RuntimeEnabledFeatures.h
index c97386f..6bb9794 100644
--- Source/WebCore/page/RuntimeEnabledFeatures.h
+++ Source/WebCore/page/RuntimeEnabledFeatures.h
@@ -243,6 +243,11 @@ public:
     void setDisableMediaExperiencePIDInheritance(bool isDisabled) { m_disableMediaExperiencePIDInheritance = isDisabled; }
     bool disableMediaExperiencePIDInheritance() const { return m_disableMediaExperiencePIDInheritance; }
 #endif
+    
+#if HAVE(MT_PLUGIN_FORMAT_READER)
+    void setWebMFormatReaderEnabled(bool isEnabled) { m_webMFormatReaderEnabled = isEnabled; }
+    bool webMFormatReaderEnabled() const { return m_webMFormatReaderEnabled; }
+#endif
 
 #if ENABLE(VORBIS)
     WEBCORE_EXPORT void setVorbisDecoderEnabled(bool isEnabled);
@@ -375,6 +380,10 @@ private:
     bool m_webMFormatReaderEnabled { false };
 #endif
 
+#if HAVE(MT_PLUGIN_FORMAT_READER)
+    bool m_webMFormatReaderEnabled { false };
+#endif
+
 #if ENABLE(MEDIA_SOURCE)
     bool m_webMParserEnabled { false };
     bool m_webMWebAudioEnabled { false };
diff --git Source/WebCore/platform/MediaSample.h Source/WebCore/platform/MediaSample.h
index 0847b97..d34ba7f 100644
--- Source/WebCore/platform/MediaSample.h
+++ Source/WebCore/platform/MediaSample.h
@@ -34,8 +34,6 @@
 
 typedef struct opaqueCMSampleBuffer *CMSampleBufferRef;
 typedef struct _GstSample GstSample;
-typedef struct OpaqueMTPluginByteSource *MTPluginByteSourceRef;
-typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef;
 
 namespace WebCore {
 
@@ -47,13 +45,11 @@ struct PlatformSample {
         MockSampleBoxType,
         CMSampleBufferType,
         GStreamerSampleType,
-        ByteRangeSampleType,
     } type;
     union {
         MockSampleBox* mockSampleBox;
         CMSampleBufferRef cmSampleBuffer;
         GstSample* gstSample;
-        std::pair<MTPluginByteSourceRef, CMFormatDescriptionRef> byteRangeSample;
     } sample;
 };
 
@@ -91,12 +87,6 @@ public:
     virtual SampleFlags flags() const = 0;
     virtual PlatformSample platformSample() = 0;
 
-    struct ByteRange {
-        size_t byteOffset { 0 };
-        size_t byteLength { 0 };
-    };
-    virtual std::optional<ByteRange> byteRange() const = 0;
-
     enum class VideoRotation {
         None = 0,
         UpsideDown = 180,
diff --git Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h
index d7a49b9..874c3dc 100644
--- Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h
+++ Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h
@@ -57,7 +57,6 @@ public:
     Ref<MediaSample> createNonDisplayingCopy() const override;
     SampleFlags flags() const override { return m_flags; }
     PlatformSample platformSample() override;
-    std::optional<ByteRange> byteRange() const override { return std::nullopt; }
     void dump(PrintStream&) const override;
     RefPtr<JSC::Uint8ClampedArray> getRGBAImageData() const final;
 
diff --git Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp
index 5cb60b9..83da5b0 100644
--- Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp
+++ Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp
@@ -62,7 +62,6 @@ private:
     size_t sizeInBytes() const override { return sizeof(m_box); }
     SampleFlags flags() const override;
     PlatformSample platformSample() override;
-    std::optional<ByteRange> byteRange() const override { return std::nullopt; }
     FloatSize presentationSize() const override { return FloatSize(); }
     void dump(PrintStream&) const override;
     void offsetTimestampsBy(const MediaTime& offset) override { m_box.offsetTimestampsBy(offset); }
diff --git Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp
index 496e42a..43664ed 100644
--- Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp
+++ Source/WebKit/MediaFormatReaderPlugIn/MediaFormatReaderPlugIn.cpp
@@ -23,14 +23,15 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <WebKit/WKMediaFormatReader.h>
+#include "config.h"
 
-extern "C" WK_EXPORT OSStatus CreateMediaFormatReaderInstance(MTPluginByteSourceRef, CFAllocatorRef, CFDictionaryRef, MTPluginFormatReaderRef*);
+#if HAVE(MT_PLUGIN_FORMAT_READER)
 
-OSStatus CreateMediaFormatReaderInstance(MTPluginByteSourceRef byteSource, CFAllocatorRef allocator, CFDictionaryRef, MTPluginFormatReaderRef* formatReader)
+OSStatus CreateMediaFormatReaderInstance(MTPluginByteSourceRef, CFAllocatorRef, CFDictionary
+Ref, MTPluginFormatReaderRef* formatReader)
 {
-    OSStatus status = WKMediaFormatReaderCreate(allocator, formatReader);
-    if (status != noErr)
-        return status;
-    return WKMediaFormatReaderStartOnMainThread(*formatReader, byteSource);
+	*formatReader = nullptr;
+	return kMTPluginFormatReaderError_InternalFailure;
 }
+
+#endif // HAVE(MT_PLUGIN_FORMAT_READER)
diff --git Source/WebKit/Shared/WebPreferencesDefaultValues.cpp Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
index 8b24061..83e3a04 100644
--- Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
+++ Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
@@ -289,6 +289,19 @@ bool defaultWebMFormatReaderEnabled()
 
 #endif // ENABLE(WEBM_FORMAT_READER)
 
+#if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
+
+bool defaultWebMFormatReaderEnabled()
+{
+#if HAVE(SYSTEM_FEATURE_FLAGS)
+    return isFeatureFlagEnabled("webm_format_reader");
+#endif
+
+    return false;
+}
+
+#endif
+
 #if ENABLE(VP9)
 
 bool defaultVP8DecoderEnabled()
diff --git Source/WebKit/Shared/WebPreferencesDefaultValues.h Source/WebKit/Shared/WebPreferencesDefaultValues.h
index c7af0cb..c1c91ed 100644
--- Source/WebKit/Shared/WebPreferencesDefaultValues.h
+++ Source/WebKit/Shared/WebPreferencesDefaultValues.h
@@ -95,6 +95,10 @@ bool defaultWebXREnabled();
 bool defaultWebMFormatReaderEnabled();
 #endif
 
+#if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
+bool defaultWebMFormatReaderEnabled();
+#endif
+
 #if ENABLE(VP9)
 bool defaultVP8DecoderEnabled();
 bool defaultVP9DecoderEnabled();
diff --git Source/WebKit/SourcesCocoa.txt Source/WebKit/SourcesCocoa.txt
index 78fb424..ac04aa8 100644
--- Source/WebKit/SourcesCocoa.txt
+++ Source/WebKit/SourcesCocoa.txt
@@ -229,6 +229,11 @@ Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp
 Shared/mac/MediaFormatReader/MediaSampleCursor.cpp
 Shared/mac/MediaFormatReader/MediaTrackReader.cpp
 
+Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp
+Shared/mac/MediaFormatReader/FormatReader.cpp
+Shared/mac/MediaFormatReader/SampleCursor.cpp
+Shared/mac/MediaFormatReader/TrackReader.cpp
+
 Shared/Plugins/mac/PluginSandboxProfile.mm
 
 Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm