haikuwebkit/LayoutTests/media/video-orientation-expected.txt

36 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

[GStreamer] video orientation support https://bugs.webkit.org/show_bug.cgi?id=148524 Patch by Miguel Gomez <magomez@igalia.com> on 2016-06-21 Reviewed by Philippe Normand. Source/WebCore: Rotate video frames to follow the orientation metadata in the video file. When accelerated compositing is disabled, the rotation is performed by a videoflip element added to the playbin. When accelerated compositing is enabled, the rotation is peformed by the TextureMapper in response to a rotation flag set on the frame buffers. Test: media/video-orientation.html * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle the GST_MESSAGE_TAG message from the bin. (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add the videflip element to the bin when accelerated compositing is disabled. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::GstVideoFrameHolder::GstVideoFrameHolder): Receive and use extra flags for the TextureMapper. (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): When using accelerated compositing, transpose the video size if the rotation is 90 or 270 degrees. (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor): Add rotation flag to frame holder and layer buffer. (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): Use rotation flag when requesting the TextureMapper to draw. (WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceRotation): Function to store the video rotation. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Add bits to store the video rotation. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawTexturedQuadWithProgram): Modify the patternTransform according to the rotation flag passed. * platform/graphics/texmap/TextureMapperGL.h: Add new flags to handle the video souce rotation. * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): Change the drawTexture method used so custom flags can be passed. * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: (WebCore::TextureMapperPlatformLayerBuffer::setExtraFlags): New method to set TextureMapper flags. LayoutTests: Test whether the video is properly being displayed by checking the video element size. * media/content/no-rotation.mp4: Added. * media/content/rotation-180.mp4: Added. * media/content/rotation-270.mp4: Added. * media/content/rotation-90.mp4: Added. * media/video-orientation-expected.txt: Added. * media/video-orientation.html: Added. Canonical link: https://commits.webkit.org/177039@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-06-21 08:32:06 +00:00
Test size before movie is open:
EXPECTED (video.videoWidth == '0') OK
EXPECTED (video.videoHeight == '0') OK
Loading "content/no-rotation.mp4". Movie video with no rotation tag set, size 352x288.
EVENT(loadstart)
EVENT(durationchange)
EVENT(loadedmetadata)
EXPECTED (video.videoWidth == '352') OK
EXPECTED (video.videoHeight == '288') OK
Loading "content/rotation-90.mp4". Movie video with rotation-90 tag set, size 352x288.
EVENT(loadstart)
EVENT(durationchange)
EVENT(loadedmetadata)
EXPECTED (video.videoWidth == '288') OK
EXPECTED (video.videoHeight == '352') OK
Loading "content/rotation-180.mp4". Movie video with rotation-180 tag set, size 352x288.
EVENT(loadstart)
EVENT(durationchange)
EVENT(loadedmetadata)
EXPECTED (video.videoWidth == '352') OK
EXPECTED (video.videoHeight == '288') OK
Loading "content/rotation-270.mp4". Movie video with rotation-270 tag set, size 352x288.
EVENT(loadstart)
EVENT(durationchange)
EVENT(loadedmetadata)
EXPECTED (video.videoWidth == '288') OK
EXPECTED (video.videoHeight == '352') OK
END OF TEST