GNOME Bugzilla – Bug 712834
video-sink: add gl texture upload meta api support
Last modified: 2013-12-23 11:16:37 UTC
Adding gl texture upload meta api support to clutter-sink (2.0.x release) will allow the use the vaapidecode element in conjunction with clutter-video-sink. For now it depends on the NV12 support of clutter-video-sink (https://bugzilla.gnome.org/show_bug.cgi?id=712832) since vaapidecode always set its caps to this format. The developpement branch can be found here: http://cgit.collabora.com/git/user/mateo/clutter-gst.git/log/?h=wip_vaapi_texture_upload
Created attachment 261257 [details] [review] [PATCH 1/4] video-sink: support video meta api
Created attachment 261258 [details] [review] [PATCH 2/2] add context field to GstClutterSinkRenderer
Created attachment 261259 [details] [review] [PATCH 3/4] video-sink: support gl texture upload meta api
Created attachment 261260 [details] [review] [PATCH 4/4] video-sink: support video crop meta api in GLTextureUploadRenderer
In order to get good cpu usage results the patch attached to this issue https://bugzilla.gnome.org/show_bug.cgi?id=712558 should be applied.
Created attachment 262799 [details] [review] [PATCH 3/4] video-sink: support gl texture upload meta api Fix GLTextureUploadMeta caps BGRA → RGBA and make it compatible with vaapidecode.
Review of attachment 261257 [details] [review]: ::: clutter-gst/clutter-gst-video-sink.c @@ +817,3 @@ + priv->info.height, + CLUTTER_GST_TEXTURE_FLAGS, + format, format, stride, data); You're using 'priv->info' here but you loaded the data into 'info'. @@ +882,3 @@ + priv->info.height, + CLUTTER_GST_TEXTURE_FLAGS, + if (!meta->map (meta, 0, &info, &data, &stride, GST_MAP_READ)) Same here 'priv->info' instead of 'info'. @@ +949,3 @@ + cogl_texture_new_from_data (GST_VIDEO_INFO_COMP_WIDTH (&priv->info, i), + GST_VIDEO_INFO_COMP_HEIGHT (&priv->info, i), CLUTTER_GST_TEXTURE_FLAGS, + COGL_PIXEL_FORMAT_G_8, COGL_PIXEL_FORMAT_G_8, stride, Same here 'priv->info' instead of 'info'. @@ +1039,3 @@ + COGL_PIXEL_FORMAT_U_V, COGL_PIXEL_FORMAT_U_V, stride, + data); + if (!meta->map (meta, 1, &info, &data, &stride, GST_MAP_READ)) Same here 'priv->info' instead of 'info'. @@ +1210,3 @@ + COGL_PIXEL_FORMAT_RGBA_8888, + COGL_PIXEL_FORMAT_RGBA_8888, stride, data); + Same here 'priv->info' instead of 'info'.
(In reply to comment #7) > Review of attachment 261257 [details] [review]: > > ::: clutter-gst/clutter-gst-video-sink.c > @@ +817,3 @@ > + priv->info.height, > + CLUTTER_GST_TEXTURE_FLAGS, > + format, format, stride, data); > > You're using 'priv->info' here but you loaded the data into 'info'. info is of type GstMapInfo which does carry video information, so priv->info still needs to be used here unless i've missed something. [...]
Comment on attachment 261257 [details] [review] [PATCH 1/4] video-sink: support video meta api Maybe use meta->width/height then?
Created attachment 262953 [details] [review] [PATCH 1/4] video-sink: support video meta api Also support buffers alignments using the video frame API.
(In reply to comment #9) > (From update of attachment 261257 [details] [review]) > Maybe use meta->width/height then? I've update the patch and used the video frame API which takes care of buffer alignement for us if video meta api is used.
Created attachment 262968 [details] [review] [PATCH 1/4] video-sink: support video meta api Fixes COMP_STRIDE|DATA vs PLANE_STRIDE|DATA usage.
Created attachment 264411 [details] [review] [PATCH 1/4] video-sink: support video meta api
Created attachment 264412 [details] [review] [PATCH 2/4] add context field to GstClutterSinkRenderer
Created attachment 264413 [details] [review] [PATCH 3/4] video-sink: support gl texture upload meta api
Created attachment 264414 [details] [review] [PATCH 4/4] video-sink: support video crop meta api in GLTextureUploadRenderer
Created attachment 264486 [details] [review] video-sink: support gl texture upload meta api Fix caps ordering so that gltextureupload is prefered over the other formats
Review of attachment 264411 [details] [review]: Looks good, I'll push to the 2.0 branch.
Review of attachment 264412 [details] [review]: Looks good, I'll push to the 2.0 branch.
Review of attachment 264486 [details] [review]: Looks good, I'll push to the 2.0 branch.
Review of attachment 264414 [details] [review]: Looks good, I'll push to the 2.0 branch.