ZMServer::ZMServer(int sock, bool debug) { if (debug) cout << "Using server protocol version '" << ZM_PROTOCOL_VERSION << "'\n"; m_sock = sock; m_debug = debug; // get the shared memory key char buf[100]; m_shmKey = 0x7a6d2000; string setting = getZMSetting("ZM_SHM_KEY"); if (setting != "") { unsigned long long tmp = m_shmKey; sscanf(setting.c_str(), "%20llx", &tmp); m_shmKey = tmp; } if (m_debug) { snprintf(buf, sizeof(buf), "0x%x", (unsigned int)m_shmKey); cout << "Shared memory key is: " << buf << endl; } // get the MMAP path m_mmapPath = getZMSetting("ZM_PATH_MAP"); if (m_debug) { cout << "Memory path directory is: " << m_mmapPath << endl; } // get the event filename format setting = getZMSetting("ZM_EVENT_IMAGE_DIGITS"); int eventDigits = atoi(setting.c_str()); snprintf(buf, sizeof(buf), "%%0%dd-capture.jpg", eventDigits); m_eventFileFormat = buf; if (m_debug) cout << "Event file format is: " << m_eventFileFormat << endl; // get the analyse filename format snprintf(buf, sizeof(buf), "%%0%dd-analyse.jpg", eventDigits); m_analyseFileFormat = buf; if (m_debug) cout << "Analyse file format is: " << m_analyseFileFormat << endl; // is ZM using the deep storage directory format? m_useDeepStorage = (getZMSetting("ZM_USE_DEEP_STORAGE") == "1"); if (m_debug) { if (m_useDeepStorage) cout << "using deep storage directory structure" << endl; else cout << "using flat directory structure" << endl; } getMonitorList(); }
ZMLivePlayer::ZMLivePlayer(MythScreenStack *parent) :MythScreenType(parent, "zmliveview"), m_frameTimer(new QTimer(this)), m_paused(false), m_monitorLayout(1), m_monitorCount(0), m_players(NULL), m_monitors(NULL) { GetMythUI()->DoDisableScreensaver(); connect(m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame())); getMonitorList(); }
ZMLivePlayer::ZMLivePlayer(MythScreenStack *parent) :MythScreenType(parent, "zmliveview") { m_paused = false; m_players = NULL; m_monitors = NULL; m_monitorLayout = 1; GetMythUI()->DoDisableScreensaver(); m_frameTimer = new QTimer(this); connect(m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame())); getMonitorList(); }