Ticket #7269: playgroup.diff
File playgroup.diff, 5.3 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/playgroup.cpp
6 6 #include <iostream> 7 7 #include "playgroup.h" 8 8 #include "programinfo.h" 9 #include "videoouttypes.h" 9 10 10 11 // A parameter associated with the profile itself 11 12 class PlayGroupDBStorage : public SimpleDBStorage … … 125 126 } 126 127 }; 127 128 129 class AspectOverrideModeSetting : public ComboBoxSetting, public PlayGroupDBStorage 130 { 131 public: 132 AspectOverrideModeSetting(const PlayGroup& _parent) : 133 ComboBoxSetting(this), 134 PlayGroupDBStorage(this, _parent, "aspectoverridemode") 135 { 136 setLabel(QObject::tr("Aspect Ratio")); 137 setHelpText(QObject::tr("Change the default Aspect Ratio. ")); 138 } 139 140 void Load(void) 141 { 142 for (int j = kAspect_Off; j < kAspect_END; j++) 143 { 144 // swap 14:9 and 16:9 145 int i = ((kAspect_14_9 == j) ? kAspect_16_9 : 146 ((kAspect_16_9 == j) ? kAspect_14_9 : j)); 147 148 addSelection(toString((AspectOverrideMode) i), QString("%1").arg(i)); 149 } 150 151 PlayGroupDBStorage::Load(); 152 } 153 154 }; 155 156 class AdjustFillModeSetting : public ComboBoxSetting, public PlayGroupDBStorage 157 { 158 public: 159 AdjustFillModeSetting(const PlayGroup& _parent) : 160 ComboBoxSetting(this), 161 PlayGroupDBStorage(this, _parent, "adjustfillmode") 162 { 163 setLabel(QObject::tr("Fill Mode")); 164 setHelpText(QObject::tr("Change the default Fill Modeo. ")); 165 } 166 167 void Load(void) 168 { 169 for (int i = kAdjustFill_Off; i < kAdjustFill_END; i++) 170 { 171 addSelection(toString((AdjustFillMode) i), QString("%1").arg(i)); 172 } 173 174 PlayGroupDBStorage::Load(); 175 } 176 177 }; 178 179 128 180 PlayGroup::PlayGroup(QString _name) 129 181 : name(_name) 130 182 { … … 136 188 cgroup->addChild(new SkipBack(*this)); 137 189 cgroup->addChild(new JumpMinutes(*this)); 138 190 cgroup->addChild(new TimeStretch(*this)); 191 cgroup->addChild(new AspectOverrideModeSetting(*this)); 192 cgroup->addChild(new AdjustFillModeSetting(*this)); 139 193 140 194 addChild(cgroup); 141 195 }; -
libs/libmythtv/dbcheck.cpp
18 18 #define MINIMUM_DBMS_VERSION 5,0,15 19 19 20 20 /// This is the DB schema version expected by the running MythTV instance. 21 const QString currentDatabaseVersion = "124 4";21 const QString currentDatabaseVersion = "1245"; 22 22 23 23 static bool UpdateDBVersionNumber(const QString &newnumber); 24 24 static bool performActualUpdate( … … 4896 4896 return false; 4897 4897 } 4898 4898 4899 if (dbver == "1244") 4900 { 4901 const char *updates[] = { 4902 "ALTER TABLE playgroup ADD COLUMN aspectoverridemode INT NOT NULL DEFAULT 0;", 4903 "ALTER TABLE playgroup ADD COLUMN adjustfillmode INT NOT NULL DEFAULT 0;", 4904 "UPDATE playgroup SET aspectoverridemode = 0, adjustfillmode = 0;", 4905 NULL 4906 }; 4907 if (!performActualUpdate(updates, "1245", dbver)) 4908 return false; 4909 } 4910 4911 4899 4912 if (0) // apply at or near 0.22 release.. 4900 4913 { 4901 4914 if (dbver == "XXXX") -
libs/libmythtv/playercontext.cpp
47 47 // DB values 48 48 fftime(0), rewtime(0), 49 49 jumptime(0), ts_normal(1.0f), ts_alt(1.5f), 50 overrideMode(kAspect_Off), adjustFillMode(kAdjustFill_Off), 50 51 // locks 51 52 playingInfoLock(QMutex::Recursive), deleteNVPLock(QMutex::Recursive), 52 53 stateLock(QMutex::Recursive), … … 953 954 jumptime = PlayGroup::GetSetting(group, "jump", 10); 954 955 ts_normal = PlayGroup::GetSetting(group, "timestretch", 100) * 0.01f; 955 956 ts_alt = (ts_normal == 1.0f) ? 1.5f : 1.0f; 957 overrideMode = (AspectOverrideMode) PlayGroup::GetSetting(group, "aspectoverridemode", kAspect_Off); 958 adjustFillMode = (AdjustFillMode) PlayGroup::GetSetting(group, "adjustfillmode", kAdjustFill_Off); 956 959 } 957 960 958 961 void PlayerContext::SetPseudoLiveTV( -
libs/libmythtv/tv_play.cpp
5129 5129 { 5130 5130 ctx->StartOSD(this); 5131 5131 SetSpeedChangeTimer(25, __LINE__); 5132 5133 if (ctx->nvp) { 5134 ctx->nvp->ToggleAspectOverride(ctx->overrideMode); 5135 ctx->nvp->ToggleAdjustFill(ctx->adjustFillMode); 5136 } 5132 5137 } 5133 5138 5139 5134 5140 VERBOSE(VB_IMPORTANT, LOC + QString("StartPlayer(%1, %2, %3) -- end %4") 5135 5141 .arg(find_player_index(ctx)).arg(StateToString(desiredState)) 5136 5142 .arg((wantPiP) ? "PiP" : "main").arg((ok) ? "ok" : "error")); -
libs/libmythtv/playercontext.h
180 180 */ 181 181 float ts_normal; 182 182 float ts_alt; 183 AspectOverrideMode overrideMode; 184 AdjustFillMode adjustFillMode; 183 185 184 186 mutable QMutex playingInfoLock; 185 187 mutable QMutex deleteNVPLock;