Hi Rob,

I see two options for you. The first one is to ask input.http() to
create tracks, using the parameter new_track_on_metadata. If your
stream does not have crazy metadata, it should give you a nice
behavior.

The other possibility is to play with transitions: use a track
insensitive switch, which transition waits for the end of track. The
following should do pretty much what you want:

def sensitive(from,to)
  sequence([from,to])
end
def insensitive(from,to)
  to
end

switch(
  track_sensitive=false,
  transitions=[sensitive,insensitive],
  [ ({1h-9h}, otherstream),
    ({9h-1h}, day) ])

The switch occurs as soon as possible, regardless of tracks. When you
switch to otherstream the sensitive() transition still plays the end
of track from the "day" source (in effect, it delays the switching).
When you switch to day, the insensitive transition just plays it and
ignores the rest of the treack from otherstream.

Now, this solution doesn't adapt immediately to several "normal"
children (day, night, morning, etc), because our scheme for selecting
transitions is too simple. There are various ways to go around this,
but in your case I think you can simply replace ({...},day) by
({true},normal) where normal is a simple
switch(track_sensitive=true,[({0h-6h},night), ({6h-9h},morning),
({9h-0h},day)]).

I did not test this solution, so there might be minor things to adjust
(e.g. merge=true for the sequence). Please tell us what works fine for
you in the end, it might be a good recipe for our cookbook.

HTH
-- 
David

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to