RESOLVED FIXED 132247
[GStreamer] Use GstMetaVideo
https://bugs.webkit.org/show_bug.cgi?id=132247
Summary [GStreamer] Use GstMetaVideo
Víctor M. Jáquez L.
Reported 2014-04-28 03:19:14 PDT
In WebKitVideoSink we announce the usage of GstMetaVideo, but we do not use it when handling the video frames. This might break some decoders and filters that rely on buffer's meta, rather that static caps structures. This patch will enable the use of GstMetaVideo if it is available in the buffer.
Attachments
Patch (10.37 KB, patch)
2014-04-28 03:32 PDT, Víctor M. Jáquez L.
no flags
Patch (14.39 KB, patch)
2014-04-30 06:48 PDT, Víctor M. Jáquez L.
no flags
Patch (14.60 KB, patch)
2014-04-30 10:37 PDT, Víctor M. Jáquez L.
no flags
Patch (14.76 KB, patch)
2014-04-30 10:49 PDT, Víctor M. Jáquez L.
no flags
WebKitGTK+-2.2.x backport (16.32 KB, patch)
2014-05-05 06:18 PDT, Víctor M. Jáquez L.
no flags
Víctor M. Jáquez L.
Comment 1 2014-04-28 03:32:30 PDT
Nicolas Dufresne
Comment 2 2014-04-28 06:52:25 PDT
Well, this is not quite right. I would strongly recommend using the GstVideoFrame API, gst_video_frame_map()/gst_video_frame_unmap(). This way you don't have to worry how to map a buffer base on whether or not it has GstVideoMeta.
Philippe Normand
Comment 3 2014-04-28 06:57:25 PDT
Oh yes that would be much better indeed. Care to update the patch Victor?
Víctor M. Jáquez L.
Comment 4 2014-04-28 07:04:35 PDT
(In reply to comment #3) > Oh yes that would be much better indeed. Care to update the patch Victor? Sure.
Víctor M. Jáquez L.
Comment 5 2014-04-30 06:48:45 PDT
Philippe Normand
Comment 6 2014-04-30 08:11:13 PDT
Comment on attachment 230476 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=230476&action=review > Source/WebCore/ChangeLog:19 > + Also, since either EFL and GTK+ ports use version of glib greater than > + 2.31, the guards for it were removed. This is quite unrelated, I'd rather do this in a separate patch, also cleaning the similar ones in MediaPlayerPrivateGStreamerBase.cpp
Nicolas Dufresne
Comment 7 2014-04-30 08:22:48 PDT
> + GstVideoInfo videoInfo; > + if (!gst_video_info_from_caps(&videoInfo, caps)) > + return; You should ideally call gst_video_info_init(&videoInfo), since info_from_caps() will only set what it finds in the caps, leaving random value in C, and non-default in C++. Will help if you run some memory checker. (found 2 times) > + int stride = GST_VIDEO_FRAME_PLANE_STRIDE(&m_videoFrame, 0); Not sure if you guys uses these, but an assert that there is only 1 plane would be a nice to have. So if a dev wants to add planar formats support, it won't endup doing weird things silently. These are details, looks good, nice work !
Víctor M. Jáquez L.
Comment 8 2014-04-30 10:37:26 PDT
Víctor M. Jáquez L.
Comment 9 2014-04-30 10:49:29 PDT
Philippe Normand
Comment 10 2014-04-30 11:41:41 PDT
Comment on attachment 230493 [details] Patch Ok! Thanks to both Nicolas and Victor :)
WebKit Commit Bot
Comment 11 2014-04-30 16:18:08 PDT
Comment on attachment 230493 [details] Patch Clearing flags on attachment: 230493 Committed r168060: <http://trac.webkit.org/changeset/168060>
WebKit Commit Bot
Comment 12 2014-04-30 16:18:13 PDT
All reviewed patches have been landed. Closing bug.
Víctor M. Jáquez L.
Comment 13 2014-05-05 06:18:32 PDT
Created attachment 230823 [details] WebKitGTK+-2.2.x backport
Note You need to log in before you can comment on or make changes to this bug.