Diff
Modified: trunk/Source/WebCore/ChangeLog (257478 => 257479)
--- trunk/Source/WebCore/ChangeLog 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebCore/ChangeLog 2020-02-26 17:53:06 UTC (rev 257479)
@@ -1,3 +1,16 @@
+2020-02-26 Jacob Uphoff <[email protected]>
+
+ Unreviewed, rolling out r257470.
+
+ This broke the build for tvOS and watchOS
+
+ Reverted changeset:
+
+ "Conversion between MediaSample and RemoteVideoSample should
+ preserve the rotation information"
+ https://bugs.webkit.org/show_bug.cgi?id=208240
+ https://trac.webkit.org/changeset/257470
+
2020-02-26 Adrian Perez de Castro <[email protected]>
Unreviewed build fix for non-unified builds with assertions enabled.
Modified: trunk/Source/WebCore/platform/graphics/RemoteVideoSample.cpp (257478 => 257479)
--- trunk/Source/WebCore/platform/graphics/RemoteVideoSample.cpp 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebCore/platform/graphics/RemoteVideoSample.cpp 2020-02-26 17:53:06 UTC (rev 257479)
@@ -141,10 +141,10 @@
{
}
-IOSurfaceRef RemoteVideoSample::surface() const
+IOSurfaceRef RemoteVideoSample::surface()
{
if (!m_ioSurface && m_sendRight)
- const_cast<RemoteVideoSample*>(this)->m_ioSurface = WebCore::IOSurface::createFromSendRight(WTFMove(const_cast<RemoteVideoSample*>(this)->m_sendRight), sRGBColorSpaceRef());
+ m_ioSurface = WebCore::IOSurface::createFromSendRight(WTFMove(m_sendRight), sRGBColorSpaceRef());
return m_ioSurface ? m_ioSurface->surface() : nullptr;
}
Modified: trunk/Source/WebCore/platform/graphics/RemoteVideoSample.h (257478 => 257479)
--- trunk/Source/WebCore/platform/graphics/RemoteVideoSample.h 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebCore/platform/graphics/RemoteVideoSample.h 2020-02-26 17:53:06 UTC (rev 257479)
@@ -50,7 +50,7 @@
#if HAVE(IOSURFACE)
WEBCORE_EXPORT static std::unique_ptr<RemoteVideoSample> create(MediaSample&);
WEBCORE_EXPORT static std::unique_ptr<RemoteVideoSample> create(CVPixelBufferRef, MediaTime&& presentationTime, MediaSample::VideoRotation = MediaSample::VideoRotation::None);
- WEBCORE_EXPORT IOSurfaceRef surface() const;
+ WEBCORE_EXPORT IOSurfaceRef surface();
#endif
const MediaTime& time() const { return m_time; }
@@ -57,7 +57,6 @@
uint32_t videoFormat() const { return m_videoFormat; }
IntSize size() const { return m_size; }
MediaSample::VideoRotation rotation() const { return m_rotation; }
- bool mirrored() const { return m_mirrored; }
template<class Encoder> void encode(Encoder& encoder) const
{
Modified: trunk/Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.h (257478 => 257479)
--- trunk/Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.h 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.h 2020-02-26 17:53:06 UTC (rev 257479)
@@ -40,8 +40,6 @@
namespace WebCore {
-class RemoteVideoSample;
-
class ImageTransferSessionVT {
public:
static std::unique_ptr<ImageTransferSessionVT> create(uint32_t pixelFormat)
@@ -55,7 +53,6 @@
#if HAVE(IOSURFACE) && !PLATFORM(MACCATALYST)
WEBCORE_EXPORT RefPtr<MediaSample> createMediaSample(IOSurfaceRef, const MediaTime&, const IntSize&, MediaSample::VideoRotation = MediaSample::VideoRotation::None, bool mirrored = false);
- WEBCORE_EXPORT RefPtr<MediaSample> createMediaSample(const RemoteVideoSample&);
#endif
#if HAVE(IOSURFACE) && !PLATFORM(MACCATALYST)
Modified: trunk/Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm (257478 => 257479)
--- trunk/Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm 2020-02-26 17:53:06 UTC (rev 257479)
@@ -31,7 +31,6 @@
#import "GraphicsContextCG.h"
#import "Logging.h"
#import "MediaSampleAVFObjC.h"
-#import "RemoteVideoSample.h"
#import <CoreMedia/CMFormatDescription.h>
#import <CoreMedia/CMSampleBuffer.h>
@@ -368,11 +367,6 @@
}
#if HAVE(IOSURFACE) && !PLATFORM(MACCATALYST)
-RefPtr<MediaSample> ImageTransferSessionVT::createMediaSample(const RemoteVideoSample& remoteSample)
-{
- return createMediaSample(remoteSample.surface(), remoteSample.time(), remoteSample.size(), remoteSample.rotation(), remoteSample.mirrored());
-}
-
RefPtr<MediaSample> ImageTransferSessionVT::createMediaSample(IOSurfaceRef surface, const MediaTime& sampleTime, const IntSize& size, MediaSample::VideoRotation rotation, bool mirrored)
{
auto sampleBuffer = createCMSampleBuffer(surface, sampleTime, size);
Modified: trunk/Source/WebKit/ChangeLog (257478 => 257479)
--- trunk/Source/WebKit/ChangeLog 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebKit/ChangeLog 2020-02-26 17:53:06 UTC (rev 257479)
@@ -1,3 +1,16 @@
+2020-02-26 Jacob Uphoff <[email protected]>
+
+ Unreviewed, rolling out r257470.
+
+ This broke the build for tvOS and watchOS
+
+ Reverted changeset:
+
+ "Conversion between MediaSample and RemoteVideoSample should
+ preserve the rotation information"
+ https://bugs.webkit.org/show_bug.cgi?id=208240
+ https://trac.webkit.org/changeset/257470
+
2020-02-26 Youenn Fablet <[email protected]>
GPUProcess should be made aware of device orientation for correct video capture frame rotation computation
Modified: trunk/Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.cpp (257478 => 257479)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.cpp 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.cpp 2020-02-26 17:53:06 UTC (rev 257479)
@@ -111,7 +111,7 @@
return;
}
- auto sampleBuffer = m_imageTransferSession->createMediaSample(remoteSample);
+ auto sampleBuffer = m_imageTransferSession->createMediaSample(remoteSample.surface(), remoteSample.time(), remoteSample.size());
if (!sampleBuffer) {
ASSERT_NOT_REACHED();
return;
Modified: trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp (257478 => 257479)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp 2020-02-26 17:53:06 UTC (rev 257479)
@@ -107,7 +107,7 @@
if (!m_imageTransferSession)
return;
- auto sample = m_imageTransferSession->createMediaSample(remoteSample);
+ auto sample = m_imageTransferSession->createMediaSample(remoteSample.surface(), remoteSample.time(), remoteSample.size());
ASSERT(sample);
if (!sample)
Modified: trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp (257478 => 257479)
--- trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp 2020-02-26 17:15:46 UTC (rev 257478)
+++ trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp 2020-02-26 17:53:06 UTC (rev 257479)
@@ -181,7 +181,7 @@
return;
}
- auto sampleRef = m_imageTransferSession->createMediaSample(remoteSample);
+ auto sampleRef = m_imageTransferSession->createMediaSample(remoteSample.surface(), remoteSample.time(), remoteSample.size());
if (!sampleRef) {
ASSERT_NOT_REACHED();
return;