I'm a completely newbie of vlc/video stream and so on, so please excuse me if I ask for trivial question

I've yet implemented a broadcast encryption scheme (classic be_enc/be_dec C++ programs) and I'd like to encrypt something more interesting than "hello world" strings.
After some googling, I think working with VLC is the best solution (both client/server, mature code...).
Ok, but where should I place the code!? I mean, the "VLC languange" (mux, demux, sout) is bit complex for me

In the following I try to explain my problem, what I'd like is just something like "you should put this here, that there, look that module for an example"... a map, in fact, to orient me within the huge amount of VLC's code.
In principle, I need a place where storing two keys, a session key K and a 'header' H (so called in BE). The first can be any symmetric key (e.g. AES).
Server side, H is computed from K, knowing the set of legitimate users. Client side, from H, by applying BE decryption I get K (of course iff I'm a legitimate user).
I saw MPEG-TS already supports encryption. Can I use its underlying symmetric scheme?
I could put the key H instead of K, then callback my BE decrypt function to compute K from H. Am I right?
Is there any other better solution?
Further, being only a preliminary version, BE is not carefully optimized. So it should be better for my test to have the possibility for a "light" stream, and maybe adjust the "weight" of the stream. I'm sure it's possible, can you point me in the right direction?
Thank you in advance
--
ema