On Mon, Feb 25, 2013 at 12:29 AM, Rob Canning <[email protected]> wrote:
> On 02/25/2013 12:17 AM, Samuel Mimram wrote:
>> Hi,
>>
>> This function timetitle is called everytime there is new metadata on
>> the stream (typically on each new track) to change the metadata. So, I
>
> thanks sam,
> the reason i want to do it in a scheduled way is that there is no
> metadata on the stream which is continuous with no track changes so i
> need to trigger the authoring

Ok, its a little bit trickier then :) Here is the solution I would
suggest (not tested but I hope you get the idea):

source = ...

# Create a function "meta" to update metadata
meta_source = insert_metadata(source)
# function to insert metadata
meta = fst(meta_source)
# the source
source = snd(meta_source)

# Create a function which insert the title in the metadata
def update_meta() =
  # Compute the title
  title = if 12h-14h then "Lunchtime"
     elsif 6h30-9h then "Breakfast"
     elsif 14h-18h then "Afternoon"
     else "Anytime"
     end
  # The metadata to insert
  m = [("title",title)]
  # Insert metadata
  meta(m)
  # Schedule again in 10 min
  600.
end

# Call the function every 10 min
add_timeout(0.,update_meta())

output.icecast(source)

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to