function getStreamInfo($streamData) { global $config, $db; if ($config['httpStreaming']) { // no stream info... return; } elseif ($config['tamburineURL']) { $rpc = new rpc_Utils(); //$rpc->debug = true; $response = $rpc->callTamburine('getpls', $streamData['pid']); if (is_null($response)) { logError("no reply from tamburine server"); } else { $offset = $response[2]; $filename = $response[2 + $offset]; //debug("response", $response); //debug("fname", $filename); } } elseif ($config['tamburineCMD']) { // streaming with tbrcmd $cmd = $config['tamburineCMD'] . " getpls " . $streamData['pid'] . " 2>&1"; exec($cmd, $output, $retval); debug("cmd", $cmd); //debug("output", $output); //debug("retval", $retval); foreach ($output as $line) { if (preg_match('/\\-\\>(\\/\\S+)\\s*$/', $line, $mm)) { $filename = $mm[1]; break; } } } if ($filename) { $prg = sotf_Programme::getPrgFromFilename($filename); if (is_object($prg)) { return array('name' => $prg->get('title'), 'url' => $config['localPrefix'] . "/get.php/" . $prg->id); } else { return array('name' => $prg); } } else { debug("Could not get stream info"); // TODO: stop stream! } }
$tmpFile = tempnam($config['tmpDir'], 'logo_u'); debug("received logo from", $url); debug("tmpfile", $tmpFile); sotf_Utils::save($tmpFile, $contents); chmod($tmpFile, 0660); exec("/usr/bin/convert {$tmpFile} -resize 100x36 " . $config['tmpDir'] . "/test.png 2>&1", $output, $retval); debug("retval", $retval); debug("output", $output); } exit; require_once $config['classdir'] . "/rpc_Utils.class.php"; $rpc = new rpc_Utils(); $rpc->debug = true; //$response = $rpc->callTamburine('version', ''); //$response = $rpc->callTamburine('setpls', array('/home/micsik/ok.mp3', '/home/micsik/china.mp3')); $response = $rpc->callTamburine('getpls', 1); //$response = $rpc->callTamburine('quit', 1); dump($response, "RESPONSE"); exit; $prg = $repository->getObject('005pr27'); dump($prg->getCreatorNames()); exit; /* [id3v1] => Array ( [title] => Wissen aktuell [artist] => Oe1 [album] => Oe1 on demand Wissenschaft & B [year] => [comment] => oe1 all rights reserved [genreid] => 255