Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 10 months ago

Closed 10 months ago

Last modified 5 months ago

#11631 closed Bug Report - General (fixed)

libva API changes for 1.2.0

Reported by: fphillips81@… Owned by: Gary Buhrmaster <gary.buhrmaster@…>
Priority: minor Milestone: 0.27
Component: MythTV - Video/OSD Rendering Version: 0.26-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

There are some API changes to libva 1.2.0
http://cgit.freedesktop.org/libva/tree/NEWS

Version 1.2.0 - 25.Jun.2013
* API: new H.264 encoding API for Main and High profiles
* API: add support for MPEG-2 encoding
* API: add video processing interfaces
* API: add vaQuerySurfaceAttributes() to query surface attributes supported by the underlying drivers.
* API: new version of vaCreateSurfaces()
* API: add new surface attributes to enable VA surface creation from external buffer
* API: add new RT formats and fourcc codes
* Refine VA trace utility
* Refine H.264 encoding test cases {avcenc, h264enc}
* A new test case for MPEG-2 encoding
* A lot of bug fixes

The change to vaCreateSurfaces() prevents compilation of 0.26-fixes with libva-1.2.1:

g++ -c -m64 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DNDEBUG -fomit-frame-pointer -fPIC -pthread -g -Wall -Wpointer-arith -Wno-non-virtual-dtor -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -O3 -fvisibility-inlines-hidden -Wmissing-declarations -Wno-switch -Wredundant-decls -funit-at-a-time -I/usr/include/freetype2 -fvisibility=hidden -D_REENTRANT -fPIC -DMMX -D_GNU_SOURCE -DUSING_LIBCRYPTO -DUSING_LIBASS -DFFTW3_SUPPORT -DUSING_X11 -DUSING_XV -DUSING_VDPAU -DUSING_OPENGL -DUSING_OPENGL_VIDEO -DUSING_VAAPI -DUSING_GLVAAPI -DUSING_AIRPLAY -DUSING_MHEG -DUSING_FRONTEND -DUSING_FFMPEG_THREADS -DUSING_ALSA -DUSING_OSS -DUSING_V4L2 -DUSING_LINUX_FIREWIRE -DUSING_FIREWIRE -DUSING_IPTV -DUSING_HDHOMERUN -DUSING_CETON -DUSING_IVTV -DUSING_HDPVR -DUSING_DVB -DUSING_BACKEND -DMTV_API -DQT_SQL_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr -I/usr/include/libxml2 -I../../external/zeromq/include -I../../external/nzmqt/include/nzmqt -I../../external/qjson/include -I.. -I../.. -I../../external/FFmpeg -I. -I../libmyth -I../libmyth/audio -I../libmythbase -I../libmythhdhomerun -Idvbdev -Impeg -Iiptv -Ichannelscan -Ivisualisations -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/BasicUsageEnvironment -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/groupsock -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/liveMedia -I../libmythlivemedia/UsageEnvironment/include -I../libmythlivemedia/UsageEnvironment -I../libmythbase -I../libmythui -I../libmythupnp -I../libmythservicecontracts -I/usr/include -I../libmythdvdnav -I../libmythbluray -I/usr/X11R6/include -I. -o videoout_nullvaapi.o videoout_nullvaapi.cpp
vaapicontext.cpp: In member function ‘bool VAAPIContext::InitBuffers()’:
vaapicontext.cpp:570:44: error: invalid conversion from ‘int’ to ‘VASurfaceID* {aka unsigned int*}’ [-fpermissive]
                                  m_surfaces);
                                            ^
vaapicontext.cpp:570:44: error: invalid conversion from ‘VASurfaceID* {aka unsigned int*}’ to ‘unsigned int’ [-fpermissive]
vaapicontext.cpp:570:44: error: too few arguments to function ‘VAStatus vaCreateSurfaces(VADisplay, unsigned int, unsigned int, unsigned int, VASurfaceID*, unsigned int, VASurfaceAttrib*, unsigned int)’
In file included from /usr/include/va/va_x11.h:27:0,
                 from vaapicontext.h:7,
                 from vaapicontext.cpp:6:
