[mythtv] HD/HD(type) indicator recorded programs.
MarcT
myrdhn at gmail.com
Mon Jun 21 16:54:56 UTC 2010
-----Original Message-----
From: mythtv-dev-bounces at mythtv.org [mailto:mythtv-dev-bounces at mythtv.org]
On Behalf Of Daniel Kristjansson
Sent: Monday, June 21, 2010 8:30 AM
To: Development of mythtv
Subject: Re: [mythtv] HD/HD(type) indicator recorded programs.
On Sun, 2010-06-20 at 23:04 -0400, MarcT wrote:
> Actually, I may have just identified the cause as the ProgramInfo
> refactoring.
Mark, can you open a ticket with a description of what you're
seeing vs. what you expect to see?
-- Daniel
_______________________________________________
I opened a ticket last night, http://svn.mythtv.org/trac/ticket/8589
There is a specific section of code that was removed that in the programinfo
refactor that never had a similar function added to replace the
functionality of the removed code.
This is the section that was removed
3125 query.prepare("UPDATE recordedprogram SET videoprop ="
3126 " CONCAT_WS(',', IF(videoprop = '', NULL, videoprop), :VALUE)"
3127 " WHERE chanid = :CHANID AND starttime = :STARTTIME;");
3128
3129 if (width > 1300)
3130 {
3131 VERBOSE(VB_GENERAL, LOC +
3132 QString("Recording designated 1080i/p because width
was %1")
3133 .arg(width));
3134 videoproperties |= VID_1080;
3135
3136 query.bindValue(":VALUE", "1080");
3137 query.bindValue(":CHANID", chanid);
3138 query.bindValue(":STARTTIME", startts);
3139
3140 if (!query.exec())
3141 MythDB::DBError("UpdateRes", query);
3142 }
3143 else if (width > 800)
3144 {
3145 VERBOSE(VB_GENERAL, LOC +
3146 QString("Recording designated 720p because width was
%1")
3147 .arg(width));
3148 videoproperties |= VID_720;
3149
3150 query.bindValue(":VALUE", "720");
3151 query.bindValue(":CHANID", chanid);
3152 query.bindValue(":STARTTIME", startts);
3153
3154 if (!query.exec())
3155 MythDB::DBError("UpdateRes", query);
3156 }
3157 else
3158 {
3159 VERBOSE(VB_IMPORTANT, LOC_ERR +
3160 QString("Unknown type, recording width was
%1").arg(width));
3161 return;
3162 }
3163
3164 m_videoWidth = width;
This is the section that was added.
3322 query.prepare(
3323 "UPDATE recordedprogram "
3324 "SET videoprop = ((videoprop+0) & :OTHERFLAGS) | :FLAGS "
3325 "WHERE chanid = :CHANID AND starttime = :STARTTIME");
3326
3327 query.bindValue(":OTHERFLAGS", ~(VID_1080|VID_720));
3328 query.bindValue(":FLAGS", vid_flags);
3329 query.bindValue(":CHANID", chanid);
3330 query.bindValue(":STARTTIME", recstartts);
3331
3332 uint videoproperties = GetVideoProperties();
3333 videoproperties &= (uint16_t) ~(VID_1080|VID_720);
3334 videoproperties |= (uint16_t) vid_flags;
3335 properties &= ~(0x1F<<6);
3336 properties |= videoproperties<<6;
Looking at these it seems that the code to set the value as 720 or 1080 was
removed and no replacement was added.
Here is a select statement from my database from the recordedprogram table
select chanid,starttime,title,videoprop from recordedprogram where title
like 'CSI%' order by starttime;
+--------+---------------------+------------+-----------+
| chanid | starttime | title | videoprop |
+--------+---------------------+------------+-----------+
| 2804 | 2010-05-03 22:01:00 | CSI: Miami | HDTV,1080 |
| 2804 | 2010-05-05 22:00:00 | CSI: NY | HDTV,720 |
| 2804 | 2010-05-10 22:01:00 | CSI: Miami | HDTV,1080 |
| 2804 | 2010-05-12 22:00:00 | CSI: NY | HDTV,1080 |
| 2814 | 2010-05-16 18:00:00 | CSI: Miami | HDTV,1080 |
| 2814 | 2010-05-16 23:00:00 | CSI: Miami | HDTV |
| 2804 | 2010-05-17 22:01:00 | CSI: Miami | HDTV |
| 2804 | 2010-05-19 22:00:00 | CSI: NY | HDTV |
| 2814 | 2010-05-23 18:00:00 | CSI: Miami | HDTV |
+--------+---------------------+------------+-----------+
As you can see the 720/1080 is nolonger being sent to the videoprop column
in the table since the update.
More information about the mythtv-dev
mailing list