Use of One touch recording

- When instant recording the current EPG data will be used for the receiving end.
- Function is switchable separately, original condition is Default.


git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1855 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 3230ff1c58
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2011-11-16 (Wed, 16 Nov 2011)

Origin message was:
------------------
*Use of One touch recording

- When instant recording the current EPG data will be used for the receiving end.
- Function is switchable separately, original condition is Default.


git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1855 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
Michael Liebmann
2011-11-16 21:19:34 +00:00
parent 77d401ac84
commit 112b09a774
8 changed files with 40 additions and 1 deletions

View File

@@ -1129,6 +1129,9 @@ recordingmenu.apids_alt Alternative Tonspuren aufn.
recordingmenu.apids_std Standard Tonspur aufnehmen recordingmenu.apids_std Standard Tonspur aufnehmen
recordingmenu.choose_direct_rec_dir Bei Sofortaufn. Verzeichnisauswahl recordingmenu.choose_direct_rec_dir Bei Sofortaufn. Verzeichnisauswahl
recordingmenu.defdir Aufnahmeverzeichnis recordingmenu.defdir Aufnahmeverzeichnis
recordingmenu.end_of_recording_epg EPG aktuelles Event
recordingmenu.end_of_recording_max max. Aufnahmezeit
recordingmenu.end_of_recording_name Ende der Sofortaufnahme
recordingmenu.epg_for_filename lange Dateinamen (mit EPG-Daten) recordingmenu.epg_for_filename lange Dateinamen (mit EPG-Daten)
recordingmenu.file Direkt (Datei) recordingmenu.file Direkt (Datei)
recordingmenu.filesettings Direktaufnahme Einstellungen recordingmenu.filesettings Direktaufnahme Einstellungen

View File

@@ -1129,6 +1129,9 @@ recordingmenu.apids_alt record alternative streams
recordingmenu.apids_std record standard stream recordingmenu.apids_std record standard stream
recordingmenu.choose_direct_rec_dir choose dir on imm. recording recordingmenu.choose_direct_rec_dir choose dir on imm. recording
recordingmenu.defdir Recording directory recordingmenu.defdir Recording directory
recordingmenu.end_of_recording_epg EPG act. Event
recordingmenu.end_of_recording_max max. Recordingtime
recordingmenu.end_of_recording_name Endtime of Recording
recordingmenu.epg_for_filename long filenames (with EPG data) recordingmenu.epg_for_filename long filenames (with EPG data)
recordingmenu.file direct (file) recordingmenu.file direct (file)
recordingmenu.filesettings direct recording settings recordingmenu.filesettings direct recording settings

View File

@@ -388,7 +388,20 @@ record_error_msg_t CRecordInstance::Record()
//FIXME recording_id (timerd eventID) is 0 means its user recording, in this case timer always added ? //FIXME recording_id (timerd eventID) is 0 means its user recording, in this case timer always added ?
if(ret == RECORD_OK && recording_id == 0) { if(ret == RECORD_OK && recording_id == 0) {
time_t now = time(NULL); time_t now = time(NULL);
recording_id = g_Timerd->addImmediateRecordTimerEvent(channel_id, now, now+g_settings.record_hours*60*60, epgid, epg_time, apidmode); int record_end = now+g_settings.record_hours*60*60;
if (g_settings.recording_epg_for_end)
{
int pre=0, post=0;
CEPGData epgData;
epgData.epg_times.startzeit = 0;
epgData.epg_times.dauer = 0;
if (sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData )) {
g_Timerd->getRecordingSafety(pre, post);
if (epgData.epg_times.startzeit > 0)
record_end = epgData.epg_times.startzeit + epgData.epg_times.dauer + post;
}
}
recording_id = g_Timerd->addImmediateRecordTimerEvent(channel_id, now, record_end, epgid, epg_time, apidmode);
printf("%s: channel %llx -> timer eventID %d\n", __FUNCTION__, channel_id, recording_id); printf("%s: channel %llx -> timer eventID %d\n", __FUNCTION__, channel_id, recording_id);
} }
return ret; return ret;

View File

