Permalink
Browse files

Update playback profiles after recent changes.

WARNING: Changes DB Schema version, so DB schema version is no longer
compatible with 0.24-fixes.

Removes CPU++, CPU+, and CPU-- playback profile groups.  These groups were
unnecessary after the removal of XvMC, libmpeg2, and PVR-350 decoding/
rendering.  Systems set to use any of these profiles groups are changed
to use the default group, Normal.

Changes users' custom profiles to replace XvMC and libmpeg2 decoders with
standard (ffmpeg) and XvMC video renderer with Xv (xv-blit) and ia44blend
OSD renderer with softblend.

Updates the VideoDisplayProfile::GetDefaultProfileName() to use Normal,
instead of CPU+.  This also fixes the issue where new systems incorrectly
used CPU+ by default.

Create example VDPAU profile groups when creating initial profile groups
(rather than 2 steps later).
  • Loading branch information...
1 parent 2ec3a29 commit 4cd818657100d13a813dfa7a8a44201184c49d71 @sphery sphery committed Dec 9, 2010
@@ -20,7 +20,7 @@ using namespace std;
mythtv/bindings/perl/MythTV.pm
*/
/// This is the DB schema version expected by the running MythTV instance.
-const QString currentDatabaseVersion = "1264";
+const QString currentDatabaseVersion = "1265";
static bool UpdateDBVersionNumber(const QString &newnumber, QString &dbver);
static bool performActualUpdate(
@@ -5502,6 +5502,25 @@ NULL
return false;
}
+ if (dbver == "1264")
+ {
+ const char *updates[] = {
+"DELETE FROM displayprofiles WHERE profilegroupid IN "
+" (SELECT profilegroupid FROM displayprofilegroups "
+" WHERE name IN ('CPU++', 'CPU+', 'CPU--'))",
+"DELETE FROM displayprofilegroups WHERE name IN ('CPU++', 'CPU+', 'CPU--')",
+"DELETE FROM settings WHERE value = 'DefaultVideoPlaybackProfile' "
+" AND data IN ('CPU++', 'CPU+', 'CPU--')",
+"UPDATE displayprofiles SET data = 'ffmpeg' WHERE data = 'libmpeg2'",
+"UPDATE displayprofiles SET data = 'ffmpeg' WHERE data = 'xvmc'",
+"UPDATE displayprofiles SET data = 'xv-blit' WHERE data = 'xvmc-blit'",
+"UPDATE displayprofiles SET data = 'softblend' WHERE data = 'ia44blend'",
+NULL
+};
+ if (!performActualUpdate(updates, "1265", dbver))
+ return false;
+ }
+
return true;
}
@@ -761,14 +761,14 @@ QString VideoDisplayProfile::GetDefaultProfileName(const QString &hostname)
QStringList profiles = GetProfiles(hostname);
- tmp = (profiles.contains(tmp)) ? tmp : QString::null;
+ tmp = (profiles.contains(tmp)) ? tmp : QString();
if (tmp.isEmpty())
{
if (profiles.size())
tmp = profiles[0];
- tmp = (profiles.contains("CPU+")) ? "CPU+" : tmp;
+ tmp = (profiles.contains("Normal")) ? "Normal" : tmp;
if (!tmp.isEmpty())
{
@@ -998,22 +998,6 @@ bool VideoDisplayProfile::DeleteProfileGroup(
return ok;
}
-void VideoDisplayProfile::CreateOldProfiles(const QString &hostname)
-{
- (void) QObject::tr("CPU++", "Sample: No hardware assist");
- DeleteProfileGroup("CPU++", hostname);
- uint groupid = CreateProfileGroup("CPU++", hostname);
- CreateProfile(groupid, 1, ">", 0, 0, "", 0, 0,
- "ffmpeg", 1, true, "xv-blit", "softblend", true,
- "bobdeint", "linearblend", "");
- CreateProfile(groupid, 2, ">", 0, 0, "", 0, 0,
- "ffmpeg", 1, true, "quartz-blit", "softblend", true,
- "linearblend", "linearblend", "");
-
- DeleteProfileGroup("CPU+", hostname);
- DeleteProfileGroup("CPU--", hostname);
-}
-
void VideoDisplayProfile::CreateNewProfiles(const QString &hostname)
{
(void) QObject::tr("High Quality", "Sample: high quality");
@@ -1098,8 +1082,8 @@ void VideoDisplayProfile::CreateVDPAUProfiles(const QString &hostname)
void VideoDisplayProfile::CreateProfiles(const QString &hostname)
{
- CreateOldProfiles(hostname);
CreateNewProfiles(hostname);
+ CreateVDPAUProfiles(hostname);
}
QStringList VideoDisplayProfile::GetVideoRenderers(const QString &decoder)
@@ -146,7 +146,6 @@ class MPUBLIC VideoDisplayProfile
static void DeleteProfiles(const QString &hostname);
static void CreateProfiles(const QString &hostname);
- static void CreateOldProfiles(const QString &hostname);
static void CreateNewProfiles(const QString &hostname);
static void CreateVDPAUProfiles(const QString &hostname);

0 comments on commit 4cd8186

Please sign in to comment.