Advertisement
Guest User

Untitled

a guest
May 6th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.81 KB | None | 0 0
  1. diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
  2. index 1a35c1f..7e3e8dc 100644
  3. --- a/mythtv/libs/libmythtv/recordinginfo.cpp
  4. +++ b/mythtv/libs/libmythtv/recordinginfo.cpp
  5. @@ -104,7 +104,8 @@ RecordingInfo::RecordingInfo(
  6. uint _videoproperties,
  7. uint _audioproperties,
  8. bool _future,
  9. - int _schedorder) :
  10. + int _schedorder,
  11. + uint _mplexid) :
  12. ProgramInfo(
  13. _title, _subtitle, _description, _season, _episode,
  14. _category, _chanid, _chanstr, _chansign, _channame,
  15. @@ -115,6 +116,7 @@ RecordingInfo::RecordingInfo(
  16. savedrecstatus(rsUnknown),
  17. future(_future),
  18. schedorder(_schedorder),
  19. + mplexid(_mplexid),
  20. desiredrecstartts(_startts),
  21. desiredrecendts(_endts),
  22. record(NULL)
  23. @@ -214,6 +216,7 @@ RecordingInfo::RecordingInfo(
  24. savedrecstatus(rsUnknown),
  25. future(false),
  26. schedorder(0),
  27. + mplexid(0),
  28. desiredrecstartts(_startts),
  29. desiredrecendts(_endts),
  30. record(NULL)
  31. @@ -248,6 +251,7 @@ RecordingInfo::RecordingInfo(
  32. savedrecstatus(rsUnknown),
  33. future(false),
  34. schedorder(0),
  35. + mplexid(0),
  36. desiredrecstartts(),
  37. desiredrecendts(),
  38. record(NULL)
  39. @@ -399,6 +403,7 @@ void RecordingInfo::clone(const RecordingInfo &other,
  40. savedrecstatus = other.savedrecstatus;
  41. future = other.future;
  42. schedorder = other.schedorder;
  43. + mplexid = other.mplexid;
  44. desiredrecstartts = other.desiredrecstartts;
  45. desiredrecendts = other.desiredrecendts;
  46. }
  47. @@ -426,6 +431,7 @@ void RecordingInfo::clone(const ProgramInfo &other,
  48. savedrecstatus = rsUnknown;
  49. future = false;
  50. schedorder = 0;
  51. + mplexid = 0;
  52. desiredrecstartts = QDateTime();
  53. desiredrecendts = QDateTime();
  54. }
  55. @@ -441,6 +447,7 @@ void RecordingInfo::clear(void)
  56. savedrecstatus = rsUnknown;
  57. future = false;
  58. schedorder = 0;
  59. + mplexid = 0;
  60. desiredrecstartts = QDateTime();
  61. desiredrecendts = QDateTime();
  62. }
  63. diff --git a/mythtv/libs/libmythtv/recordinginfo.h b/mythtv/libs/libmythtv/recordinginfo.h
  64. index 672bd2e..0e20a75 100644
  65. --- a/mythtv/libs/libmythtv/recordinginfo.h
  66. +++ b/mythtv/libs/libmythtv/recordinginfo.h
  67. @@ -37,6 +37,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
  68. savedrecstatus(rsUnknown),
  69. future(false),
  70. schedorder(0),
  71. + mplexid(0),
  72. desiredrecstartts(),
  73. desiredrecendts(),
  74. record(NULL) {}
  75. @@ -46,6 +47,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
  76. savedrecstatus(other.savedrecstatus),
  77. future(other.future),
  78. schedorder(other.schedorder),
  79. + mplexid(other.mplexid),
  80. desiredrecstartts(other.desiredrecstartts),
  81. desiredrecendts(other.desiredrecendts),
  82. record(NULL) {}
  83. @@ -55,6 +57,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
  84. savedrecstatus(rsUnknown),
  85. future(false),
  86. schedorder(0),
  87. + mplexid(0),
  88. desiredrecstartts(startts),
  89. desiredrecendts(endts),
  90. record(NULL) {}
  91. @@ -64,6 +67,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
  92. savedrecstatus(rsUnknown),
  93. future(false),
  94. schedorder(0),
  95. + mplexid(0),
  96. desiredrecstartts(startts),
  97. desiredrecendts(endts),
  98. record(NULL) {}
  99. @@ -74,6 +78,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
  100. savedrecstatus(rsUnknown),
  101. future(false),
  102. schedorder(0),
  103. + mplexid(0),
  104. desiredrecstartts(startts),
  105. desiredrecendts(endts),
  106. record(NULL) {}
  107. @@ -140,7 +145,8 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
  108. uint videoproperties,
  109. uint audioproperties,
  110. bool future,
  111. - int schedorder);
  112. + int schedorder,
  113. + uint mplexid);
  114.  
  115. /// Create RecordingInfo from 'record'+'channel' tables,
  116. /// user in scheduler.cpp @ ~ 3566 & ~ 3643
  117. @@ -260,6 +266,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
  118. RecStatusType savedrecstatus;
  119. bool future;
  120. int schedorder;
  121. + uint mplexid; // Only valid within the scheduler
  122. QDateTime desiredrecstartts;
  123. QDateTime desiredrecendts;
  124.  
  125. diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
  126. index eed332a..68edb02 100644
  127. --- a/mythtv/programs/mythbackend/scheduler.cpp
  128. +++ b/mythtv/programs/mythbackend/scheduler.cpp
  129. @@ -841,6 +841,7 @@ void Scheduler::SlaveConnected(RecordingList &slavelist)
  130.  
  131. if (sp->GetInputID() && !found)
  132. {
  133. + sp->mplexid = sp->QueryMplexID();
  134. reclist.push_back(new RecordingInfo(*sp));
  135. reclist_changed = true;
  136. sp->AddHistory(false);
  137. @@ -1060,15 +1061,14 @@ bool Scheduler::FindNextConflict(
  138. .arg(p->GetCardID()).arg(q->GetCardID())
  139. .arg(igrp.GetSharedInputGroup(
  140. p->GetInputID(), q->GetInputID()))
  141. - .arg(p->QueryMplexID()).arg(q->QueryMplexID()));
  142. + .arg(p->mplexid).arg(q->mplexid));
  143. }
  144.  
  145. // if two inputs are in the same input group we have a conflict
  146. // unless the programs are on the same multiplex.
  147. if (p->GetCardID() != q->GetCardID())
  148. {
  149. - uint p_mplexid = p->QueryMplexID();
  150. - if (p_mplexid && (p_mplexid == q->QueryMplexID()))
  151. + if (p->mplexid && (p->mplexid == q->mplexid))
  152. continue;
  153. }
  154.  
  155. @@ -1673,6 +1673,7 @@ void Scheduler::AddRecording(const RecordingInfo &pi)
  156. QString("Adding '%1' to reclist.").arg(pi.GetTitle()));
  157.  
  158. RecordingInfo * new_pi = new RecordingInfo(pi);
  159. + new_pi->mplexid = new_pi->QueryMplexID();
  160. reclist.push_back(new_pi);
  161. reclist_changed = true;
  162.  
  163. @@ -4001,7 +4002,8 @@ void Scheduler::AddNewRecords(void)
  164. " p.subtitletypes+0, p.audioprop+0, RECTABLE.storagegroup, "//40-42
  165. " capturecard.hostname, recordmatch.oldrecstatus, NULL, "//43-45
  166. " oldrecstatus.future, cardinput.schedorder, " //46-47
  167. - " p.syndicatedepisodenumber, p.partnumber, p.parttotal, ") + //48-50
  168. + " p.syndicatedepisodenumber, p.partnumber, p.parttotal, " //48-50
  169. + " c.mplexid, ") + //51
  170. pwrpri + QString(
  171. "FROM recordmatch "
  172. "INNER JOIN RECTABLE ON (recordmatch.recordid = RECTABLE.recordid) "
  173. @@ -4060,6 +4062,10 @@ void Scheduler::AddNewRecords(void)
  174. && callsign == lastp->GetChannelSchedulingID())
  175. continue;
  176.  
  177. + uint mplexid = result.value(51).toUInt();
  178. + if (mplexid == 32767)
  179. + mplexid = 0;
  180. +
  181. RecordingInfo *p = new RecordingInfo(
  182. title,
  183. result.value(5).toString(),//subtitle
  184. @@ -4123,7 +4129,8 @@ void Scheduler::AddNewRecords(void)
  185. result.value(39).toUInt(),//videoproperties
  186. result.value(41).toUInt(),//audioproperties
  187. result.value(46).toInt(),//future
  188. - result.value(47).toInt());//schedorder
  189. + result.value(47).toInt(),//schedorder
  190. + mplexid); //mplexid
  191.  
  192. if (!p->future && !p->IsReactivated() &&
  193. p->oldrecstatus != rsAborted &&
  194. @@ -4132,7 +4139,7 @@ void Scheduler::AddNewRecords(void)
  195. p->SetRecordingStatus(p->oldrecstatus);
  196. }
  197.  
  198. - p->SetRecordingPriority2(result.value(51).toInt());
  199. + p->SetRecordingPriority2(result.value(52).toInt());
  200.  
  201. // Check to see if the program is currently recording and if
  202. // the end time was changed. Ideally, checking for a new end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement