Skip to content

Commit

Permalink
Add VAAPI default playback profile
Browse files Browse the repository at this point in the history
  • Loading branch information
jyavenard committed Apr 14, 2012
1 parent 1b500ba commit 8dbe088
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions mythtv/libs/libmythtv/videodisplayprofile.cpp
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions mythtv/libs/libmythtv/videodisplayprofile.h
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions mythtv/programs/mythfrontend/globalsettings.cpp
Expand Up @@ -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))
{
Expand Down
1 change: 1 addition & 0 deletions mythtv/programs/mythfrontend/mythfrontend.pro
Expand Up @@ -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
Expand Down

0 comments on commit 8dbe088

Please sign in to comment.