[Jdvb-cvs] jdvb-server/src/uk/midearth/dvb/confParser ConfParser.java,1.3,1.4
Status: Inactive
Brought to you by:
hundalz
|
From: pinder <hu...@us...> - 2006-02-26 11:53:36
|
Update of /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/confParser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17752/src/uk/midearth/dvb/confParser Modified Files: ConfParser.java Log Message: spaces in channel names field offsets for channels.conf file to get video and audio pids Index: ConfParser.java =================================================================== RCS file: /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/confParser/ConfParser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConfParser.java 24 Feb 2006 03:49:26 -0000 1.3 --- ConfParser.java 26 Feb 2006 11:53:32 -0000 1.4 *************** *** 21,25 **** // private int currentChannel = 0; ! public ConfParser(String newConfigFilename) { configFile = new File(newConfigFilename); if (configFile.isFile() && configFile.canRead()) { --- 21,26 ---- // private int currentChannel = 0; ! public ConfParser(String newConfigFilename) throws Exception { ! Configurator config = Configurator.getInstance(); configFile = new File(newConfigFilename); if (configFile.isFile() && configFile.canRead()) { *************** *** 29,32 **** --- 30,35 ---- String str; String[] configParts; + int videoFieldOffset = Integer.parseInt(config.get(Constants.PROPS_VIDEOPID_FIELD)); + int audioFieldOffset = Integer.parseInt(config.get(Constants.PROPS_AUDIOPID_FIELD)); while ((str = in.readLine()) != null) { if (str.length() > 0) { *************** *** 37,43 **** configParts[0], Integer ! .parseInt(configParts[configParts.length - 2]), Integer ! .parseInt(configParts[configParts.length - 1]))); } } --- 40,46 ---- configParts[0], Integer ! .parseInt(configParts[configParts.length - videoFieldOffset]), Integer ! .parseInt(configParts[configParts.length - audioFieldOffset]))); } } *************** *** 46,49 **** --- 49,53 ---- } catch (Exception ioe) { LOG.error("ConfParser>> IOException:: " + ioe.getMessage(),ioe); + throw ioe; } |