Hi list,

A few weeks ago, when we visited Sourcefabric in Berlin, I started
working on a small example for Martin Konečný of Airtime. The task was
to have an HTTP input with the ability to change the URL, transitions
between different relayed HTTP streams, and transitions between HTTP
and "normal" streams.

To do this I had to introduce a new feature (the "source_url" metadata
added to HTTP streams) and fix a bug (remaining time estimation broken
in cross and smart_cross). If you want to try my stuff, you need to
update to the latest git code.

The solution is a fairly complex script, attached to this mail for
lack of a better medium. The script defines three functions that may
be independently useful:
 * one for creating an HTTP input with a more convenient command for
changing a URL and restarting (currently requires active wait);
 * one for applying transitions between different relayed HTTP streams
(different URL) using cross (currently the transition only fades, but
it's easy to change);
 * finally, an advanced trick to smoothly fade in and out an HTTP
stream on top of a normal stream, which involves triggering a switch
in advance, but avoiding to trigger it for short disconnections of the
HTTP input.

The script includes a test setup that you should be able to adapt
quickly. It uses a vumeter coupled with an audio output for a better
control of what's happening.

For now, these functions are not intended for beginners. Before asking
questions on how to use or tweak them, please make sure to read the
script and understand its structure at a high-level -- in particular,
I've included comments on what can be tweaked and what should be
handled with care.

Have fun,
-- 
David

PS: For the record, we also investigated a more advanced solution
involving source.dynamic(). For this task, it's not an interesting
approach as it is only more complex and (currently) unstable, but it
lead to interesting optimizations that I still haven't finalized.

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to