All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
@ 2014-03-28  6:05 Meenakumari Shedole
  2014-03-28 11:12 ` Burton, Ross
  0 siblings, 1 reply; 17+ messages in thread
From: Meenakumari Shedole @ 2014-03-28  6:05 UTC (permalink / raw)
  To: ross.burton; +Cc: Dipesh Karmakar, yocto

Hi Ross,

Thanks for your reply.

Actually we have tried that, problem was,
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.

I believe we need to change playbin2 sink dynamically to xvimagesink/vaapisink based on the input.
Is it justified? What kind of issues we may found in case?


Regards
Meena

-----Original Message-----
From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: Thursday, March 27, 2014 7:15 PM
To: Meenakumari Shedole
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback

On 27 March 2014 06:58, Meenakumari Shedole <meenakumari.s@hcl.com> wrote:
> filesrc-> decodebin->queue->ffmpegcolorspace->xvimagesink

Try just using playbin2 instead of constructing a pipeline manually,
there's lot of smarts that you'll need to do manually otherwise.

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.

----------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-03-28  6:05 Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback Meenakumari Shedole
@ 2014-03-28 11:12 ` Burton, Ross
  2014-04-01  9:05   ` Meenakumari Shedole
                     ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Burton, Ross @ 2014-03-28 11:12 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: Dipesh Karmakar, yocto

On 28 March 2014 06:05, Meenakumari Shedole <meenakumari.s@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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-03-28 11:12 ` Burton, Ross
@ 2014-04-01  9:05   ` Meenakumari Shedole
  2014-04-02 10:49     ` Burton, Ross
  2014-04-01 12:40   ` Meenakumari Shedole
  2014-04-02  6:32   ` Meenakumari Shedole
  2 siblings, 1 reply; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-01  9:05 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Dipesh Karmakar, yocto

Thanks for your input.

I have used libva-intel-driver-1.2.0 as a part of meta-intel on Dora as the recipes provided by Intel. I can attach bb file also if its needed.
Have build Intel va source manually and now we can able to sink with vaapisink in its own window.
We are not able to use vaapisink with AVI/3GP files, asking for some missing video/x-surface.

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

However when I am trying to set the window to the sink using gst_x_overlay_set_xwindow_id OR gst_x_overlay_set_window_handle API's I am getting following runtime error.

    SetWindowId() in Pipes/PASE_MW_MediaPipe.cpp, line 403: window id 69206022d
    libva: VA-API version 0.32.0
    libva: va_getDriverName() returns 0
    libva: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
    libva: va_openDriver() returns 0

    GStreamer-CRITICAL **: gst_util_fraction_multiply: assertion `a_d != 0' failed

BTW I am not aware of reparent window.

We have run the same setup in desktop side Ubuntu also (GST vaapi Version: 0.3.6), resulting the same.



Thanks and Regards.
Meena



-----Original Message-----
From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: Friday, March 28, 2014 4:42 PM
To: Meenakumari Shedole
Cc: yocto@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@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.

----------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-03-28 11:12 ` Burton, Ross
  2014-04-01  9:05   ` Meenakumari Shedole
@ 2014-04-01 12:40   ` Meenakumari Shedole
  2014-04-02  6:32   ` Meenakumari Shedole
  2 siblings, 0 replies; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-01 12:40 UTC (permalink / raw)
  To: yocto, gwenole.beauchesne; +Cc: Dipesh Karmakar

This is regarding 1080p mp4 playback case.

We are using gstreamer0.10.36 for our 1080p mp4 playback and we have used following gstraemer pipeline.
filesrc-> decodebin->queue->ffmpegcolorspace->xvimagesink

Here we are facing lot of buffer drop and video is displaying like slow motion so, we think that may be xvimagesink is not using the video acceleration provided by Intel, hence we moved to vaapivideosink. However we found the following error while using vaapivideosink

Later We tried vaapisink with below pipeline
 
Playbin2-->video-sink=vaapisink.

But Video is not playing with qtwindow( application window),creating its own one window.

Due to this problem.

I have used libva-intel-driver-1.2.0 as a part of meta-intel on Dora as the recipes provided by Intel. I can attach bb file also if its needed.
Have build Intel va source manually and now we can able to sink with vaapisink in its own window.
We are not able to use vaapisink with AVI/3GP files, asking for some missing video/x-surface.

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

However when I am trying to set the window to the sink using gst_x_overlay_set_xwindow_id OR gst_x_overlay_set_window_handle API's I am getting following runtime error.

    SetWindowId() in Pipes/PASE_MW_MediaPipe.cpp, line 403: window id 69206022d
    libva: VA-API version 0.32.0
    libva: va_getDriverName() returns 0
    libva: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
    libva: va_openDriver() returns 0

    GStreamer-CRITICAL **: gst_util_fraction_multiply: assertion `a_d != 0' failed

