Ticket #6032: HDicons.codechanges.noPBB.011208.diff
File HDicons.codechanges.noPBB.011208.diff, 6.3 KB (added by , 17 years ago) |
---|
-
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 = "122 8";21 const QString currentDatabaseVersion = "1229"; 22 22 23 23 static bool UpdateDBVersionNumber(const QString &newnumber); 24 24 static bool performActualUpdate( … … 4396 4396 return false; 4397 4397 } 4398 4398 4399 if (dbver == "1228") 4400 { 4401 const char *updates[] = { 4402 "ALTER TABLE recordedprogram CHANGE COLUMN videoprop videoprop " 4403 " SET('HDTV', 'WIDESCREEN', 'AVC', '720', '1080') NOT NULL; ", 4404 NULL 4405 }; 4406 if (!performActualUpdate(updates, "1229", dbver)) 4407 return false; 4408 } 4409 4399 4410 return true; 4400 4411 } 4401 4412 -
libs/libmythtv/progdetails.cpp
338 338 attr += QObject::tr("Widescreen") + ", "; 339 339 if (videoprop & VID_AVC) 340 340 attr += QObject::tr("AVC/H.264") + ", "; 341 if (videoprop & VID_720) 342 attr += QObject::tr("720p Resolution") + ", "; 343 if (videoprop & VID_1080) 344 attr += QObject::tr("1080i/p Resolution") + ", "; 341 345 342 346 if (subtype & SUB_HARDHEAR) 343 347 attr += QObject::tr("CC","Closed Captioned") + ", "; -
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; -
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); -
libs/libmythtv/programinfo.cpp
3049 3049 MythDB::DBError("Resolution insert", query); 3050 3050 } 3051 3051 3052 /** \fn ProgramInfo::GetHeight(void) 3053 * \brief Gets overall average height. 3054 */ 3055 int ProgramInfo::GetHeight(void) 3056 { 3057 MSqlQuery query(MSqlQuery::InitCon()); 3058 3059 query.prepare("SELECT recordedmarkup.DATA FROM recordedmarkup" 3060 " WHERE recordedmarkup.chanid = :CHANID" 3061 " AND recordedmarkup.starttime = :STARTTIME" 3062 " AND recordedmarkup.type = 31" 3063 " GROUP BY recordedmarkup.data ORDER BY" 3064 " SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)" 3065 " FROM recordedmarkup AS rm WHERE rm.chanid = recordedmarkup.chanid" 3066 " AND rm.starttime = recordedmarkup.starttime AND" 3067 " rm.type = recordedmarkup.type AND" 3068 " rm.mark > recordedmarkup.mark" 3069 " ORDER BY rm.mark ASC LIMIT 1)" 3070 " - recordedmarkup.mark) DESC LIMIT 1;"); 3071 query.bindValue(":CHANID", chanid); 3072 query.bindValue(":STARTTIME", recstartts); 3073 3074 if (query.exec() && query.isActive() && query.size() > 0) 3075 { 3076 query.next(); 3077 tall = query.value(0).toInt(); 3078 } 3079 else 3080 tall = 0; 3081 3082 return tall; 3083 } 3084 3085 /** \fn ProgramInfo::SetVidpropHeight(int height) 3086 * \brief Sets overall average height flag in videoprops. 3087 */ 3088 void ProgramInfo::SetVidpropHeight(int height) 3089 { 3090 3091 MSqlQuery query(MSqlQuery::InitCon()); 3092 3093 query.prepare("UPDATE recordedprogram SET videoprop =" 3094 " CONCAT_WS(',', IF(videoprop = '', NULL, videoprop), :VALUE)" 3095 " WHERE chanid = :CHANID AND starttime = :STARTTIME;"); 3096 3097 if (height > 700 && height < 800) 3098 { 3099 VERBOSE(VB_IMPORTANT, QString("Recording designated 720p because height was %1").arg(height)); 3100 videoproperties |= VID_720; 3101 3102 query.bindValue(":VALUE", "720"); 3103 query.bindValue(":CHANID", chanid); 3104 query.bindValue(":STARTTIME", startts); 3105 3106 query.exec(); 3107 if (!query.isActive()) 3108 MythDB::DBError("UpdateRes", query); 3109 3110 } 3111 else if (height > 1000 && height < 1100) 3112 { 3113 VERBOSE(VB_IMPORTANT, QString("Recording designated 1080i/p because height was %1").arg(height)); 3114 videoproperties |= VID_1080; 3115 3116 query.bindValue(":VALUE", "1080"); 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 else 3125 { 3126 VERBOSE(VB_IMPORTANT, QString("Unknown type, recording height was %1").arg(height)); 3127 return; 3128 } 3129 } 3130 3131 3052 3132 /** \fn ProgramInfo::ReactivateRecording(void) 3053 3133 * \brief Asks the scheduler to restart this recording if possible. 3054 3134 */