Ticket #6032: resflagging.diff
File resflagging.diff, 5.1 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/programinfo.h
321 321 322 322 // Resolution Set/Get 323 323 void SetResolution(uint width, uint height, long long frame); 324 int GetWidth(void); 324 325 int GetHeight(void); 325 void SetVidpropHeight(int height);326 void SetVidpropHeight(int width); 326 327 327 328 // GUI stuff 328 329 void showDetails(void) const; … … 359 360 QString chanstr; 360 361 QString chansign; 361 362 QString channame; 363 uint m_videoWidth; 362 364 uint m_videoHeight; 363 365 364 366 int recpriority; -
libs/libmythtv/programinfo.cpp
160 160 161 161 record = NULL; 162 162 163 m_videoWidth = 0; 163 164 m_videoHeight = 0; 164 165 } 165 166 … … 265 266 lastInUseTime = other.lastInUseTime; 266 267 record = NULL; 267 268 269 m_videoWidth = other.m_videoWidth; 268 270 m_videoHeight = other.m_videoHeight; 269 271 270 272 positionMapDBReplacement = other.positionMapDBReplacement; … … 3099 3101 return m_videoHeight; 3100 3102 } 3101 3103 3102 /** \fn ProgramInfo::SetVidpropHeight(int height) 3104 /** \fn ProgramInfo::GetWidth(void) 3105 * \brief Gets overall average width. 3106 */ 3107 int ProgramInfo::GetWidth(void) 3108 { 3109 MSqlQuery query(MSqlQuery::InitCon()); 3110 3111 query.prepare("SELECT recordedmarkup.DATA FROM recordedmarkup" 3112 " WHERE recordedmarkup.chanid = :CHANID" 3113 " AND recordedmarkup.starttime = :STARTTIME" 3114 " AND recordedmarkup.type = 30" 3115 " GROUP BY recordedmarkup.data ORDER BY" 3116 " SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)" 3117 " FROM recordedmarkup AS rm WHERE rm.chanid = recordedmarkup.chanid" 3118 " AND rm.starttime = recordedmarkup.starttime AND" 3119 " rm.type = recordedmarkup.type AND" 3120 " rm.mark > recordedmarkup.mark" 3121 " ORDER BY rm.mark ASC LIMIT 1)" 3122 " - recordedmarkup.mark) DESC LIMIT 1;"); 3123 query.bindValue(":CHANID", chanid); 3124 query.bindValue(":STARTTIME", recstartts); 3125 3126 if (query.exec() && query.next()) 3127 { 3128 m_videoWidth = query.value(0).toInt(); 3129 } 3130 else 3131 m_videoWidth = 0; 3132 3133 return m_videoWidth; 3134 } 3135 3136 /** \fn ProgramInfo::SetVidpropHeight(int width) 3103 3137 * \brief Sets overall average height flag in videoprops. 3104 3138 */ 3105 void ProgramInfo::SetVidpropHeight(int height)3139 void ProgramInfo::SetVidpropHeight(int width) 3106 3140 { 3107 3141 MSqlQuery query(MSqlQuery::InitCon()); 3108 3142 … … 3110 3144 " CONCAT_WS(',', IF(videoprop = '', NULL, videoprop), :VALUE)" 3111 3145 " WHERE chanid = :CHANID AND starttime = :STARTTIME;"); 3112 3146 3113 if ( height > 700 && height < 800)3147 if (width > 1300) 3114 3148 { 3115 VERBOSE(VB_IMPORTANT, QString("Recording designated 720p because height was %1").arg(height));3116 videoproperties |= VID_ 720;3149 VERBOSE(VB_IMPORTANT, QString("Recording designated 1080i/p because width was %1").arg(width)); 3150 videoproperties |= VID_1080; 3117 3151 3118 query.bindValue(":VALUE", " 720");3152 query.bindValue(":VALUE", "1080"); 3119 3153 query.bindValue(":CHANID", chanid); 3120 3154 query.bindValue(":STARTTIME", startts); 3121 3155 3122 3156 if (!query.exec()) 3123 3157 MythDB::DBError("UpdateRes", query); 3124 3125 3158 } 3126 else if ( height > 1000 && height < 1100)3159 else if (width > 800) 3127 3160 { 3128 VERBOSE(VB_IMPORTANT, QString("Recording designated 1080i/p because height was %1").arg(height));3129 videoproperties |= VID_ 1080;3161 VERBOSE(VB_IMPORTANT, QString("Recording designated 720p because width was %1").arg(width)); 3162 videoproperties |= VID_720; 3130 3163 3131 query.bindValue(":VALUE", " 1080");3164 query.bindValue(":VALUE", "720"); 3132 3165 query.bindValue(":CHANID", chanid); 3133 3166 query.bindValue(":STARTTIME", startts); 3134 3167 … … 3137 3170 } 3138 3171 else 3139 3172 { 3140 VERBOSE(VB_IMPORTANT, QString("Unknown type, recording height was %1").arg(height));3173 VERBOSE(VB_IMPORTANT, QString("Unknown type, recording width was %1").arg(width)); 3141 3174 return; 3142 3175 } 3143 3176 3144 m_video Height = height;3177 m_videoWidth = width; 3145 3178 } 3146 3179 3147 3180 -
libs/libmythtv/tv_rec.cpp
1086 1086 { 1087 1087 pauseNotify = false; 1088 1088 ispip = false; 1089 int rec Height;1089 int recWidth; 1090 1090 1091 1091 if (recorder && HasFlags(kFlagRecorderRunning)) 1092 1092 { 1093 // Get the heightand set the videoprops1094 rec Height = curRecording->GetHeight();1095 curRecording->SetVidpropHeight(rec Height);1093 // Get the width and set the videoprops 1094 recWidth = curRecording->GetWidth(); 1095 curRecording->SetVidpropHeight(recWidth); 1096 1096 1097 1097 int secsSince = curRecording->recstartts 1098 1098 .secsTo(QDateTime::currentDateTime());