Ticket #6032: HDIcons.NoPBB.022309.diff
File HDIcons.NoPBB.022309.diff, 6.4 KB (added by , 15 years ago) |
---|
-
mythtv/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 = "123 1";21 const QString currentDatabaseVersion = "1232"; 22 22 23 23 static bool UpdateDBVersionNumber(const QString &newnumber); 24 24 static bool performActualUpdate( … … 4444 4444 if (!performActualUpdate(updates, "1231", dbver)) 4445 4445 return false; 4446 4446 } 4447 if (dbver == "1231") 4448 { 4449 const char *updates[] = { 4450 "ALTER TABLE recordedprogram CHANGE COLUMN videoprop videoprop " 4451 " SET('HDTV', 'WIDESCREEN', 'AVC', '720', '1080') NOT NULL; ", 4452 NULL 4453 }; 4454 if (!performActualUpdate(updates, "1232", dbver)) 4455 return false; 4456 } 4447 4457 4448 4458 return true; 4449 4459 } -
mythtv/libs/libmythtv/progdetails.cpp
332 332 attr += QObject::tr("Widescreen") + ", "; 333 333 if (videoprop & VID_AVC) 334 334 attr += QObject::tr("AVC/H.264") + ", "; 335 if (videoprop & VID_720) 336 attr += QObject::tr("720p Resolution") + ", "; 337 if (videoprop & VID_1080) 338 attr += QObject::tr("1080i/p Resolution") + ", "; 335 339 336 340 if (subtype & SUB_HARDHEAR) 337 341 attr += QObject::tr("CC","Closed Captioned") + ", "; -
mythtv/libs/libmythtv/programinfo.h
95 95 VID_HDTV = 0x01, 96 96 VID_WIDESCREEN = 0x02, 97 97 VID_AVC = 0x04, 98 VID_720 = 0x08, 99 VID_1080 = 0x10, 98 100 }; 99 101 100 102 // if SubtitleTypes changes, the audioprop column in program and … … 317 319 void SetAspectChange(MarkTypes type, long long frame, 318 320 uint customAspect); 319 321 320 // Resolution Set 322 // Resolution Set/Get 321 323 void SetResolution(uint width, uint height, long long frame); 324 int GetHeight(void); 325 void SetVidpropHeight(int height); 322 326 323 327 // GUI stuff 324 328 void showDetails(void) const; … … 355 359 QString chanstr; 356 360 QString chansign; 357 361 QString channame; 362 uint tall; 358 363 359 360 364 int recpriority; 361 365 QString recgroup; 362 366 QString playgroup; -
mythtv/libs/libmythtv/tv_rec.cpp
1083 1083 int filelen = -1; 1084 1084 pauseNotify = false; 1085 1085 ispip = false; 1086 int recHeight; 1086 1087 1087 1088 if (recorder && HasFlags(kFlagRecorderRunning)) 1088 1089 { … … 1090 1091 // may not be constant if using a DTV based recorder. 1091 1092 filelen = (int)((float)GetFramesWritten() / GetFramerate()); 1092 1093 1094 // Get the height and set the videoprops 1095 recHeight = curRecording->GetHeight(); 1096 curRecording->SetVidpropHeight(recHeight); 1097 1093 1098 QString message = QString("DONE_RECORDING %1 %2") 1094 1099 .arg(cardid).arg(filelen); 1095 1100 MythEvent me(message); -
mythtv/libs/libmythtv/programinfo.cpp
3064 3064 MythDB::DBError("Resolution insert", query); 3065 3065 } 3066 3066 3067 /** \fn ProgramInfo::GetHeight(void) 3068 * \brief Gets overall average height. 3069 */ 3070 int ProgramInfo::GetHeight(void) 3071 { 3072 MSqlQuery query(MSqlQuery::InitCon()); 3073 3074 query.prepare("SELECT recordedmarkup.DATA FROM recordedmarkup" 3075 " WHERE recordedmarkup.chanid = :CHANID" 3076 " AND recordedmarkup.starttime = :STARTTIME" 3077 " AND recordedmarkup.type = 31" 3078 " GROUP BY recordedmarkup.data ORDER BY" 3079 " SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)" 3080 " FROM recordedmarkup AS rm WHERE rm.chanid = recordedmarkup.chanid" 3081 " AND rm.starttime = recordedmarkup.starttime AND" 3082 " rm.type = recordedmarkup.type AND" 3083 " rm.mark > recordedmarkup.mark" 3084 " ORDER BY rm.mark ASC LIMIT 1)" 3085 " - recordedmarkup.mark) DESC LIMIT 1;"); 3086 query.bindValue(":CHANID", chanid); 3087 query.bindValue(":STARTTIME", recstartts); 3088 3089 if (query.exec() && query.next()) 3090 { 3091 tall = query.value(0).toInt(); 3092 } 3093 else 3094 tall = 0; 3095 3096 return tall; 3097 } 3098 3099 /** \fn ProgramInfo::SetVidpropHeight(int height) 3100 * \brief Sets overall average height flag in videoprops. 3101 */ 3102 void ProgramInfo::SetVidpropHeight(int height) 3103 { 3104 3105 MSqlQuery query(MSqlQuery::InitCon()); 3106 3107 query.prepare("UPDATE recordedprogram SET videoprop =" 3108 " CONCAT_WS(',', IF(videoprop = '', NULL, videoprop), :VALUE)" 3109 " WHERE chanid = :CHANID AND starttime = :STARTTIME;"); 3110 3111 if (height > 700 && height < 800) 3112 { 3113 VERBOSE(VB_IMPORTANT, QString("Recording designated 720p because height was %1").arg(height)); 3114 videoproperties |= VID_720; 3115 3116 query.bindValue(":VALUE", "720"); 3117 query.bindValue(":CHANID", chanid); 3118 query.bindValue(":STARTTIME", startts); 3119 3120 query.exec(); 3121 if (!query.isActive()) 3122 MythDB::DBError("UpdateRes", query); 3123 3124 } 3125 else if (height > 1000 && height < 1100) 3126 { 3127 VERBOSE(VB_IMPORTANT, QString("Recording designated 1080i/p because height was %1").arg(height)); 3128 videoproperties |= VID_1080; 3129 3130 query.bindValue(":VALUE", "1080"); 3131 query.bindValue(":CHANID", chanid); 3132 query.bindValue(":STARTTIME", startts); 3133 3134 query.exec(); 3135 if (!query.isActive()) 3136 MythDB::DBError("UpdateRes", query); 3137 } 3138 else 3139 { 3140 VERBOSE(VB_IMPORTANT, QString("Unknown type, recording height was %1").arg(height)); 3141 return; 3142 } 3143 } 3144 3145 3067 3146 /** \fn ProgramInfo::ReactivateRecording(void) 3068 3147 * \brief Asks the scheduler to restart this recording if possible. 3069 3148 */