[Jdvb-cvs] jdvb-server/src/uk/midearth/dvb/server RemoteDVB.java,1.4,1.5
Status: Inactive
Brought to you by:
hundalz
|
From: pinder <hu...@us...> - 2006-02-26 11:53:37
|
Update of /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17752/src/uk/midearth/dvb/server Modified Files: RemoteDVB.java Log Message: spaces in channel names field offsets for channels.conf file to get video and audio pids Index: RemoteDVB.java =================================================================== RCS file: /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/server/RemoteDVB.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RemoteDVB.java 25 Feb 2006 14:06:58 -0000 1.4 --- RemoteDVB.java 26 Feb 2006 11:53:32 -0000 1.5 *************** *** 3,9 **** --- 3,12 ---- import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; + import java.util.ArrayList; + import java.util.List; import org.apache.log4j.Logger; + import uk.midearth.dvb.Constants; import uk.midearth.dvb.confParser.ConfParser; import uk.midearth.dvb.confParser.Configurator; *************** *** 32,36 **** public RemoteDVB(String newConfigFilename, String newConfFilename) ! throws RemoteException, JDVBException { LOG.info("RemoteDVB>> Creating remote RemoteDVB object"); confParser = new ConfParser(newConfigFilename); --- 35,39 ---- public RemoteDVB(String newConfigFilename, String newConfFilename) ! throws Exception { LOG.info("RemoteDVB>> Creating remote RemoteDVB object"); confParser = new ConfParser(newConfigFilename); *************** *** 74,78 **** class TzapThread extends Thread { ! private int timeout = 1000; private Process tzap = null; --- 77,81 ---- class TzapThread extends Thread { ! private int timeout = 2000; private Process tzap = null; *************** *** 97,131 **** try { - // System.out.println("RemoteDVB.TzapListner>> Getting - // runtime"); rt = Runtime.getRuntime(); ! // System.out.println("RemoteDVB.TzapListner>> starting tzap ! // with:"); ! // System.out.println(conf.get("tzap") + " -c " + ! // confParser.configFilename() + " " + ! // confParser.getChannel(channelNo).channelName()); ! tzap = rt ! .exec(conf.get("tzap") ! + " -c " ! + confParser.configFilename() ! + " " ! + confParser.getChannel(channelNo) ! .getChannelName()); ! // System.out.println("RemoteDVB.TzapListner>> sleeping"); sleep(timeout); ! // System.out.println("RemoteDVB.TzapListner>> starting ! // dvbstream:"); ! // System.out.println(conf.get("dvbstream") + " " + ! // confParser.getChannel(channelNo).videoPID() + ! // " " + confParser.getChannel(channelNo).audioPID()); ! dvbStream = rt.exec(conf.get("dvbstream") + " " ! + confParser.getChannel(channelNo).getVideoPID() ! + " " ! + confParser.getChannel(channelNo).getAudioPID()); ! // System.out.println("RemoteDVB.TzapListner>> sleeping ! // ..."); wait(); ! // System.out.println("RemoteDVB.TzapListner>> waking up ! // ..."); } catch (Exception e) { LOG.error("RemoteDVB.TzapListner>> Tzap died: " --- 100,129 ---- try { rt = Runtime.getRuntime(); ! ! List<String> commands = new ArrayList<String>(); ! commands.add(conf.get(Constants.PROPS_TZAP)); ! commands.add("-c"); ! commands.add(confParser.configFilename()); ! commands.add(confParser.getChannel(channelNo).getChannelName()); ! ! LOG.info("Executing: [" + commands + "]"); ! tzap = rt.exec(commands.toArray(new String[commands.size()])); ! ! LOG.debug("Sleeing for [" + timeout + "] ms"); sleep(timeout); ! ! commands.clear(); ! commands.add(conf.get(Constants.PROPS_DVBSTREAM)); ! commands.add(Integer.toString(confParser.getChannel(channelNo).getVideoPID())); ! commands.add(Integer.toString(confParser.getChannel(channelNo).getAudioPID())); ! ! LOG.info("Executing [" + commands + "]"); ! dvbStream = rt.exec(commands.toArray(new String[commands.size()])); ! ! LOG.info("Sleeping now..."); wait(); ! LOG.info("Waking up..."); ! } catch (Exception e) { LOG.error("RemoteDVB.TzapListner>> Tzap died: " |