We have run the same setup in desktop side Ubuntu also (GST vaapi Version: 0.3.6), resulting the same.



Thanks and Regards.
Meena



-----Original Message-----
From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: Friday, March 28, 2014 4:42 PM
To: Meenakumari Shedole
Cc: yocto@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@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.

----------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-03-28 11:12 ` Burton, Ross
  2014-04-01  9:05   ` Meenakumari Shedole
  2014-04-01 12:40   ` Meenakumari Shedole
@ 2014-04-02  6:32   ` Meenakumari Shedole
  2014-04-03 14:52     ` Beauchesne, Gwenole
  2 siblings, 1 reply; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-02  6:32 UTC (permalink / raw)
  To: yocto, gwenole.beauchesne; +Cc: Dipesh Karmakar

This is regarding 1080p mp4 playback case.

We are using gstreamer0.10.36 for our 1080p mp4 playback and we have used following gstraemer pipeline.
filesrc-> decodebin->queue->ffmpegcolorspace->xvimagesink

Here we are facing lot of buffer drop and video is displaying like slow motion so, we think that may be xvimagesink is not using the video acceleration provided by Intel, hence we moved to vaapivideosink. However we found the following error while using vaapivideosink

Later We tried vaapisink with below pipeline

Playbin2-->video-sink=vaapisink.

But Video is not playing with qtwindow( application window),creating its own one window.

Due to this problem.

I have used libva-intel-driver-1.2.0 as a part of meta-intel on Dora as the recipes provided by Intel. I can attach bb file also if its needed.
Have build Intel va source manually and now we can able to sink with vaapisink in its own window.
We are not able to use vaapisink with AVI/3GP files, asking for some missing video/x-surface.

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

However when I am trying to set the window to the sink using gst_x_overlay_set_xwindow_id OR gst_x_overlay_set_window_handle API's I am getting following runtime error.

    SetWindowId() in MediaPipe.cpp, line 403: window id 69206022d
    libva: VA-API version 0.32.0
    libva: va_getDriverName() returns 0
    libva: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
    libva: va_openDriver() returns 0

    GStreamer-CRITICAL **: gst_util_fraction_multiply: assertion `a_d != 0' failed

We have run the same setup in desktop side Ubuntu also (GST vaapi Version: 0.3.6), resulting the same.



Thanks and Regards.
Meena



-----Original Message-----
From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: Friday, March 28, 2014 4:42 PM
To: Meenakumari Shedole
Cc: yocto@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@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.

----------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-01  9:05   ` Meenakumari Shedole
@ 2014-04-02 10:49     ` Burton, Ross
  2014-04-02 13:43       ` Dipesh Karmakar
  0 siblings, 1 reply; 17+ messages in thread
From: Burton, Ross @ 2014-04-02 10:49 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: Dipesh Karmakar, yocto

On 1 April 2014 10:05, Meenakumari Shedole <meenakumari.s@hcl.com> wrote:
> I have used libva-intel-driver-1.2.0 as a part of meta-intel on Dora as the recipes provided by Intel. I can attach bb file also if its needed.
> Have build Intel va source manually and now we can able to sink with vaapisink in its own window.
> We are not able to use vaapisink with AVI/3GP files, asking for some missing video/x-surface.
>
> I have checked vaapisink source, it seems its supporting overlay on foreign X window.
> https://gitorious.org/vaapi/gstreamer-vaapi/source/643d35e87a67376af9cd89cd868666368b105ac3:gst/vaapisink/gstvaapisink.c
> static gboolean gst_vaapisink_implements_interface_supported();
> static gboolean gst_vaapisink_ensure_window_xid();

The most important thing to do here is to do testing with gst-launch
to remove your application causing problems.  Embedding pipelines
(especially using vaapi) into other windows isn't trivial and its
possible that your application is causing the problem.    If
"gst-launch playbin2" works fine for all of your files then your
application is causing the problem.

Ross


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-02 10:49     ` Burton, Ross
@ 2014-04-02 13:43       ` Dipesh Karmakar
  2014-04-03  6:59         ` Meenakumari Shedole
  0 siblings, 1 reply; 17+ messages in thread
