Permalink
Browse files

Add VAAPI default playback profile

  • Loading branch information...
1 parent 1b500ba commit 8dbe088db734dab78a67e351903c1cc86fbbbdf8 @jyavenard jyavenard committed Apr 14, 2012
View
17 mythtv/libs/libmythtv/videodisplayprofile.cpp
@@ -1173,6 +1173,23 @@ void VideoDisplayProfile::CreateOpenGLProfiles(const QString &hostname)
}
#endif
+#if defined(USING_GLVAAPI)
+void VideoDisplayProfile::CreateVAAPIProfiles(const QString &hostname)
+{
+ (void) QObject::tr("VAAPI Normal", "Sample: VAAPI average quality");
+ DeleteProfileGroup("VAAPI Normal", hostname);
+ uint groupid = CreateProfileGroup("VAAPI Normal", hostname);
+ CreateProfile(groupid, 1, ">", 0, 0, "", 0, 0,
+ "vaapi", 2, true, "openglvaapi", "opengl2", true,
+ "vaapibobdeint", "vaapionefield",
+ "");
+ CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
+ "ffmpeg", 2, true, "opengl", "opengl2", true,
+ "opengldoubleratekerneldeint", "openglkerneldeint",
+ "");
+}
+#endif
+
void VideoDisplayProfile::CreateProfiles(const QString &hostname)
{
CreateNewProfiles(hostname);
View
3 mythtv/libs/libmythtv/videodisplayprofile.h
@@ -158,6 +158,9 @@ class MTV_PUBLIC VideoDisplayProfile
#if defined(USING_OPENGL_VIDEO)
static void CreateOpenGLProfiles(const QString &hostname);
#endif
+#if defined(USING_GLVAAPI)
+ static void CreateVAAPIProfiles(const QString &hostname);
+#endif
static QStringList GetVideoRenderers(const QString &decoder);
static QString GetVideoRendererHelp(const QString &renderer);
View
8 mythtv/programs/mythfrontend/globalsettings.cpp
@@ -1179,6 +1179,14 @@ PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) :
}
#endif
+#ifdef USING_GLVAAPI
+ if (!profiles.contains("VAAPI Normal"))
+ {
+ VideoDisplayProfile::CreateVAAPIProfiles(host);
+ profiles = VideoDisplayProfile::GetProfiles(host);
+ }
+#endif
+
QString profile = VideoDisplayProfile::GetDefaultProfileName(host);
if (!profiles.contains(profile))
{
View
1 mythtv/programs/mythfrontend/mythfrontend.pro
@@ -96,6 +96,7 @@ using_opengl:QT += opengl
using_opengl:DEFINES += USING_OPENGL
using_opengl_video:DEFINES += USING_OPENGL_VIDEO
using_vdpau:DEFINES += USING_VDPAU
+using_vaapi:using_opengl_video:DEFINES += USING_GLVAAPI
using_pulse:DEFINES += USING_PULSE
using_pulseoutput: DEFINES += USING_PULSEOUTPUT

0 comments on commit 8dbe088

Please sign in to comment.