Ticket #6032: HDicons.codechanges.noPBB.diff
File HDicons.codechanges.noPBB.diff, 6.1 KB (added by , 15 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 4407 if (!performActualUpdate(updates, "1229", dbver)) 4408 return false; 4409 } 4410 4399 4411 return true; 4400 4412 } 4401 4413 -
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 … … 316 318 void SetAspectChange(MarkTypes type, long long frame, 317 319 uint customAspect); 318 320 319 // Resolution Set 321 // Resolution Set/Get 320 322 void SetResolution(uint width, uint height, long long frame); 323 int GetHeight(void); 324 void SetVidpropHeight(int height); 321 325 322 326 // GUI stuff 323 327 void showDetails(void) const; … … 354 358 QString chanstr; 355 359 QString chansign; 356 360 QString channame; 361 uint tall; 357 362 358 359 363 int recpriority; 360 364 QString recgroup; 361 365 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
3026 3026 MythDB::DBError("Resolution insert", query); 3027 3027 } 3028 3028 3029 /** \fn ProgramInfo::GetHeight(void) 3030 * \brief Gets overall average height. 3031 */ 3032 int ProgramInfo::GetHeight(void) 3033 { 3034 MSqlQuery query(MSqlQuery::InitCon()); 3035 3036 query.prepare("SELECT recordedmarkup.DATA FROM recordedmarkup" 3037 " WHERE recordedmarkup.chanid = :CHANID" 3038 " AND recordedmarkup.starttime = :STARTTIME" 3039 " AND recordedmarkup.type = 31" 3040 " GROUP BY recordedmarkup.data ORDER BY" 3041 " SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)" 3042 " FROM recordedmarkup AS rm WHERE rm.chanid = recordedmarkup.chanid" 3043 " AND rm.starttime = recordedmarkup.starttime AND" 3044 " rm.type = recordedmarkup.type AND" 3045 " rm.mark > recordedmarkup.mark" 3046 " ORDER BY rm.mark ASC LIMIT 1)" 3047 " - recordedmarkup.mark) DESC LIMIT 1;"); 3048 query.bindValue(":CHANID", chanid); 3049 query.bindValue(":STARTTIME", recstartts); 3050 3051 if (query.exec() && query.isActive() && query.size() > 0) 3052 { 3053 query.next(); 3054 tall = query.value(0).toInt(); 3055 } 3056 else 3057 tall = 0; 3058 3059 return tall; 3060 } 3061 3062 /** \fn ProgramInfo::SetVidpropHeight(int height) 3063 * \brief Sets overall average height flag in videoprops. 3064 */ 3065 void ProgramInfo::SetVidpropHeight(int height) 3066 { 3067 3068 MSqlQuery query(MSqlQuery::InitCon()); 3069 3070 query.prepare("UPDATE recordedprogram SET videoprop =" 3071 " CONCAT_WS(',', IF(videoprop = '', NULL, videoprop), :VALUE)" 3072 " WHERE chanid = :CHANID AND starttime = :STARTTIME;"); 3073 3074 if (height > 700 && height < 800) 3075 { 3076 VERBOSE(VB_IMPORTANT, QString("Recording designated 720p because height was %1").arg(height)); 3077 videoproperties |= VID_720; 3078 3079 query.bindValue(":VALUE", "720"); 3080 query.bindValue(":CHANID", chanid); 3081 query.bindValue(":STARTTIME", startts); 3082 3083 query.exec(); 3084 if (!query.isActive()) 3085 MythDB::DBError("UpdateRes", query); 3086 3087 } 3088 else if (height > 1000 && height < 1100) 3089 { 3090 VERBOSE(VB_IMPORTANT, QString("Recording designated 1080i/p because height was %1").arg(height)); 3091 videoproperties |= VID_1080; 3092 3093 query.bindValue(":VALUE", "1080"); 3094 query.bindValue(":CHANID", chanid); 3095 query.bindValue(":STARTTIME", startts); 3096 3097 query.exec(); 3098 if (!query.isActive()) 3099 MythDB::DBError("UpdateRes", query); 3100 } 3101 else 3102 { 3103 VERBOSE(VB_IMPORTANT, QString("Unknown type, recording height was %1").arg(height)); 3104 return; 3105 } 3106 } 3107 3029 3108 /** \fn ProgramInfo::ReactivateRecording(void) 3030 3109 * \brief Asks the scheduler to restart this recording if possible. 3031 3110 */ … … 3853 3932 attr += QObject::tr("Widescreen") + ", "; 3854 3933 if (videoprop & VID_AVC) 3855 3934 attr += QObject::tr("AVC/H.264") + ", "; 3935 if (videoprop & VID_720) 3936 attr += QObject::tr("720p Resolution") + ", "; 3937 if (videoprop & VID_1080) 3938 attr += QObject::tr("1080i/p Resolution") + ", "; 3856 3939 3857 3940 if (subtype & SUB_HARDHEAR) 3858 3941 attr += QObject::tr("CC","Closed Captioned") + ", ";