From: Dipesh Karmakar @ 2014-04-02 13:43 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto, Meenakumari Shedole


We have checked avi, mp4, 3gp, ogv and many other extensions with gst-launch-0.10 playbin, all are playing properly except 1080p-mp4; its playing kind of slow-motion taking cpu usage >60%. Log reveals, lots of buffer drop in sink side.

gst-launch-0.10 playbin2 + mp4/avi is failing with following error,

libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: Found init function __vaDriverInit_0_32
libva error: /usr/lib/dri/i965_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit 

Based on the log, it's clear that playbin is using soft-decoder incase hw-decoder fails, hence taking high cpu usage, however playbin2 is only taking hw-decoder.

Dipesh

-----Original Message-----
From: Burton, Ross [mailto:ross.burton@intel.com] 
Sent: Wednesday, April 02, 2014 4:20 PM
To: Meenakumari Shedole
Cc: yocto@yoctoproject.org; Dipesh Karmakar
Subject: Re: [yocto] Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback

On 1 April 2014 10:05, Meenakumari Shedole <meenakumari.s@hcl.com> wrote:
> I have used libva-intel-driver-1.2.0 as a part of meta-intel on Dora as the recipes provided by Intel. I can attach bb file also if its needed.
> Have build Intel va source manually and now we can able to sink with vaapisink in its own window.
> We are not able to use vaapisink with AVI/3GP files, asking for some missing video/x-surface.
>
> I have checked vaapisink source, it seems its supporting overlay on foreign X window.
> https://gitorious.org/vaapi/gstreamer-vaapi/source/643d35e87a67376af9c
> d89cd868666368b105ac3:gst/vaapisink/gstvaapisink.c
> static gboolean gst_vaapisink_implements_interface_supported();
> static gboolean gst_vaapisink_ensure_window_xid();

The most important thing to do here is to do testing with gst-launch to remove your application causing problems.  Embedding pipelines (especially using vaapi) into other windows isn't trivial and its
possible that your application is causing the problem.    If
"gst-launch playbin2" works fine for all of your files then your application is causing the problem.

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.

----------------------------------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-02 13:43       ` Dipesh Karmakar
@ 2014-04-03  6:59         ` Meenakumari Shedole
  2014-04-03 14:41           ` Burton, Ross
  0 siblings, 1 reply; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-03  6:59 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Dipesh Karmakar, yocto

Hi,

We have checked avi, mp4, 3gp, ogv and many other extensions with gst-launch-0.10 playbin, all are playing properly except 1080p-mp4; its playing kind of slow-motion taking cpu usage >60%. Log reveals, lots of buffer drop in sink side.

gst-launch-0.10 playbin2 + mp4/avi is failing with following error,

libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: Found init function __vaDriverInit_0_32
libva error: /usr/lib/dri/i965_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Based on the log, it's clear that playbin is using soft-decoder incase hw-decoder fails, hence taking high cpu usage, however playbin2 is only taking hw-decoder.


Thanks and Regards
Meena

-----Original Message-----
From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Wednesday, April 02, 2014 4:20 PM
To: Meenakumari Shedole
Cc: yocto@yoctoproject.org; Dipesh Karmakar
Subject: Re: [yocto] Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback

On 1 April 2014 10:05, Meenakumari Shedole <meenakumari.s@hcl.com> wrote:
> I have used libva-intel-driver-1.2.0 as a part of meta-intel on Dora as the recipes provided by Intel. I can attach bb file also if its needed.
> Have build Intel va source manually and now we can able to sink with vaapisink in its own window.
> We are not able to use vaapisink with AVI/3GP files, asking for some missing video/x-surface.
>
> I have checked vaapisink source, it seems its supporting overlay on foreign X window.
> https://gitorious.org/vaapi/gstreamer-vaapi/source/643d35e87a67376af9c
> d89cd868666368b105ac3:gst/vaapisink/gstvaapisink.c
> static gboolean gst_vaapisink_implements_interface_supported();
> static gboolean gst_vaapisink_ensure_window_xid();

The most important thing to do here is to do testing with gst-launch to remove your application causing problems.  Embedding pipelines (especially using vaapi) into other windows isn't trivial and its
possible that your application is causing the problem.    If
"gst-launch playbin2" works fine for all of your files then your application is causing the problem.

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.

----------------------------------------------------------------------------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-03  6:59         ` Meenakumari Shedole
@ 2014-04-03 14:41           ` Burton, Ross
  0 siblings, 0 replies; 17+ messages in thread
From: Burton, Ross @ 2014-04-03 14:41 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: Dipesh Karmakar, yocto

On 3 April 2014 07:59, Meenakumari Shedole <meenakumari.s@hcl.com> wrote:
> gst-launch-0.10 playbin2 + mp4/avi is failing with following error,
>
> libva: VA-API version 0.32.0
> libva: va_getDriverName() returns 0
> libva: Trying to open /usr/lib/dri/i965_drv_video.so
> libva: Found init function __vaDriverInit_0_32
> libva error: /usr/lib/dri/i965_drv_video.so init failed
> libva: va_openDriver() returns -1
> vaInitialize failed with error code -1 (unknown libva error),exit

In this case you'll want to start testing with the lower-level
utilities in the va library packages.  I haven't tested this for a
while but it certainly worked when 1.5 was released.

Ross


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-02  6:32   ` Meenakumari Shedole
@ 2014-04-03 14:52     ` Beauchesne, Gwenole
  2014-04-04 10:49       ` Meenakumari Shedole
  2014-04-11  7:54       ` Meenakumari Shedole
  0 siblings, 2 replies; 17+ messages in thread
From: Beauchesne, Gwenole @ 2014-04-03 14:52 UTC (permalink / raw)
  To: Meenakumari Shedole, yocto; +Cc: Dipesh Karmakar

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@intel.com]
> Sent: Friday, March 28, 2014 4:42 PM
> To: Meenakumari Shedole
> Cc: yocto@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@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.
> 
> ----------------------------------------------------------------------------------------------
> ------------------------------------------------------

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-03 14:52     ` Beauchesne, Gwenole
@ 2014-04-04 10:49       ` Meenakumari Shedole
  2014-04-10  8:14         ` Meenakumari Shedole
  2014-04-11  7:54       ` Meenakumari Shedole
  1 sibling, 1 reply; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-04 10:49 UTC (permalink / raw)
  To: Beauchesne, Gwenole, yocto; +Cc: Dipesh Karmakar

Thanks for your resposne Gwenole.

I downloaded updated gstreamer-vaapi-0.5.8 and GStreamer-0.10.36 with other dependency plaugins and va deriver but after manually install no luck to execute vaapisink.

can you please suggest, vaapi dependencies and their version to build.

Regards
Meena.
________________________________________
From: Beauchesne, Gwenole [gwenole.beauchesne@intel.com]
Sent: Thursday, April 03, 2014 8:22 PM
To: Meenakumari Shedole; yocto@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@intel.com]
> Sent: Friday, March 28, 2014 4:42 PM
> To: Meenakumari Shedole
> Cc: yocto@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@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.
>
> ----------------------------------------------------------------------------------------------
> ------------------------------------------------------


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-04 10:49       ` Meenakumari Shedole
@ 2014-04-10  8:14         ` Meenakumari Shedole
  0 siblings, 0 replies; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-10  8:14 UTC (permalink / raw)
  To: Beauchesne, Gwenole, yocto; +Cc: Dipesh Karmakar

Hi All.

By using all latest version packages, Vaapi able to set the foreign window but there is random changes between Application and VaapiSink in SetWindowId, Play and Stop state.
 
Below are few of the different behaviors.

a.  To play 1080p media, First SetWindowID, Play and Stop. ( It works with foreign window)
b.  To play 1080p media, Second time only Play and Stop. (It won't work) and crash the daemon.
c.  start the daemon and app
d.  This time again SetWindowID, Play and Stop. (It works with foreign window)
e.  Only Play and Stop.( it works and won't crash the daemon also)
f.   Next time again setWindowID, Play and Stop. (it won't works)
g.  Next again to SetWindowID, Play and Stop.(it works)

Some times when I use only Play and Stop it open it's own window and start to play.

Regards
Meenakumari Shedole
________________________________________
From: Meenakumari Shedole
Sent: Friday, April 04, 2014 4:19 PM
To: Beauchesne, Gwenole; yocto@yoctoproject.org
Cc: Dipesh Karmakar
Subject: RE: [yocto] Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback

Thanks for your resposne Gwenole.

I downloaded updated gstreamer-vaapi-0.5.8 and GStreamer-0.10.36 with other dependency plaugins and va deriver but after manually install no luck to execute vaapisink.

can you please suggest, vaapi dependencies and their version to build.

Regards
Meena.
________________________________________
From: Beauchesne, Gwenole [gwenole.beauchesne@intel.com]
Sent: Thursday, April 03, 2014 8:22 PM
To: Meenakumari Shedole; yocto@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@intel.com]
> Sent: Friday, March 28, 2014 4:42 PM
> To: Meenakumari Shedole
> Cc: yocto@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@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.
>
> ----------------------------------------------------------------------------------------------
> ------------------------------------------------------


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-03 14:52     ` Beauchesne, Gwenole
  2014-04-04 10:49       ` Meenakumari Shedole
@ 2014-04-11  7:54       ` Meenakumari Shedole
  2014-04-15  4:46         ` Meenakumari Shedole
  1 sibling, 1 reply; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-11  7:54 UTC (permalink / raw)
  To: Beauchesne, Gwenole, yocto; +Cc: Dipesh Karmakar

Hi All.

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@entry=0xb6f0f8e8, xid=xid@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@intel.com]
Sent: Thursday, April 03, 2014 8:22 PM
To: Meenakumari Shedole; yocto@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@intel.com]
> Sent: Friday, March 28, 2014 4:42 PM
> To: Meenakumari Shedole
> Cc: yocto@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@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.
>
> ----------------------------------------------------------------------------------------------
> ------------------------------------------------------


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-04-11  7:54       ` Meenakumari Shedole
@ 2014-04-15  4:46         ` Meenakumari Shedole
  0 siblings, 0 replies; 17+ messages in thread
From: Meenakumari Shedole @ 2014-04-15  4:46 UTC (permalink / raw)
  To: Beauchesne, Gwenole, yocto; +Cc: Dipesh Karmakar

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@entry=0xb6f0f8e8, xid=xid@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@intel.com]
Sent: Thursday, April 03, 2014 8:22 PM
To: Meenakumari Shedole; yocto@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@intel.com]
> Sent: Friday, March 28, 2014 4:42 PM
> To: Meenakumari Shedole
> Cc: yocto@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@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.
>
> ----------------------------------------------------------------------------------------------
> ------------------------------------------------------


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-03-27  6:58 Meenakumari Shedole
  2014-03-27  7:21 ` Laurentiu Palcu