/usr/include/va/va.h:792:1: note: declared here
 vaCreateSurfaces(
 ^
make[2]: *** [vaapicontext.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/fp/builds/mythtv-fixes-git/src/mythtv/mythtv/libs/libmythtv'
make[1]: *** [sub-libmythtv-make_default] Error 2
make[1]: Leaving directory `/home/fp/builds/mythtv-fixes-git/src/mythtv/mythtv/libs'
make: *** [libs] Error 2

Attachments (0)

Change History (7)

comment:1 Changed 10 months ago by Gary Buhrmaster <gary.buhrmaster@…>

Try the following patch to see if it allows MythTV to compile:

diff --git a/mythtv/libs/libmythtv/vaapicontext.h b/mythtv/libs/libmythtv/vaapicontext.h
index d076d11..76fd318 100644
--- a/mythtv/libs/libmythtv/vaapicontext.h
+++ b/mythtv/libs/libmythtv/vaapicontext.h
@@ -4,6 +4,10 @@
 extern "C" {
 #include "libavcodec/vaapi.h"
 }
+#include "va/va_version.h"
+#if VA_CHECK_VERSION(0,33,0)
+#include "va/va_compat.h"
+#endif
 #include "va/va_x11.h"
 #include "va/va_glx.h"
 #include "videocolourspace.h"

I have no method to test to see if vaapi works, so please report back.

Note that FFmpeg has some dependencies on the API, so FFmpeg upstream may need to do so work too.

comment:2 follow-up: Changed 10 months ago by Gary Buhrmaster <gary.buhrmaster@…>

Actually, that previous patch is wrong (it breaks with the older vaapi). Please use the following (changes the version check from 0,33,0 to 0,34,0).

diff --git a/mythtv/libs/libmythtv/vaapicontext.h b/mythtv/libs/libmythtv/vaapicontext.h
index d076d11..f85cd9e 100644
--- a/mythtv/libs/libmythtv/vaapicontext.h
+++ b/mythtv/libs/libmythtv/vaapicontext.h
@@ -4,6 +4,10 @@
 extern "C" {
 #include "libavcodec/vaapi.h"
 }
+#include "va/va_version.h"
+#if VA_CHECK_VERSION(0,34,0)
+#include "va/va_compat.h"
+#endif
 #include "va/va_x11.h"
 #include "va/va_glx.h"
 #include "videocolourspace.h"

As before, please report back success/failure.

comment:3 in reply to: ↑ 2 Changed 10 months ago by fphillips81@…

Replying to Gary Buhrmaster <gary.buhrmaster@…>:

Actually, that previous patch is wrong (it breaks with the older vaapi). Please use the following (changes the version check from 0,33,0 to 0,34,0).

diff --git a/mythtv/libs/libmythtv/vaapicontext.h b/mythtv/libs/libmythtv/vaapicontext.h
index d076d11..f85cd9e 100644
--- a/mythtv/libs/libmythtv/vaapicontext.h
+++ b/mythtv/libs/libmythtv/vaapicontext.h
@@ -4,6 +4,10 @@
 extern "C" {
 #include "libavcodec/vaapi.h"
 }
+#include "va/va_version.h"
+#if VA_CHECK_VERSION(0,34,0)
+#include "va/va_compat.h"
+#endif
 #include "va/va_x11.h"
 #include "va/va_glx.h"
 #include "videocolourspace.h"

As before, please report back success/failure.

Yes, that compiled and tested good. I don't know if the devs want to look into the new functionality and open a ticket to add it, or they are fine with using the old interface.

Thanks,
Frank P.

comment:4 Changed 10 months ago by Gary Buhrmaster <gary.buhrmaster@…>

comment:5 Changed 10 months ago by Gary Buhrmaster <gary.buhrmaster@…>

  • Owner set to Gary Buhrmaster <gary.buhrmaster@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 3b618cdb7efa264d5bd41da143bf12c67e4afeb0/mythtv:

libva (VAAPI) has changed their API. Use the legacy API.

Validated as working by Frank P.

Fixes #11631

Signed-off-by: Gary Buhrmaster <gary.buhrmaster@…>
Signed-off-by: Jean-Yves Avenard <jyavenard@…>

comment:6 Changed 10 months ago by paulh

  • Milestone changed from unknown to 0.27

comment:7 Changed 5 months ago by bas-t <tycholursen@…>

Please commit this one to fixes/0.26 too.
Thanks.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.