mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
Merge branch 'master' into multituner
This commit is contained in:
@@ -1474,6 +1474,8 @@ const char * CRCInput::getSpecialKeyName(const unsigned int key)
|
||||
return "analog on";
|
||||
case RC_analog_off:
|
||||
return "analog off";
|
||||
case RC_www:
|
||||
return "window print";
|
||||
default:
|
||||
printf("unknown key: %d (0x%x) \n", key, key);
|
||||
return "unknown";
|
||||
|
@@ -1191,7 +1191,7 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey )
|
||||
snprintf(rec_msg1, sizeof(rec_msg1)-1, "%s", g_Locale->getText(LOCALE_RECORDINGMENU_MULTIMENU_ASK_STOP_ALL));
|
||||
snprintf(rec_msg, sizeof(rec_msg)-1, rec_msg1, records);
|
||||
if(ShowMsgUTF(LOCALE_SHUTDOWN_RECODING_QUERY, rec_msg,
|
||||
CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes)
|
||||
CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrYes)
|
||||
{
|
||||
snprintf(rec_msg1, sizeof(rec_msg1)-1, "%s", g_Locale->getText(LOCALE_RECORDINGMENU_MULTIMENU_INFO_STOP_ALL));
|
||||
// focus: i think no sense for 2 loops, because this code run in the same thread as neutrino,
|
||||
@@ -1348,9 +1348,15 @@ bool CRecordManager::ShowMenu(void)
|
||||
mode_icon = NEUTRINO_ICON_AUTO_SHIFT;
|
||||
|
||||
sprintf(cnt, "%d", i);
|
||||
item = new CMenuForwarderNonLocalized(title.c_str(), true, NULL,
|
||||
selector, cnt, CRCInput::convertDigitToKey((rec_count == 1) ? 0 : shortcut++), NULL, mode_icon);
|
||||
item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
|
||||
//define stop key if only one record is running, otherwise define shortcuts
|
||||
neutrino_msg_t rc_key = CRCInput::convertDigitToKey(shortcut++);
|
||||
std::string btn_icon = NEUTRINO_ICON_BUTTON_OKAY;
|
||||
if (rec_count == 1){
|
||||
rc_key = CRCInput::RC_stop;
|
||||
btn_icon = NEUTRINO_ICON_BUTTON_STOP;
|
||||
}
|
||||
item = new CMenuForwarderNonLocalized(title.c_str(), true, NULL, selector, cnt, rc_key, NULL, mode_icon);
|
||||
item->setItemButton(btn_icon, true);
|
||||
|
||||
//if only one recording is running, set the focus to this menu item
|
||||
menu.addItem(item, rec_count == 1 ? true: false);
|
||||
@@ -1362,8 +1368,8 @@ bool CRecordManager::ShowMenu(void)
|
||||
{
|
||||
menu.addItem(GenericMenuSeparatorLine);
|
||||
iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_STOP_ALL, true, NULL,
|
||||
this, "StopAll", CRCInput::convertDigitToKey(0));
|
||||
iteml->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
|
||||
this, "StopAll", CRCInput::RC_stop);
|
||||
iteml->setItemButton(NEUTRINO_ICON_BUTTON_STOP, true);
|
||||
|
||||
//if more than one recording is running, set the focus to menu item 'stopp all records'
|
||||
menu.addItem(iteml, rec_count > 1 ? true: false);
|
||||
@@ -1677,6 +1683,20 @@ bool CRecordManager::MountDirectory(const char *recordingDir)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool CRecordManager::IsFileRecord(std::string file)
|
||||
{
|
||||
mutex.lock();
|
||||
for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) {
|
||||
CRecordInstance * inst = it->second;
|
||||
if ((((std::string)inst->GetFileName()) + ".ts") == file) {
|
||||
mutex.unlock();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
mutex.unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0 // not used, saved in case we needed it
|
||||
extern bool autoshift_delete;
|
||||
bool CRecordManager::LinkTimeshift()
|
||||
|
@@ -216,5 +216,6 @@ class CRecordManager : public CMenuTarget, public CChangeObserver
|
||||
bool IsTimeshift(t_channel_id channel_id=0);
|
||||
void StartTimeshift();
|
||||
int GetRecordMode(const t_channel_id channel_id=0);
|
||||
bool IsFileRecord(std::string file);
|
||||
};
|
||||
#endif
|
||||
|
@@ -59,9 +59,9 @@ CScreenShot::CScreenShot(const std::string fname, screenshot_format_t fmt)
|
||||
fd = NULL;
|
||||
xres = 0;
|
||||
yres = 0;
|
||||
get_video = true;
|
||||
get_osd = false;
|
||||
scale_to_video = false;
|
||||
get_video = g_settings.screenshot_video;
|
||||
get_osd = g_settings.screenshot_mode;
|
||||
scale_to_video = g_settings.screenshot_scale;
|
||||
}
|
||||
|
||||
CScreenShot::~CScreenShot()
|
||||
@@ -355,9 +355,7 @@ void CScreenShot::MakeFileName(const t_channel_id channel_id)
|
||||
CEPGData epgData;
|
||||
unsigned int pos = 0;
|
||||
|
||||
//TODO settings to select screenshot dir ?
|
||||
sprintf(fname, "%s/", g_settings.network_nfs_recordingdir);
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/", g_settings.screenshot_dir.c_str());
|
||||
pos = strlen(fname);
|
||||
|
||||
channel_name = g_Zapit->getChannelName(channel_id);
|
||||
|
Reference in New Issue
Block a user