Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Something
Tuesday, June 7th, 2011 at 7:38:13pm MDT 

  1. diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
  2. index 47a4fa0..b1fd7f7 100644
  3. --- a/mythtv/libs/libmyth/programinfo.cpp
  4. +++ b/mythtv/libs/libmyth/programinfo.cpp
  5. @@ -3391,6 +3391,37 @@ void ProgramInfo::SaveTotalDuration(int64_t duration)
  6.          MythDB::DBError("Duration insert", query);
  7.  }
  8.  
  9. +/// \brief Store the Total Frames at frame 0 in the recordedmarkup table
  10. +void ProgramInfo::SaveTotalFrames(int64_t frames)
  11. +{
  12. +    if (!IsRecording())
  13. +        return;
  14. +
  15. +    MSqlQuery query(MSqlQuery::InitCon());
  16. +
  17. +    query.prepare("DELETE FROM recordedmarkup "
  18. +                  " WHERE chanid=:CHANID "
  19. +                  " AND starttime=:STARTTIME "
  20. +                  " AND type=:TYPE");
  21. +    query.bindValue(":CHANID", chanid);
  22. +    query.bindValue(":STARTTIME", recstartts);
  23. +    query.bindValue(":TYPE", MARK_FRAMES);
  24. +
  25. +    if (!query.exec())
  26. +        MythDB::DBError("Frames delete", query);
  27. +
  28. +    query.prepare("INSERT INTO recordedmarkup"
  29. +                  "    (chanid, starttime, mark, type, data)"
  30. +                  "    VALUES"
  31. +                  " ( :CHANID, :STARTTIME, 0, :TYPE, :DATA);");
  32. +    query.bindValue(":CHANID", chanid);
  33. +    query.bindValue(":STARTTIME", recstartts);
  34. +    query.bindValue(":TYPE", MARK_FRAMES);
  35. +    query.bindValue(":DATA", (uint)(frames));
  36. +
  37. +    if (!query.exec())
  38. +        MythDB::DBError("Frames insert", query);
  39. +}
  40.  
  41.  /// \brief Store the Resolution at frame in the recordedmarkup table
  42.  /// \note  All frames until the next one with a stored resolution
  43. @@ -3500,6 +3531,14 @@ int64_t ProgramInfo::QueryTotalDuration(void) const
  44.      return msec * 1000;
  45.  }
  46.  
  47. +/** \brief If present in recording this loads total frames of the
  48. + *         main video stream from database's stream markup table.
  49. + */
  50. +int64_t ProgramInfo::QueryTotalFrames(void) const
  51. +{
  52. +    int64_t frames = load_markup_datum(MARK_FRAMES, chanid, recstartts);
  53. +    return frames;
  54. +}
  55.  
  56.  void ProgramInfo::SaveResolutionProperty(VideoProperty vid_flags)
  57.  {

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right fantasy-obligation