It works :d jeeez why didn't I just thought of that ;) ...
On 7/12/07, Martijn van Beek <[EMAIL PROTECTED]> wrote:
I'm giving it a try! Thanks man On 7/11/07, Dan Rossi <[EMAIL PROTECTED]> wrote: > > Ok there has been some updated changes in this bean but not sure if its > resolved the external path problem. We have a NAS aswell but on windows > so its like file:////thecomputer/theshare/thepath. If you just have > /nas_streams it will still try to access within the webapp, you need to > have file:/nas_streams/records/100.flv its a spring resource thingy .. > No need for symlink within webapp then. > > > Martijn van Beek wrote: > > The streams: > > /nas_streams/videos/1000.flv > > > > The records: > > /nas_streams/records/100.flv > > > > the main folder is a mount on a NAS disk (without the bean I can read > > from the same folder via a symbolic link) > > > > > > > > On 7/11/07, *Dan Rossi* <[EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > Whats the example generated path ? > > > > Martijn van Beek wrote: > > > It opens a file where the locations are defined. > > > > > > The problem is not located in my class but after. The > > > System.out.println ( "generateFilename: "+filename); code echos > a > > > correct path. > > > But still there is no error but the file isn't displayed at the > > client > > > (without the bean everything works fine, but I want the stream > > folder > > > different from the record folder) > > > > > > On 7/11/07, *Dan Rossi* < [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > <mailto:[EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>> > > wrote: > > > > > > How does this work ? > > > > > > private void resolveDirectory(){ > > > try{ > > > props.load (new FileInputStream("db.properties > ")); > > > recordPath = props.getProperty(" path.record"); > > > playbackPath = props.getProperty("path.playback > "); > > > }catch (Exception e) { > > > // TODO: handle exception > > > System.out.println("Loading Properties: > > db.properties > > > failed"); > > > System.out.println("Exception: " + e.getMessage > ()); > > > } > > > } > > > > > > I would log the filename var and see what it returns. Im > > guessing > > > u want > > > something else other than the streams dir. You need to > > reference like > > > file:/path/to/streams . > > > > > > > > > Martijn van Beek wrote: > > > > I have made an streamFileGenerator based on the example > > made by > > > Joachmin. > > > > > > > > package nl.blueberry.streamer; > > > > > > > > import org.red5.server.api.IScope ; > > > > import org.red5.server.api.stream.IStreamFilenameGenerator > ; > > > > > > > > import nl.blueberry.data.QueryManager; > > > > > > > > import java.io.*; > > > > import java.util.Properties; > > > > > > > > public class FilenameGenerator implements > > > IStreamFilenameGenerator { > > > > > > > > /** Path that will store recorded videos. */ > > > > public String recordPath = ""; > > > > /** Path that contains VOD streams. */ > > > > public String playbackPath = ""; > > > > > > > > Properties props = new Properties(); > > > > > > > > private String getStreamDirectory(IScope scope) { > > > > if ( recordPath.equals("") ) { > > > > resolveDirectory(); > > > > } > > > > return recordPath; > > > > } > > > > > > > > private void resolveDirectory(){ > > > > try{ > > > > props.load (new FileInputStream(" > > db.properties")); > > > > recordPath = props.getProperty("path.record > "); > > > > playbackPath = props.getProperty(" > path.playback"); > > > > }catch (Exception e) { > > > > // TODO: handle exception > > > > System.out.println("Loading Properties: > > db.properties > > > > failed"); > > > > System.out.println ("Exception: " + > > e.getMessage()); > > > > } > > > > } > > > > > > > > public String generateFilename(IScope scope, String > name, > > > > GenerationType type) { > > > > // Generate filename without an extension. > > > > String filename = generateFilename(scope, name, > null, > > > type); > > > > System.out.println ( "generateFilename: > "+filename); > > > > return filename; > > > > } > > > > > > > > public String generateFilename(IScope scope, String > name, > > > > String extension, GenerationType type) { > > > > String filename; > > > > if ( recordPath.equals("") ) { > > > > resolveDirectory(); > > > > } > > > > if (type == GenerationType.RECORD) > > > > filename = recordPath + name; > > > > else > > > > filename = playbackPath + name; > > > > > > > > if (extension != null) // Add extension > > > > filename += extension; > > > > System.out.println ( "generateFilename: > "+filename); > > > > return filename; > > > > } > > > > } > > > > > > > > The data is parsed correctly but somehow the video isn't > > > displayed. I > > > > cannot find where Red5 accually is accessing the file > > > > > > > > Any idea > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > _______________________________________________ > > > > Red5 mailing list > > > > [email protected] <mailto:[email protected]> > > <mailto:[email protected] <mailto:[email protected]>> > > > > http://osflash.org/mailman/listinfo/red5_osflash.org > > <http://osflash.org/mailman/listinfo/red5_osflash.org> > > > > > > > > > > > > > _______________________________________________ > > > Red5 mailing list > > > [email protected] <mailto:[email protected]> <mailto: > > [email protected] <mailto:[email protected]>> > > > http://osflash.org/mailman/listinfo/red5_osflash.org > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > _______________________________________________ > > > Red5 mailing list > > > [email protected] <mailto:[email protected]> > > > http://osflash.org/mailman/listinfo/red5_osflash.org > > > > > > > > > _______________________________________________ > > Red5 mailing list > > [email protected] <mailto:[email protected]> > > http://osflash.org/mailman/listinfo/red5_osflash.org > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Red5 mailing list > > [email protected] > > http://osflash.org/mailman/listinfo/red5_osflash.org > > > > > _______________________________________________ > Red5 mailing list > [email protected] > http://osflash.org/mailman/listinfo/red5_osflash.org >
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
