- Something
- Tuesday, June 7th, 2011 at 7:38:13pm MDT
- diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
- index 47a4fa0..b1fd7f7 100644
- --- a/mythtv/libs/libmyth/programinfo.cpp
- +++ b/mythtv/libs/libmyth/programinfo.cpp
- @@ -3391,6 +3391,37 @@ void ProgramInfo::SaveTotalDuration(int64_t duration)
- MythDB::DBError("Duration insert", query);
- }
- +/// \brief Store the Total Frames at frame 0 in the recordedmarkup table
- +void ProgramInfo::SaveTotalFrames(int64_t frames)
- +{
- + if (!IsRecording())
- + return;
- +
- + MSqlQuery query(MSqlQuery::InitCon());
- +
- + query.prepare("DELETE FROM recordedmarkup "
- + " WHERE chanid=:CHANID "
- + " AND starttime=:STARTTIME "
- + " AND type=:TYPE");
- + query.bindValue(":CHANID", chanid);
- + query.bindValue(":STARTTIME", recstartts);
- + query.bindValue(":TYPE", MARK_FRAMES);
- +
- + if (!query.exec())
- + MythDB::DBError("Frames delete", query);
- +
- + query.prepare("INSERT INTO recordedmarkup"
- + " (chanid, starttime, mark, type, data)"
- + " VALUES"
- + " ( :CHANID, :STARTTIME, 0, :TYPE, :DATA);");
- + query.bindValue(":CHANID", chanid);
- + query.bindValue(":STARTTIME", recstartts);
- + query.bindValue(":TYPE", MARK_FRAMES);
- + query.bindValue(":DATA", (uint)(frames));
- +
- + if (!query.exec())
- + MythDB::DBError("Frames insert", query);
- +}
- /// \brief Store the Resolution at frame in the recordedmarkup table
- /// \note All frames until the next one with a stored resolution
- @@ -3500,6 +3531,14 @@ int64_t ProgramInfo::QueryTotalDuration(void) const
- return msec * 1000;
- }
- +/** \brief If present in recording this loads total frames of the
- + * main video stream from database's stream markup table.
- + */
- +int64_t ProgramInfo::QueryTotalFrames(void) const
- +{
- + int64_t frames = load_markup_datum(MARK_FRAMES, chanid, recstartts);
- + return frames;
- +}
- void ProgramInfo::SaveResolutionProperty(VideoProperty vid_flags)
- {
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.
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.