vaapisink: ensure the uploader is setup for upstream allocated buffers.

In GStreamer 0.10 builds, make sure that the GstVaapiUploader helper
is setup in case upstream elements allocate buffers themselves without
honouring our GstVaapiSink::bufer_alloc() hook.

In particular, this fixes support for OGG video streams with WebKit.

https://bugzilla.gnome.org/show_bug.cgi?id=703934

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
Zhao Halley 2013-04-18 19:49:42 +08:00 committed by Gwenole Beauchesne
parent 6d7b5eef7d
commit 45b4ba7df7

View file

@ -776,6 +776,16 @@ gst_vaapisink_set_caps(GstBaseSink *base_sink, GstCaps *caps)
if (!gst_vaapisink_ensure_display(sink))
return FALSE;
#if !GST_CHECK_VERSION(1,0,0)
if (sink->use_video_raw) {
/* Ensure the uploader is set up for upstream allocated buffers */
if (!gst_vaapi_uploader_ensure_display(sink->uploader, sink->display))
return FALSE;
if (!gst_vaapi_uploader_ensure_caps(sink->uploader, caps, NULL))
return FALSE;
}
#endif
gst_vaapisink_ensure_rotation(sink, FALSE);
gst_vaapisink_ensure_window_size(sink, &win_width, &win_height);