From d621ecb6c8f3e0ded28c7fe20b9d0f2a0d92e5f1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 1 Oct 2011 21:11:52 +0000 Subject: [PATCH] neutrino record: show user messages during starting or stopping recordings git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1724 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6f6cfed0dbdbcade31633cff68cbbba20336d21d Author: Thilo Graf Date: 2011-10-01 (Sat, 01 Oct 2011) Origin message was: ------------------ *neutrino record: show user messages during starting or stopping recordings git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1724 e54a6e83-5905-42d5-8d5c-058d10e6a962 ------------------ This commit was generated by Migit --- src/driver/record.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 4136fe42d..20b8bf914 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -702,6 +702,9 @@ int CRecordManager::GetRecordMode() bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, bool timeshift) { + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, "Start recording...please wait!"); + hintBox.paint(); + CTimerd::RecordingInfo eventinfo; CEPGData epgData; @@ -720,7 +723,9 @@ bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, boo } eventinfo.apids = TIMERD_APIDS_CONF; eventinfo.recordingDir[0] = 0; - + + hintBox.hide(); + return Record(&eventinfo, dir, timeshift); } @@ -739,6 +744,9 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons if(!CheckRecording(eventinfo)) return false; + + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, "Start recording...please wait!"); + hintBox.paint(); #if 1 // FIXME test StopSectionsd = false; @@ -797,6 +805,7 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons mutex.unlock(); if (error_msg == RECORD_OK) { + hintBox.hide(); return true; } else if(!timeshift) { @@ -805,12 +814,15 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons printf("[recordmanager] %s: error code: %d\n", __FUNCTION__, error_msg); //FIXME: Use better error message + hintBox.hide(); DisplayErrorMessage(g_Locale->getText( error_msg == RECORD_BUSY ? LOCALE_STREAMING_BUSY : error_msg == RECORD_INVALID_DIRECTORY ? LOCALE_STREAMING_DIR_NOT_WRITABLE : LOCALE_STREAMING_WRITE_ERROR )); // UTF-8 return false; } + + hintBox.hide(); return true; } @@ -933,8 +945,12 @@ bool CRecordManager::SameTransponder(const t_channel_id channel_id) return same; } + bool CRecordManager::Stop(const t_channel_id channel_id) { + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, "Stopp record...please wait!"); + hintBox.paint(); + printf("%s: %llx\n", __FUNCTION__, channel_id); mutex.lock(); @@ -956,12 +972,18 @@ bool CRecordManager::Stop(const t_channel_id channel_id) StopPostProcess(); + hintBox.hide(); + return (inst != NULL); } bool CRecordManager::Stop(const CTimerd::RecordingStopInfo * recinfo) { bool ret = false; + + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, "Stopp record...please wait!"); + hintBox.paint(); + printf("%s: eventID %d channel_id %llx\n", __FUNCTION__, recinfo->eventID, recinfo->channel_id); mutex.lock(); @@ -996,6 +1018,8 @@ bool CRecordManager::Stop(const CTimerd::RecordingStopInfo * recinfo) StopPostProcess(); + hintBox.hide(); + return ret; }