haikuwebkit/ManualTests/wpe/video-player-holepunch-gstr...

34 lines
891 B
HTML
Raw Permalink Normal View History

[WPE] Implement GStreamer based holepunch https://bugs.webkit.org/show_bug.cgi?id=193715 Reviewed by Xabier Rodriguez-Calvar. .: Add GSTREAMER_HOLEPUNCH option to the WPE port with a manual test to check the feature. * ManualTests/wpe/video-player-holepunch.html: Added. * Source/cmake/OptionsWPE.cmake: Source/WebCore: Implement GStreamer based holepunch functionality. Instead of getting the video frames from the video sink and drawing then, the player just draws a transparent rectangle on the position where the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video sink which will be in charge of displaying the video frames in some way (usually on a plane below the browser), and will push empty frames to the compositor indicating that the rectangle to draw should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used to tell the video sink where to position the video so it's set below the browser transparent hole. Added ManualTest wpe/video-player-holepunch.html to test the feature. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::shouldIgnoreIntrinsicSize): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const): (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded): (WebCore::setRectangleToVideoSink): (WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient): (WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawSolidColor): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintSelf): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: (WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::videoBox const): Source/WebKit: Add a new parameter to the calls of TextureMapper::drawSolidColor(). * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): Canonical link: https://commits.webkit.org/208810@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-07 14:42:32 +00:00
<html>
<head>
[WPE] Add support for holepunch using an external video player https://bugs.webkit.org/show_bug.cgi?id=194899 Reviewed by Xabier Rodriguez-Calvar. .: Add EXTERNAL_HOLEPUNCH option to the WPE port. Add a manual test to check the feature. Rename and update the test for GStreamer holepunch to avoid confusion. * ManualTests/wpe/video-player-holepunch-external.html: Added. * ManualTests/wpe/video-player-holepunch-gstreamer.html: Renamed from ManualTests/wpe/video-player-holepunch.html. * Source/cmake/OptionsWPE.cmake: Source/WebCore: Implement the holepunch feature to allow playback using an external player. This creates a new dummy MediaPlayerPrivateHolePunch that accepts only the type "video/holepunch", and whose goal is to just draw a transparent rectangle in the position where the video should be. This can be used to allow a player placed on a lower plane than the browser to become visible. Added ManualTest wpe/video-player-holepunch-external.html to test the feature. * PlatformWPE.cmake: * platform/HolePunch.cmake: Added. * platform/graphics/MediaPlayer.cpp: (WebCore::buildMediaEnginesVector): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: Added. (WebCore::MediaPlayerPrivateHolePunch::MediaPlayerPrivateHolePunch): (WebCore::MediaPlayerPrivateHolePunch::~MediaPlayerPrivateHolePunch): (WebCore::MediaPlayerPrivateHolePunch::platformLayer const): (WebCore::MediaPlayerPrivateHolePunch::naturalSize const): (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateHolePunch::swapBuffersIfNeeded): (WebCore::MediaPlayerPrivateHolePunch::proxy const): (WebCore::mimeTypeCache): (WebCore::MediaPlayerPrivateHolePunch::getSupportedTypes): (WebCore::MediaPlayerPrivateHolePunch::supportsType): (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine): (WebCore::MediaPlayerPrivateHolePunch::notifyReadyState): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: Added. * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): Canonical link: https://commits.webkit.org/209357@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-25 09:20:01 +00:00
<title>WPE GStreamer holepunch test</title>
[WPE] Implement GStreamer based holepunch https://bugs.webkit.org/show_bug.cgi?id=193715 Reviewed by Xabier Rodriguez-Calvar. .: Add GSTREAMER_HOLEPUNCH option to the WPE port with a manual test to check the feature. * ManualTests/wpe/video-player-holepunch.html: Added. * Source/cmake/OptionsWPE.cmake: Source/WebCore: Implement GStreamer based holepunch functionality. Instead of getting the video frames from the video sink and drawing then, the player just draws a transparent rectangle on the position where the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video sink which will be in charge of displaying the video frames in some way (usually on a plane below the browser), and will push empty frames to the compositor indicating that the rectangle to draw should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used to tell the video sink where to position the video so it's set below the browser transparent hole. Added ManualTest wpe/video-player-holepunch.html to test the feature. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::shouldIgnoreIntrinsicSize): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const): (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded): (WebCore::setRectangleToVideoSink): (WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient): (WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawSolidColor): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintSelf): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: (WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::videoBox const): Source/WebKit: Add a new parameter to the calls of TextureMapper::drawSolidColor(). * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): Canonical link: https://commits.webkit.org/208810@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-07 14:42:32 +00:00
<style>
video {
width: 400px;
height: 400px;
}
</style>
</head>
<body>
<p>
[WPE] Add support for holepunch using an external video player https://bugs.webkit.org/show_bug.cgi?id=194899 Reviewed by Xabier Rodriguez-Calvar. .: Add EXTERNAL_HOLEPUNCH option to the WPE port. Add a manual test to check the feature. Rename and update the test for GStreamer holepunch to avoid confusion. * ManualTests/wpe/video-player-holepunch-external.html: Added. * ManualTests/wpe/video-player-holepunch-gstreamer.html: Renamed from ManualTests/wpe/video-player-holepunch.html. * Source/cmake/OptionsWPE.cmake: Source/WebCore: Implement the holepunch feature to allow playback using an external player. This creates a new dummy MediaPlayerPrivateHolePunch that accepts only the type "video/holepunch", and whose goal is to just draw a transparent rectangle in the position where the video should be. This can be used to allow a player placed on a lower plane than the browser to become visible. Added ManualTest wpe/video-player-holepunch-external.html to test the feature. * PlatformWPE.cmake: * platform/HolePunch.cmake: Added. * platform/graphics/MediaPlayer.cpp: (WebCore::buildMediaEnginesVector): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: Added. (WebCore::MediaPlayerPrivateHolePunch::MediaPlayerPrivateHolePunch): (WebCore::MediaPlayerPrivateHolePunch::~MediaPlayerPrivateHolePunch): (WebCore::MediaPlayerPrivateHolePunch::platformLayer const): (WebCore::MediaPlayerPrivateHolePunch::naturalSize const): (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateHolePunch::swapBuffersIfNeeded): (WebCore::MediaPlayerPrivateHolePunch::proxy const): (WebCore::mimeTypeCache): (WebCore::MediaPlayerPrivateHolePunch::getSupportedTypes): (WebCore::MediaPlayerPrivateHolePunch::supportsType): (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine): (WebCore::MediaPlayerPrivateHolePunch::notifyReadyState): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: Added. * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): Canonical link: https://commits.webkit.org/209357@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-25 09:20:01 +00:00
<strong>WPE GStreamer holepunch test</strong>
[WPE] Implement GStreamer based holepunch https://bugs.webkit.org/show_bug.cgi?id=193715 Reviewed by Xabier Rodriguez-Calvar. .: Add GSTREAMER_HOLEPUNCH option to the WPE port with a manual test to check the feature. * ManualTests/wpe/video-player-holepunch.html: Added. * Source/cmake/OptionsWPE.cmake: Source/WebCore: Implement GStreamer based holepunch functionality. Instead of getting the video frames from the video sink and drawing then, the player just draws a transparent rectangle on the position where the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video sink which will be in charge of displaying the video frames in some way (usually on a plane below the browser), and will push empty frames to the compositor indicating that the rectangle to draw should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used to tell the video sink where to position the video so it's set below the browser transparent hole. Added ManualTest wpe/video-player-holepunch.html to test the feature. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::shouldIgnoreIntrinsicSize): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const): (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded): (WebCore::setRectangleToVideoSink): (WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient): (WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawSolidColor): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintSelf): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: (WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::videoBox const): Source/WebKit: Add a new parameter to the calls of TextureMapper::drawSolidColor(). * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): Canonical link: https://commits.webkit.org/208810@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-07 14:42:32 +00:00
</p>
<p>
[WPE] Add support for holepunch using an external video player https://bugs.webkit.org/show_bug.cgi?id=194899 Reviewed by Xabier Rodriguez-Calvar. .: Add EXTERNAL_HOLEPUNCH option to the WPE port. Add a manual test to check the feature. Rename and update the test for GStreamer holepunch to avoid confusion. * ManualTests/wpe/video-player-holepunch-external.html: Added. * ManualTests/wpe/video-player-holepunch-gstreamer.html: Renamed from ManualTests/wpe/video-player-holepunch.html. * Source/cmake/OptionsWPE.cmake: Source/WebCore: Implement the holepunch feature to allow playback using an external player. This creates a new dummy MediaPlayerPrivateHolePunch that accepts only the type "video/holepunch", and whose goal is to just draw a transparent rectangle in the position where the video should be. This can be used to allow a player placed on a lower plane than the browser to become visible. Added ManualTest wpe/video-player-holepunch-external.html to test the feature. * PlatformWPE.cmake: * platform/HolePunch.cmake: Added. * platform/graphics/MediaPlayer.cpp: (WebCore::buildMediaEnginesVector): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: Added. (WebCore::MediaPlayerPrivateHolePunch::MediaPlayerPrivateHolePunch): (WebCore::MediaPlayerPrivateHolePunch::~MediaPlayerPrivateHolePunch): (WebCore::MediaPlayerPrivateHolePunch::platformLayer const): (WebCore::MediaPlayerPrivateHolePunch::naturalSize const): (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateHolePunch::swapBuffersIfNeeded): (WebCore::MediaPlayerPrivateHolePunch::proxy const): (WebCore::mimeTypeCache): (WebCore::MediaPlayerPrivateHolePunch::getSupportedTypes): (WebCore::MediaPlayerPrivateHolePunch::supportsType): (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine): (WebCore::MediaPlayerPrivateHolePunch::notifyReadyState): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: Added. * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): Canonical link: https://commits.webkit.org/209357@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-25 09:20:01 +00:00
This test checks whether the GStreamer holepunch feature is working on WPE.
[WPE] Implement GStreamer based holepunch https://bugs.webkit.org/show_bug.cgi?id=193715 Reviewed by Xabier Rodriguez-Calvar. .: Add GSTREAMER_HOLEPUNCH option to the WPE port with a manual test to check the feature. * ManualTests/wpe/video-player-holepunch.html: Added. * Source/cmake/OptionsWPE.cmake: Source/WebCore: Implement GStreamer based holepunch functionality. Instead of getting the video frames from the video sink and drawing then, the player just draws a transparent rectangle on the position where the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video sink which will be in charge of displaying the video frames in some way (usually on a plane below the browser), and will push empty frames to the compositor indicating that the rectangle to draw should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used to tell the video sink where to position the video so it's set below the browser transparent hole. Added ManualTest wpe/video-player-holepunch.html to test the feature. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::shouldIgnoreIntrinsicSize): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const): (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded): (WebCore::setRectangleToVideoSink): (WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient): (WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawSolidColor): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintSelf): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: (WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::videoBox const): Source/WebKit: Add a new parameter to the calls of TextureMapper::drawSolidColor(). * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): Canonical link: https://commits.webkit.org/208810@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-07 14:42:32 +00:00
</p>
<p>
There is a video player of 400x400 placed below this text. If the video playback is visible,
then the holepunch option is disabled or it's not working properly.
</p>
<p>
If everything is working fine, there should be a transparent rectangle of 400x400 just
below this.
</p>
<video id="video"></video>
<script type="text/javascript">
var v = document.getElementById("video");
v.src = "../../LayoutTests/media/content/long-test.mp4";
v.play();
</script>
</body>
</html>