Ticket #71: mythtv_autots_2.patch
| File mythtv_autots_2.patch, 12.6 KB (added by , 21 years ago) |
|---|
-
libs/libmythtv/scheduledrecording.h
49 49 class SRFindDay; 50 50 class SRFindTime; 51 51 class SRFindId; 52 class SRTimeStretch; 52 53 class SRParentId; 53 54 54 55 class ScheduledRecording: public ConfigurationGroup, public ConfigurationDialog { … … 161 162 void setFindTimeObj(SRFindTime* val) {findtime = val;} 162 163 void setFindIdObj(SRFindId* val) {findid = val;} 163 164 void setParentIdObj(SRParentId* val) {parentid = val;} 165 void setTimeStretchIDObj(SRTimeStretch* val) {timestretchid = val;} 164 166 165 167 void ToMap(QMap<QString, QString>& infoMap); 166 168 … … 225 227 class SRFindDay* findday; 226 228 class SRFindTime* findtime; 227 229 class SRFindId* findid; 230 SRTimeStretch* timestretchid; 228 231 class SRParentId* parentid; 229 232 230 233 ProgramInfo* m_pginfo; -
libs/libmythtv/NuppelVideoPlayer.cpp
1850 1850 return; 1851 1851 } 1852 1852 1853 if (audioOutput) 1854 audioOutput->SetStretchFactor(audio_stretchfactor); 1855 next_play_speed = audio_stretchfactor; 1856 1853 1857 if (!InitVideo()) 1854 1858 { 1855 1859 qApp->lock(); -
libs/libmythtv/sr_items.cpp
30 30 31 31 inactive = new SRInactive(_rec, this, _parentList); 32 32 addItem(inactive->getItem(), -1); 33 34 tsValue = new SRTimeStretch(_rec, _parentList, this); 35 addItem(tsValue->getItem(), -1); 33 36 } 34 37 35 38 … … 152 155 } 153 156 } 154 157 158 SRTimeStretch::SRTimeStretch(ScheduledRecording *_parent, ManagedList *_list, 159 ManagedListGroup *_group) : SRSelectSetting(_parent, 160 "timeStretchList", QString("[ %1 ]").arg(QObject::tr("Time Stretch")), 161 _group, "tsdefault", _list) 162 { 163 _parent->setTimeStretchIDObj(this); 164 } 155 165 166 void SRTimeStretch::load() 167 { 168 fillSelections(); 169 SRSelectSetting::load(); 170 171 setValue(QString::number(settingValue.toDouble(), 'f', 2)); 172 setUnchanged(); 173 } 174 175 void SRTimeStretch::fillSelections() 176 { 177 clearSelections(); 178 QString ts_text = QObject::tr("Default time stretch %1"); 179 float tsfac = 0.5; 180 float tsstep = 0.05; 181 while (tsfac < 2.01) { 182 addSelection(ts_text.arg(tsfac, 0, 'f', 2), 183 QString::number(tsfac, 'f', 2)); 184 tsfac += tsstep; 185 } 186 } -
libs/libmythtv/tv_play.cpp
523 523 else 524 524 ChangeState(kState_WatchingPreRecorded); 525 525 526 normal_speed = playbackinfo->timestretch; 527 526 528 if (class LCD * lcd = LCD::Get()) 527 529 lcd->switchToChannel(rcinfo->chansign, rcinfo->title, rcinfo->subtitle); 528 530 … … 1034 1036 nvp->SetExactSeeks(gContext->GetNumSetting("ExactSeeking")); 1035 1037 nvp->SetAutoCommercialSkip(autoCommercialSkip); 1036 1038 1039 nvp->SetAudioStretchFactor(normal_speed); 1040 1037 1041 if (gContext->GetNumSetting("DefaultCCMode")) 1038 1042 nvp->ToggleCC(vbimode, 0); 1039 1043 -
libs/libmythtv/dbcheck.cpp
10 10 #include "mythdbcon.h" 11 11 12 12 /// This is the DB schema version expected by the running MythTV instance. 13 const QString currentDatabaseVersion = "108 7";13 const QString currentDatabaseVersion = "1088"; 14 14 15 15 static bool UpdateDBVersionNumber(const QString &newnumber); 16 16 static bool performActualUpdate(const QString updates[], QString version, … … 1944 1944 if (!performActualUpdate(updates, "1087", dbver)) 1945 1945 return false; 1946 1946 } 1947 1947 1948 if (dbver == "1087") 1949 { 1950 const QString updates[] = { 1951 "ALTER TABLE record ADD COLUMN tsdefault FLOAT NOT NULL DEFAULT 1.0;", 1952 "ALTER TABLE recorded ADD COLUMN timestretch FLOAT NOT NULL DEFAULT 1.0;", 1953 "" 1954 }; 1955 performActualUpdate(updates, "1088", dbver); 1956 } 1957 1948 1958 return true; 1949 1959 } 1950 1960 -
libs/libmythtv/programinfo.h
13 13 typedef QMap<long long, long long> frm_pos_map_t; 14 14 typedef QMap<long long, int> frm_dir_map_t; 15 15 16 #define NUMPROGRAMLINES 3916 #define NUMPROGRAMLINES 40 17 17 18 18 typedef enum { 19 19 MARK_UNSET = -10, … … 256 256 bool hasAirDate; 257 257 bool repeat; 258 258 259 float timestretch; 260 259 261 int spread; 260 262 int startCol; 261 263 -
libs/libmythtv/sr_items.h
331 331 class SREndOffset* endOffset; 332 332 class SRDupMethod* dupMethItem; 333 333 class SRDupIn* dupLocItem; 334 class SRTimeStretch* tsValue; 334 335 335 336 ScheduledRecording *schedRec; 336 337 }; … … 793 794 void showNewRecGroup(); 794 795 void onGoingBack(); 795 796 }; 797 798 class SRTimeStretch : public SRSelectSetting 799 { 800 public: 801 SRTimeStretch(ScheduledRecording *_parent, ManagedList *_list, 802 ManagedListGroup *_group); 803 void load(); 804 void fillSelections(); 805 }; 806 796 807 #endif 797 808 -
libs/libmythtv/programinfo.cpp
66 66 year = ""; 67 67 stars = 0; 68 68 availableStatus = asAvailable; 69 timestretch = 1.0; 69 70 70 71 pathname = ""; 71 72 filesize = 0; … … 193 194 hasAirDate = other.hasAirDate; 194 195 repeat = other.repeat; 195 196 197 timestretch = other.timestretch; 198 196 199 seriesid = other.seriesid; 197 200 programid = other.programid; 198 201 catType = other.catType; … … 286 289 FLOAT_TO_LIST(stars) 287 290 DATETIME_TO_LIST(QDateTime(originalAirDate)) 288 291 INT_TO_LIST(hasAirDate) 292 FLOAT_TO_LIST(timestretch); 289 293 } 290 294 291 295 /** \fn ProgramInfo::FromStringList(QStringList&,int) … … 382 386 FLOAT_FROM_LIST(stars) 383 387 DATE_FROM_LIST(originalAirDate); 384 388 INT_FROM_LIST(hasAirDate); 389 FLOAT_FROM_LIST(timestretch); 385 390 386 391 return true; 387 392 } … … 546 551 progMap["REPEAT"] = ""; 547 552 progMap["LONGREPEAT"] = ""; 548 553 } 554 555 progMap["timestretch"] = QString::number(timestretch, 'f', 2); 549 556 550 557 progMap["seriesid"] = seriesid; 551 558 progMap["programid"] = programid; … … 692 699 "channel.callsign,channel.name,channel.commfree, " 693 700 "channel.outputfilters,seriesid,programid,filesize, " 694 701 "lastmodified,stars,previouslyshown,originalairdate, " 695 "hostname,recordid,transcoder "702 "hostname,recordid,transcoder,timestretch " 696 703 "FROM recorded " 697 704 "LEFT JOIN channel " 698 705 "ON recorded.chanid = channel.chanid " … … 752 759 753 760 proginfo->programflags = proginfo->getProgramFlags(); 754 761 762 proginfo->timestretch = query.value(21).toString().toFloat(); 763 755 764 return proginfo; 756 765 } 757 766 … … 1213 1222 query.prepare("INSERT INTO recorded (chanid,starttime,endtime,title," 1214 1223 " subtitle,description,hostname,category,recgroup," 1215 1224 " autoexpire,recordid,seriesid,programid,stars," 1216 " previouslyshown,originalairdate,findid,transcoder)" 1225 " previouslyshown,originalairdate,findid,transcoder," 1226 " timestretch)" 1217 1227 " VALUES(:CHANID,:STARTS,:ENDS,:TITLE,:SUBTITLE,:DESC," 1218 1228 " :HOSTNAME,:CATEGORY,:RECGROUP,:AUTOEXP,:RECORDID," 1219 1229 " :SERIESID,:PROGRAMID,:STARS,:REPEAT,:ORIGAIRDATE," 1220 " :FINDID,:TRANSCODER );");1230 " :FINDID,:TRANSCODER,:TIMESTRETCH);"); 1221 1231 query.bindValue(":CHANID", chanid); 1222 1232 query.bindValue(":STARTS", starts); 1223 1233 query.bindValue(":ENDS", ends); … … 1236 1246 query.bindValue(":REPEAT", repeat); 1237 1247 query.bindValue(":ORIGAIRDATE", originalAirDate); 1238 1248 query.bindValue(":TRANSCODER", record->GetTranscoder()); 1249 query.bindValue(":TIMESTRETCH", timestretch); 1239 1250 1240 1251 if (!query.exec() || !query.isActive()) 1241 1252 MythContext::DBError("WriteRecordedToDB", query); -
libs/libmythtv/scheduledrecording.cpp
43 43 inactive = NULL; 44 44 searchType = ""; 45 45 searchForWhat = ""; 46 timestretchid = NULL; 46 47 47 48 longChannelFormat = gContext->GetSetting("LongChannelFormat", "<num> <name>"); 48 49 channelFormat = gContext->GetSetting("ChannelFormat", "<num> <sign>"); … … 785 786 recgroup->setValue("Default"); 786 787 787 788 inactive->setValue(0); 789 790 timestretchid->fillSelections(); 791 timestretchid->setValue(QString::number(1.0f, 'f', 2)); 788 792 } 789 793 790 794 void ScheduledRecording::setProgram(ProgramInfo *proginfo) -
libs/libmyth/mythcontext.h
162 162 }; 163 163 164 164 #define MYTH_BINARY_VERSION "0.19.20050712-1" 165 #define MYTH_PROTO_VERSION "1 7"165 #define MYTH_PROTO_VERSION "18" 166 166 167 167 extern int print_verbose_messages; 168 168 -
programs/mythbackend/mainserver.cpp
888 888 "record.recordid,outputfilters," 889 889 "recorded.seriesid,recorded.programid,recorded.filesize, " 890 890 "recorded.lastmodified, recorded.findid, " 891 "recorded.originalairdate "891 "recorded.originalairdate, recorded.timestretch " 892 892 "FROM recorded " 893 893 "LEFT JOIN record ON recorded.recordid = record.recordid " 894 894 "LEFT JOIN channel ON recorded.chanid = channel.chanid " … … 952 952 proginfo->hasAirDate = true; 953 953 } 954 954 955 proginfo->timestretch = query.value(27).toString().toFloat(); 956 955 957 if (proginfo->hostname.isEmpty() || proginfo->hostname.isNull()) 956 958 proginfo->hostname = gContext->GetHostName(); 957 959 -
programs/mythbackend/scheduler.cpp
1723 1723 "cardinput.cardinputid, UPPER(cardinput.shareable) = 'Y' AS shareable, " 1724 1724 "program.seriesid, program.programid, program.category_type, " 1725 1725 "program.airdate, program.stars, program.originalairdate, record.inactive, " 1726 "record.parentid, ") + progfindid + QString(1726 "record.parentid, ") + progfindid + ", record.tsdefault " + QString( 1727 1727 "FROM recordmatch " 1728 1728 1729 1729 " INNER JOIN record ON (recordmatch.recordid = record.recordid) " … … 1862 1862 bool inactive = result.value(33).toInt(); 1863 1863 p->parentid = result.value(34).toInt(); 1864 1864 p->findid = result.value(35).toInt(); 1865 p->timestretch = result.value(36).toString().toFloat(); 1865 1866 1866 1867 if (!recTypeRecPriorityMap.contains(p->rectype)) 1867 1868 recTypeRecPriorityMap[p->rectype] = … … 2052 2053 "record.subtitle, record.description, record.recpriority, record.type, " 2053 2054 "channel.name, record.recordid, record.recgroup, record.dupin, " 2054 2055 "record.dupmethod, channel.commfree, channel.channum, record.station, " 2055 "record.seriesid, record.programid, record.category, record.findid " 2056 "record.seriesid, record.programid, record.category, record.findid, " 2057 "record.tsdefault" 2056 2058 "FROM record " 2057 2059 "LEFT JOIN channel ON channel.callsign = record.station " 2058 2060 "GROUP BY recordid " … … 2112 2114 proginfo->programid = result.value(19).toString(); 2113 2115 proginfo->category = result.value(20).toString(); 2114 2116 proginfo->findid = result.value(21).toInt(); 2117 proginfo->timestretch = result.value(22).toString().toFloat(); 2115 2118 2116 2119 proginfo->recstartts = proginfo->startts; 2117 2120 proginfo->recendts = proginfo->endts;
