Documentation is available at Settings.class.php
- <?php
- class Settings {
- /**
- * Set the name of the dreambox
- * @access private
- * @var string
- */
- private static $dreamboxName = "Yoshie's Dreambox";
- /**
- * Set the local IP address of your dreambox. Should be an internal IP number.
- * @access private
- * @var string
- */
- private static $dreamboxIP = "192.168.5.11";
- /**
- * Set the username for the dreambox webinterface. Leave empty when no authentication is required.
- * @access private
- * @var string
- */
- private static $dreamboxUserName = "";
- /**
- * Set the password for the dreambox webinterface. Leave empty when no authentication is required.
- * @access private
- * @var string
- */
- private static $dreamboxPassword = "";
- /**
- * Set the enigma version of the dreambox. Valid values are enigma1 of enigma2
- * @access private
- * @var string
- */
- private static $dreamboxEnigmaVersion = "enigma2";
- /**
- * Set the streaming protocol. This is the protocal between the VLC server and the dreambox
- * @access private
- * @var string
- */
- private static $streamProtocol = "http";
- /**
- * Set the local IP address of the VLS Server. Should be internal
- * @access private
- * @var string
- */
- private static $vlcLanIP = "192.168.5.1";
- /**
- * Set the the internal port number for streaming.
- * @access private
- * @var string
- */
- private static $vlcLanStreamPort = "8888";
- /**
- * Set the RSTP port number.
- * @access private
- * @var string
- */
- private static $vlcRTSPControlPort = "8889";
- /**
- * Set the external IP or hostname for external connections to the VLC Server
- * @access private
- * @var string
- */
- private static $vlcWanIP = "theyosh.nl";
- /**
- * Set the the external port number for streaming.
- * @access private
- * @var string
- */
- private static $vlcWanStreamPort = "8888";
- /**
- * Set the the program name. Should not be changed
- * @access private
- * @var string
- */
- private static $lProgramName = "Dreambox ReStream";
- /**
- * Set the program version. Should not be changed
- * @access private
- * @var string
- */
- private static $lVersion = "1.4";
- /**
- * Set the location of the VLC server executable on a Linux system
- * You can leave it empty if you use a Windows server
- * @access private
- * @var string
- */
- private static $lVLCLocationLinux = "/usr/bin/vlc";
- /**
- * Set true to enable Flash H.264 streaming through a wowza server
- * @access private
- * @var boolean
- */
- private static $lWowza = true;
- /**
- * Check if Wowza is supported. Returns true when Wowza is enabled, and therefore show a rtmp transport option that uses Wowza
- * @return boolean
- */
- static public function getWowzaEnabled() {
- return Settings::$lWowza;
- }
- /**
- * Set the location of the VLC server settings file. The file will be placed on the www folder. So the webserver should have rights to write in its own webn folder
- * @access private
- * @var string
- */
- private static $lVLCSettingsFile = "settings.vlc.server";
- /**
- * Returns the VLC server settings location.
- * @return string
- */
- public function getVLCSettingsFile() {
- return trim(Settings::$lVLCSettingsFile);
- }
- /**
- * Set the location of the VLC server executable on a Windows system
- * You can leave it empty if you use a Linux server
- * Pay atention on the / instead of windows normal \
- * @access private
- * @var string
- */
- private static $lVLCLocationWindows = "C:/Progra~1/VideoLAN/VLC/vlc.exe";
- /**
- * Return the VLC executable based on OS type.
- * If param is 0, the system is Linux based
- * If param is 1, the system is Windows based
- * @return string
- */
- static public function getVLCLocation($pOSType = 0) {
- switch ($pOSType) {
- case 0:
- return Settings::$lVLCLocationLinux;
- break;
- case 1:
- return Settings::$lVLCLocationWindows;
- break;
- }
- }
- /**
- * Set this value to enable the ggrab program. This is only available on windows.
- * Leave it blank to disable it.
- * @access private
- * @var string
- */
- private static $lGgrabLocationWindows = "";
- #private static $lGgrabLocationWindows = "C:/ggrab/ggrab.exe";
- /**
- * Returns the location of ggrab program. When empty, ggrab is disabled.
- * @return string
- */
- static public function getGgrabLocation() {
- return trim(Settings::$lGgrabLocationWindows);
- }
- /**
- * Get the next program from the program guide.
- * @return string
- */
- static public function getDreamboxName() {
- return Settings::$dreamboxName;
- }
- /**
- * Get the IP number of the dreambox.
- * @return string
- */
- static public function getDreamboxIP() {
- return Settings::$dreamboxIP;
- }
- /**
- * Get the username of the dreambox.
- * @return string
- */
- static public function getDreamboxUserName() {
- return Settings::$dreamboxUserName;
- }
- /**
- * Get the password of the dreambox.
- * @return string
- */
- static public function getDreamboxPassword() {
- return Settings::$dreamboxPassword;
- }
- /**
- * Get the enigma version of the dreambox.
- * @return string
- */
- static public function getEnigmaVersion() {
- return Settings::$dreamboxEnigmaVersion;
- }
- /**
- * Get the streaming protocol of the dreambox.
- * @return string
- */
- static public function getStreamProtocol() {
- return Settings::$streamProtocol;
- }
- /**
- * Get the VLC Server internal IP number.
- * @return string
- */
- static public function getVLCLanIP() {
- return Settings::$vlcLanIP;
- }
- /**
- * Get the internal streaming port of the VLC Server.
- * @return string
- */
- static public function getVLCStreamPort() {
- return Settings::$vlcLanStreamPort;
- }
- /**
- * Get the RTPS Control port of the VLC Server.
- * @return string
- */
- static public function getVLCControlPort() {
- return Settings::$vlcRTSPControlPort;
- }
- /**
- * Get the external IP number of the VLC Server. When you connect from internal, you should get the internal IP number of the VLC Server
- * @return string
- */
- static public function getVLCWanIP() {
- $lServerAddress = explode(".",Settings::getVLCLanIP());
- $lClientAddress = explode(".",$_SERVER["REMOTE_ADDR"]);
- if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1" || ($lServerAddress[0] == $lClientAddress[0] && $lServerAddress[1] == $lClientAddress[1] && $lServerAddress[2] == $lClientAddress[2])) { // Lan connection
- return Settings::$vlcLanIP;
- } else { // Internet connection
- return Settings::$vlcWanIP;
- }
- }
- /**
- * Get the external streaming port of the VLC Server.
- * @return string
- */
- static public function getVLCWanStreamPort() {
- return Settings::$vlcWanStreamPort;
- }
- /**
- * Get the program name.
- * @return string
- */
- static public function getProgramName() {
- return Settings::$lProgramName;
- }
- /**
- * Get the program version number.
- * @return string
- */
- static public function getVersionNumber() {
- return Settings::$lVersion;
- }
- }
- ?>
Documentation generated on Tue, 24 Jun 2008 18:59:37 +0200 by phpDocumentor 1.3.0RC3