[yocto] Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback

Meenakumari Shedole meenakumari.s at hcl.com
Mon Apr 14 21:46:46 PDT 2014


Hi.

I hope someone can help me with my questions.


We have built following Gst packages in Ubuntu 13.04
gstreamer-1.2.3
gst-plugins-base-1.2.3
gst-plugins-good-1.2.3
gst-plugins-bad-1.2.3
gst-plugins-ugly-1.2.3
gst-libav-1.2.3
libva-1.3.0
libva-intel-driver-1.3.0
gstreamer-vaapi-0.5.8

Our objective is to build gst-1.2.3 with latest vaapi support. On the way we have installed all other dependencies.

We have wrote an application(App1) to create a QT video widget and hence have the window id.
....
    QWidget window;
    window.resize(1920, 1080);
    window.show();
    WId xwinid = window.winId();
....

And another application (app2) to create gst-video pipe (filesrc-> qtdemux-> vaapidecode-> vaapisink) to test video overlay, where we are using following videooverlay api to test the foreign window,

gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vaapisink), aWindowId);

And App1 is sending wid to App2 through D-Bus.


Now Vaapi able to set the foreign window however, there is some troubling behaviors in vaapisink side.

a. First gst_video_overlay_set_window_handle to set the foreign window.
b. Play the pipe for some time (It works with foreign window) and Stop.
c. Second time Play, vaapisink creates its own window.
d. Stop the pipe.
e. Call gst_video_overlay_set_window_handle to set the foreign window again.
f. Start the pipe (It works with foreign window).

So instead of rending to the foreign window why vaapisink is creating its own window in all 2nd attempts to play?

Some time we are getting the following core dump while setting the windowid

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7900b40 (LWP 24910)]
0xb6109d8f in glXMakeCurrentReadSGI ()
   from /usr/lib/i386-linux-gnu/mesa/libGL.so.1
(gdb) bt
#0  0xb6109d8f in glXMakeCurrentReadSGI ()
   from /usr/lib/i386-linux-gnu/mesa/libGL.so.1
#1  0xb6109f13 in glXMakeCurrent ()
   from /usr/lib/i386-linux-gnu/mesa/libGL.so.1
#2  0xb645c994 in gl_set_current_context (new_cs=0xb78ff64c, old_cs=0x0)
    at gstvaapiutils_glx.c:450
#3  0xb645e728 in gst_vaapi_window_glx_ensure_context (window=0xb6f14800, 
    foreign_context=<optimized out>) at gstvaapiwindow_glx.c:217
#4  gst_vaapi_window_glx_ensure_context (window=0xb6f14800, 
    foreign_context=<optimized out>) at gstvaapiwindow_glx.c:185
#5  0xb645e986 in gst_vaapi_window_glx_new_with_xid (
    display=display at entry=0xb6f0f8e8, xid=xid at entry=62914566)
    at gstvaapiwindow_glx.c:413
#6  0xb648f72b in gst_vaapisink_ensure_window_xid (window_id=62914566, 
    sink=0xb6319000) at gstvaapisink.c:553
#7  gst_vaapisink_video_overlay_set_window_handle (overlay=0xb6319000, 
    window=62914566) at gstvaapisink.c:179
#8  0xb7cd11a7 in gst_video_overlay_set_window_handle (overlay=0xb6319000, 
    handle=62914566) at videooverlay.c:357

BTW, is there any way to test this scenario (setting the foreign window) with gst- commands only, which will remove our application overhead?

Thanks in advance,
Meena
________________________________________
From: Beauchesne, Gwenole [gwenole.beauchesne at intel.com]
Sent: Thursday, April 03, 2014 8:22 PM
To: Meenakumari Shedole; yocto at yoctoproject.org
Cc: Dipesh Karmakar
Subject: RE: [yocto] Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback

Hi,

> I have checked vaapisink source, it seems its supporting overlay on foreign X
> window.
> https://gitorious.org/vaapi/gstreamer-
> vaapi/source/643d35e87a67376af9cd89cd868666368b105ac3:gst/vaapisink/gs
> tvaapisink.c
> static gboolean gst_vaapisink_implements_interface_supported();
> static gboolean gst_vaapisink_ensure_window_xid();

The version you mention looks very old. I have integrated a fix from another user, who has been successfully using gstreamer-vaapi with GStreamer 0.10 in a scenario you describe (vaapisink + foreign window). Please update your gstreamer-vaapi version to at least 0.5.8. Or, the current git master tree. Other branches are not maintained any more. The fix I have in mind was f8666e2.

Regards,
Gwenole.

> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton at intel.com]
> Sent: Friday, March 28, 2014 4:42 PM
> To: Meenakumari Shedole
> Cc: yocto at yoctoproject.org; Dipesh Karmakar
> Subject: Re: [yocto] Help-Gstreamer Vaapi Plugin Issue in 1080p mp4
> playback
>
> On 28 March 2014 06:05, Meenakumari Shedole <meenakumari.s at hcl.com>
> wrote:
> > 1. playbin2 + avi/3gp is working properly because of xvimagesink is used
> interally.
> > 2. playbin2 + mp4 is not taking vaapi sink, we need to manually set video-
> sink=vaapisink.
> >    Also we are getting arbitrary crash while setting the qml video window id
> to the vaapi sink.
> >    So we are not getting any single pipe to play mp4/avi/3gp stuff.
>
> The important question is what recipe are you using to get the vaapi
> elements?
>
> What happens if you use vaapisink with AVI/3GP?  You should still get some
> acceleration.
>
> Note that especially when using vaapi sink you need to wait for the sink to
> create the window and then reparent it, you can't provide your own X
> window to vaapisink.  This is the usual cause for breakage.  Do testing with
> gst-launch before attempting to use your own application.
>
> Ross
>
>
> ::DISCLAIMER::
> ----------------------------------------------------------------------------------------------
> ------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive late or
> incomplete, or may contain viruses in transmission. The e mail and its
> contents (with or without referred errors) shall therefore not attach any
> liability on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of the
> author and may not necessarily reflect the views or opinions of HCL or its
> affiliates. Any form of reproduction, dissemination, copying, disclosure,
> modification, distribution and / or publication of this message without the
> prior written consent of authorized representative of HCL is strictly
> prohibited. If you have received this email in error please delete it and notify
> the sender immediately.
> Before opening any email and/or attachments, please check them for viruses
> and other defects.
>
> ----------------------------------------------------------------------------------------------
> ------------------------------------------------------



More information about the yocto mailing list