Hey Romain,

Congratulations for the fast development. However, I'm not sure I
agree on all design choices.

On Sat, Nov 27, 2010 at 3:54 PM, Romain Beauxis <[email protected]> wrote:
> In the spirit of an object-like system, I figured out that we need a
> source.insert_metadata that applies to any source. The other alternative would
> have been something of the type:
>  source.insert_metadata: source -> (metadata -> unit) * source
> which I find not really attractive..
> So, I have backported the method mentioned above to the main source class and
> added a method #insert_metadata.

I prefer the alternative: it may not look very attractive, but I don't
think we should compromise our source model for a feature like that.
Think about it: why add #insert_metadata as a fundamental method for
all sources, and not #on_track, #on_metadata, and even #on_blank,
#map_metadata or #source_dynamic? To push the point even further, why
not add support for instantiation for all variables and not only
references? I'm pretty sure that keeping a simple notion of source
makes sense right now (if not for usability, for ease of maintenance)
and will only become more crucial in the future (think about compiling
operators in liquidsoap 2...).

> I think this gives a nice generalization:
>  * insert_metadata on sources inserts metadata directly during s#get
>  * insert_metadata on buffered sources inserts metadata into the buffer
>  * insert_metadata on encoded outputs inserts metadata in the encoded stream
> All 3 functions have the same type and may or may nor filter metadata.
> Filtering is configured according to "metadata.export" (list of fields).

For the encoded outputs, I don't think this makes a difference with
the old behaviour (or the behaviour of the alternative new version of
it). However, I'm wondering about the subtlety regarding buffered
sources. It looks like there is a choice, but I'm not sure which one
is the right one.

Finally, one remark about the bigger picture. I totally support the
generalization of insert_metadata so that it can be used directly from
the script without going through server commands. However, I'd be
cautious about inciting people to use them. Also, what does it have to
do with harbor? One answer to this question is "nothing, so we'll add
a distinct web server feature to liquidsoap" but another answer is
that an external web server relying on our existing server may be more
solid.

Cheers,
-- 
David

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl

Répondre à