@@ -160,6 +160,13 @@ const CMenuOptionChooser::keyval CHOOSE_DIRECT_REC_DIR[RECORDINGMENU_RECORDING_T
{2, LOCALE_NFS_LOCALDIR} {2, LOCALE_NFS_LOCALDIR}
}; };
#define END_OF_RECORDING_COUNT 2
const CMenuOptionChooser::keyval END_OF_RECORDING[END_OF_RECORDING_COUNT] =
{
{0, LOCALE_RECORDINGMENU_END_OF_RECORDING_MAX},
{1, LOCALE_RECORDINGMENU_END_OF_RECORDING_EPG}
};
void CRecordSetup::showRecordSetup() void CRecordSetup::showRecordSetup()
{ {
//menue init //menue init
@@ -177,6 +184,10 @@ void CRecordSetup::showRecordSetup()
CMenuOptionChooser* channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); CMenuOptionChooser* channel_rec_dir = new CMenuOptionChooser(LOCALE_RECORDINGMENU_SAVE_IN_CHANNELDIR, &g_settings.recording_save_in_channeldir, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
recordingSettings->addItem(channel_rec_dir); recordingSettings->addItem(channel_rec_dir);
// end of recording
CMenuOptionChooser* end_of_recording = new CMenuOptionChooser(LOCALE_RECORDINGMENU_END_OF_RECORDING_NAME, &g_settings.recording_epg_for_end, END_OF_RECORDING, END_OF_RECORDING_COUNT, true);
recordingSettings->addItem(end_of_recording);
// //template // //template
// CStringInput * recordingSettings_filenameTemplate = new CStringInput(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, &g_settings.recording_filename_template[0], 21, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT, LOCALE_IPSETUP_HINT_2, "%/-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "); // CStringInput * recordingSettings_filenameTemplate = new CStringInput(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, &g_settings.recording_filename_template[0], 21, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT, LOCALE_IPSETUP_HINT_2, "%/-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ");
// CMenuForwarder* mf11 = new CMenuForwarder(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, true, g_settings.recording_filename_template[0],recordingSettings_filenameTemplate); // CMenuForwarder* mf11 = new CMenuForwarder(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, true, g_settings.recording_filename_template[0],recordingSettings_filenameTemplate);

View File

@@ -641,6 +641,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
strcpy( g_settings.recording_ringbuffers, configfile.getString( "recordingmenu.ringbuffers", "20").c_str() ); strcpy( g_settings.recording_ringbuffers, configfile.getString( "recordingmenu.ringbuffers", "20").c_str() );
g_settings.recording_choose_direct_rec_dir = configfile.getInt32( "recording_choose_direct_rec_dir", 0 ); g_settings.recording_choose_direct_rec_dir = configfile.getInt32( "recording_choose_direct_rec_dir", 0 );
g_settings.recording_epg_for_filename = configfile.getBool("recording_epg_for_filename" , true); g_settings.recording_epg_for_filename = configfile.getBool("recording_epg_for_filename" , true);
g_settings.recording_epg_for_end = configfile.getBool("recording_epg_for_end" , false);
g_settings.recording_save_in_channeldir = configfile.getBool("recording_save_in_channeldir" , false); g_settings.recording_save_in_channeldir = configfile.getBool("recording_save_in_channeldir" , false);
g_settings.recording_in_spts_mode = true; g_settings.recording_in_spts_mode = true;
@@ -1178,6 +1179,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setString("recordingmenu.ringbuffers" , g_settings.recording_ringbuffers); configfile.setString("recordingmenu.ringbuffers" , g_settings.recording_ringbuffers);
configfile.setInt32 ("recording_choose_direct_rec_dir" , g_settings.recording_choose_direct_rec_dir); configfile.setInt32 ("recording_choose_direct_rec_dir" , g_settings.recording_choose_direct_rec_dir);
configfile.setBool ("recording_epg_for_filename" , g_settings.recording_epg_for_filename ); configfile.setBool ("recording_epg_for_filename" , g_settings.recording_epg_for_filename );
configfile.setBool ("recording_epg_for_end" , g_settings.recording_epg_for_end );
configfile.setBool ("recording_save_in_channeldir" , g_settings.recording_save_in_channeldir ); configfile.setBool ("recording_save_in_channeldir" , g_settings.recording_save_in_channeldir );
configfile.setBool ("recording_in_spts_mode" , g_settings.recording_in_spts_mode ); configfile.setBool ("recording_in_spts_mode" , g_settings.recording_in_spts_mode );

View File

@@ -1156,6 +1156,9 @@ typedef enum
LOCALE_RECORDINGMENU_APIDS_STD, LOCALE_RECORDINGMENU_APIDS_STD,
LOCALE_RECORDINGMENU_CHOOSE_DIRECT_REC_DIR, LOCALE_RECORDINGMENU_CHOOSE_DIRECT_REC_DIR,
LOCALE_RECORDINGMENU_DEFDIR, LOCALE_RECORDINGMENU_DEFDIR,
LOCALE_RECORDINGMENU_END_OF_RECORDING_EPG,
LOCALE_RECORDINGMENU_END_OF_RECORDING_MAX,
LOCALE_RECORDINGMENU_END_OF_RECORDING_NAME,
LOCALE_RECORDINGMENU_EPG_FOR_FILENAME, LOCALE_RECORDINGMENU_EPG_FOR_FILENAME,
LOCALE_RECORDINGMENU_FILE, LOCALE_RECORDINGMENU_FILE,
LOCALE_RECORDINGMENU_FILESETTINGS, LOCALE_RECORDINGMENU_FILESETTINGS,

View File

@@ -1156,6 +1156,9 @@ const char * locale_real_names[] =
"recordingmenu.apids_std", "recordingmenu.apids_std",
"recordingmenu.choose_direct_rec_dir", "recordingmenu.choose_direct_rec_dir",
"recordingmenu.defdir", "recordingmenu.defdir",
"recordingmenu.end_of_recording_epg",
"recordingmenu.end_of_recording_max",
"recordingmenu.end_of_recording_name",
"recordingmenu.epg_for_filename", "recordingmenu.epg_for_filename",
"recordingmenu.file", "recordingmenu.file",
"recordingmenu.filesettings", "recordingmenu.filesettings",

View File

@@ -250,6 +250,7 @@ struct SNeutrinoSettings
char recording_ringbuffers[10]; char recording_ringbuffers[10];
int recording_choose_direct_rec_dir; int recording_choose_direct_rec_dir;
int recording_epg_for_filename; int recording_epg_for_filename;
int recording_epg_for_end;
int recording_save_in_channeldir; int recording_save_in_channeldir;
int recording_in_spts_mode; int recording_in_spts_mode;
int recording_zap_on_announce; int recording_zap_on_announce;