Right now all the buffers are uploaded onto the the texture, that creates situations where the unpainted buffers are uploaded. This patch changes the logic to upload only the buffers that are going to be shown.
Created attachment 206326 [details] Patch
Comment on attachment 206326 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206326&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:371 > + gst_buffer_map(m_buffer, &srcInfo, GST_MAP_READ); Would it make sense or have any benefit to use gst_video_frame_map/unmap? > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:384 > + return texture; This returns a PassRefPtr now, so this should return texture.release() to transfer the ownership to the caller.
(In reply to comment #2) > (From update of attachment 206326 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=206326&action=review > > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:371 > > + gst_buffer_map(m_buffer, &srcInfo, GST_MAP_READ); > > Would it make sense or have any benefit to use gst_video_frame_map/unmap? > > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:384 > > + return texture; > > This returns a PassRefPtr now, so this should return texture.release() to transfer the ownership to the caller. I'm wrong, the texture is not created here and passed to the caller, but fetched from the pool, so this is correct, sorry.
Comment on attachment 206326 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206326&action=review >>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:371 >>> + gst_buffer_map(m_buffer, &srcInfo, GST_MAP_READ); >> >> Would it make sense or have any benefit to use gst_video_frame_map/unmap? > > I'm wrong, the texture is not created here and passed to the caller, but fetched from the pool, so this is correct, sorry. about using gst_frame_map/unmap, currently it doesn't bring any benefit, since the metadata is extracted from the caps using the method getVideoSizeAndFormatFromCaps(), delaying the map() operation until is truly needed.
Comment on attachment 206326 [details] Patch Clearing flags on attachment: 206326 Committed r152711: <http://trac.webkit.org/changeset/152711>
All reviewed patches have been landed. Closing bug.