From 182567d1def550c8a228adbdff899141bbd80d15 Mon Sep 17 00:00:00 2001
From: Roger Siddons <rsiddons@mythtv.org>
Date: Tue, 10 May 2016 17:52:37 +0100
Subject: [PATCH 1/2] 12290: Bill's instrumentation
diff --git a/mythtv/libs/libmythtv/recordingfile.cpp b/mythtv/libs/libmythtv/recordingfile.cpp
index deefe52..3d3eb30 100644
a
|
b
|
|
3 | 3 | |
4 | 4 | #include "mythdbcon.h" |
5 | 5 | #include "mythdb.h" |
| 6 | #include "mythlogging.h" |
6 | 7 | |
7 | 8 | RecordingFile::RecordingFile() |
8 | 9 | : m_recordingId(0), m_storageDeviceID(""), m_storageGroup(""), |
… |
… |
bool RecordingFile::Save() |
73 | 74 | if (m_recordingId == 0) |
74 | 75 | return false; |
75 | 76 | |
| 77 | LOG(VB_RECORD, LOG_INFO, QString("#12290, m_fileSize=%1").arg(m_fileSize)); |
| 78 | |
76 | 79 | MSqlQuery query(MSqlQuery::InitCon()); |
77 | 80 | |
78 | 81 | if (m_fileId > 0) |
diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
index 20e31c1..7fc8632 100644
a
|
b
|
void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) |
933 | 933 | |
934 | 934 | // Generate a preview |
935 | 935 | uint64_t fsize = curRec->GetFilesize(); |
| 936 | LOG(VB_RECORD, LOG_INFO, QString("fsize>=1000 allows previewgen. fsize=%1.").arg(fsize)); |
936 | 937 | if (curRec->IsLocal() && (fsize >= 1000) && |
937 | 938 | (curRec->GetRecordingStatus() == RecStatus::Recorded)) |
938 | 939 | { |
… |
… |
void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) |
957 | 958 | .arg(curRec->GetRecordingEndTime(MythDate::ISODate))); |
958 | 959 | gCoreContext->dispatch(me); |
959 | 960 | } |
960 | | |
| 961 | LOG(VB_RECORD, LOG_INFO, QString("After UPDATE_RECORDING_STATUS, fsize=%1.").arg(fsize)); |
| 962 | |
961 | 963 | // send out REC_FINISHED message |
962 | 964 | SendMythSystemRecEvent("REC_FINISHED", curRec); |
963 | 965 | |
… |
… |
void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) |
968 | 970 | .arg(inputid).arg(secsSince).arg(GetFramesWritten()); |
969 | 971 | MythEvent me(message); |
970 | 972 | gCoreContext->dispatch(me); |
971 | | |
| 973 | LOG(VB_RECORD, LOG_INFO, QString("After DONE_RECORDING, fsize=%1.").arg(fsize)); |
| 974 | |
972 | 975 | // Handle JobQueue |
973 | 976 | QHash<QString,int>::iterator autoJob = |
974 | 977 | autoRunJobs.find(curRec->MakeUniqueKey()); |
… |
… |
void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) |
982 | 985 | autoJob = autoRunJobs.find(curRec->MakeUniqueKey()); |
983 | 986 | } |
984 | 987 | LOG(VB_JOBQUEUE, LOG_INFO, QString("AutoRunJobs 0x%1").arg(*autoJob,0,16)); |
| 988 | LOG(VB_RECORD, LOG_INFO, QString("fsize<1000 disables commflag/xcode. fsize=%1.").arg(fsize)); |
985 | 989 | if ((recgrp == "LiveTV") || (fsize < 1000) || |
986 | 990 | (curRec->GetRecordingStatus() != RecStatus::Recorded) || |
987 | 991 | (curRec->GetRecordingStartTime().secsTo( |