Cool, thanks, that makes sense!

JD


On Mon, Aug 12, 2013 at 4:19 PM, Samuel Mimram <smimram@gmail.com> wrote:
Hi,

First of all, you will need to implement this behaviour in the
Liquidsoap language which has nothing to do with OCaml (this is a
widespread confusion, Liquidsoap just happens to be implemented in
OCaml). Now, for what you want I would do things like this (not tested
but I hope you get the idea):

# The main source
s = playlist(...)

# Define a callback for metadata
def meta_cb (m) =
  # check for the metadata and skip if necessary
  if m["skip"] == "true" then source.skip(s) end
end

# Register the callback
s = on_metadata(meta_cb, s)

# Voilą ! Now we stream
output.icecast(%mp3, ..., s)

Cheers,

Samuel.

On Mon, Aug 12, 2013 at 3:46 PM, JD Buys <jdbuys@gmail.com> wrote:
> Hi Bernd,
>
> I actually want to call skip when I receive specific metadata for e.g if the
> metadata contains the key/value skip=true I want to call skip, but my OCAML
> skills are not that good.
> I thought that because output is inherited by icecast output you could just
> call the skip method, but I was wrong.
>
> JD
>
>
> On Mon, Aug 12, 2013 at 3:36 PM, Bernd Naumann
> <bernd.naumann.we@googlemail.com> wrote:
>>
>> hi jd,
>>
>> you can use `source.skip(radio)`, like:
>>
>> radio = playlist("/path/to/your/files")
>> source.skip(radio)
>>
>> i hope this helps.
>>
>> bernd
>>
>> On 12.08.2013, at 14:48, JD Buys wrote:
>>
>> > Hi,
>> >
>> > Can anyone help me and point me in the right direction to implement a
>> > skip when I receive certain metadata?
>> >
>> > I can get the right metadata key, but' don't know how to skip?
>> >
>> > Thanks,
>> >
>> > JD
>>
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite!
>> It's a free troubleshooting tool designed for production.
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Savonet-users mailing list
>> Savonet-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users