Le jeudi 11 février 2010 07:58:37, em...@mccurly.de a écrit :
> hi,

        Hi !

> in version 0.8.1 we used the the start/stop functions for recording the
> live stream, the file was created by the output.file.xxx  function. we
> set the filename to
> 
> "/path/" ^ '%Y-%m-%d_%H-%M-%S' ^ ".ogg"
> 
> 
> the filname on the hard disk was for example: 2010-02-11_14-55-29.ogg
> as we are now using the harbor dumpfile function of 0.9.2 the same
> filename string results in:
> 
> %Y-%m-%d_%H-%M-%S.ogg
> 
> is there a way to set the current date/time as the filename, by harbor
> dumpfile function?

The dumpfile parameter was introduced as a debugging option. However, I can see 
now how it could be used to archives. In particular, it does not require to 
reencode the stream, which saves cpu usage..

I think you may be able to do it using a trick which is available in 0.9.2
With this version, all output accept fallible sources and can perform a 
specific action when the source becomes available/unavailable.

Hence, you may use the output.dummy:

s = input.harbor(dumpfile=/path/dump.ogg, ...)

def move_dump()
  system("mv /path/dump.ogg /path/saved.ogg")
end

output.dummy(fallible=true, on_stop=move_dump , s)

You may customize the move_dump function with all the informations you need..
You can also simply call an external script of your own.

Additionally, if you need to record the time when the live started, you may 
use the on_start parameter of the output.dummy.


Romain

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to