@ 2014-03-27 13:45 ` Burton, Ross
  1 sibling, 0 replies; 17+ messages in thread
From: Burton, Ross @ 2014-03-27 13:45 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: yocto

On 27 March 2014 06:58, Meenakumari Shedole <meenakumari.s@hcl.com> wrote:
> filesrc-> decodebin->queue->ffmpegcolorspace->xvimagesink

Try just using playbin2 instead of constructing a pipeline manually,
there's lot of smarts that you'll need to do manually otherwise.

Ross


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
  2014-03-27  6:58 Meenakumari Shedole
@ 2014-03-27  7:21 ` Laurentiu Palcu
  2014-03-27 13:45 ` Burton, Ross
  1 sibling, 0 replies; 17+ messages in thread
From: Laurentiu Palcu @ 2014-03-27  7:21 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: yocto

Hi Meena,

On Thu, Mar 27, 2014 at 06:58:53AM +0000, Meenakumari Shedole wrote:
> Hi All,
> 
> We are having some problem regarding gstreamer Vaapi Plugin would like to
> discuss.
> 
> We are using gstreamer0.10.36 for our 1080p mp4 playback and we have used
> following gstraemer pipeline.
> filesrc-> decodebin->queue->ffmpegcolorspace->xvimagesink
> 
> Here we are facing lot of buffer drop and video is displaying like slow motion
> so, we think that may be xvimagesink is not using the video acceleration
> provided by Intel, hence we moved to vaapivideosink. However we found the
> following error while using vaapivideosink
> 
> libva: VA-API version 0.32.0
> libva: va_getDriverName() returns 0
> libva: Trying to open /usr/lib/dri/i965_drv_video.so
> libva: va_openDriver() returns -1
> vaInitialize failed with error code -1 (unknown libva error),exit
> 
> Even the same error we are getting while doing 'vainfo' also.
> 
> We have gone through some INTERNET search, but did't find useful informations.
> 
> Basically we have 2 quires
> 1. Is it possible to play 1080p mp4 playback with software decoders smoothly ?
> How we will fix buffer drop issue ?
> 2. How we will use vaapi sink in other case (solving the va_openDriver()
> error)? Do we need to rebuild some other vaapi versions to make it work ?
I'm far from an expert in gstreamer but I used it once in a while to
test intel video driver upgrades. Here's the pipeline I use:

gst-launch filesrc location=./sintel_trailer-720p.mp4  ! qtdemux name=demuxer demuxer.video_00 ! vaapidecode ! vaapisink fullscreen=true

I don't remember where I got this pipeline from but... maybe it works
for you too.

Perhaps others can give you a more in-depth explanation.

laurentiu

> 
> 
> Our platform information:
> a. Intel-E3800 Baytrail
> b. Yocto Dora build
> c. Base Kernel Linux Baytrail32 3.8.0-yocto standard
> 
> Thanks in advance.
> 
> Thanks & Regards,
> Meena
> 
> 
> 
> 
> 
> ::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.
> 
> ----------------------------------------------------------------------------------------------------------------------------------------------------
> 

> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback
@ 2014-03-27  6:58 Meenakumari Shedole
  2014-03-27  7:21 ` Laurentiu Palcu
  2014-03-27 13:45 ` Burton, Ross
  0 siblings, 2 replies; 17+ messages in thread
From: Meenakumari Shedole @ 2014-03-27  6:58 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/html, Size: 4314 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-04-15  4:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28  6:05 Help-Gstreamer Vaapi Plugin Issue in 1080p mp4 playback Meenakumari Shedole
2014-03-28 11:12 ` Burton, Ross
2014-04-01  9:05   ` Meenakumari Shedole
2014-04-02 10:49     ` Burton, Ross
2014-04-02 13:43       ` Dipesh Karmakar
2014-04-03  6:59         ` Meenakumari Shedole
2014-04-03 14:41           ` Burton, Ross
2014-04-01 12:40   ` Meenakumari Shedole
2014-04-02  6:32   ` Meenakumari Shedole
2014-04-03 14:52     ` Beauchesne, Gwenole
2014-04-04 10:49       ` Meenakumari Shedole
2014-04-10  8:14         ` Meenakumari Shedole
2014-04-11  7:54       ` Meenakumari Shedole
2014-04-15  4:46         ` Meenakumari Shedole
  -- strict thread matches above, loose matches on Subject: below --
2014-03-27  6:58 Meenakumari Shedole
2014-03-27  7:21 ` Laurentiu Palcu
2014-03-27 13:45 ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.