[vlc-devel] Writing new KLV module
remi at remlab.net
Sat May 8 19:19:13 CEST 2010
Le samedi 8 mai 2010 19:59:08 Yair Han, vous avez écrit :
> The TS Demux recognizes the metadata PID and collects the data to a
> p_block. The p_block is passed okay to the klv module and gets
> translated properly.
> Do I need to free the block in the decoder (my new module) or leave it
> to the demux to free?
The codec needs to free it (or pass it onto something else).
> Can I use the block from the demux or should I use duplicate block
> before using on the module?
You must not refer to a block after you gave it to es_out_Send(). It will be
stored in the elementary stream FIFO where the codec will dequeue it
> What do I need to exclude the use of p_sys inside my module or the Open
> + Close methods from the Decode method or both?
I don't understand your question.
> The output could be one of two. Sub picture on screen (still need to
> implement) and text output to the calling application through the
> ActiveX plugin
> How do I use a var_string for output string properly?
You need to create a string variable on an object. Then you can call
var_SetString(), var_AddCallback() and/or var_GetString() on that object.
> How and where I need to exclude access to interface string?
var_* functions are interlocked internally. However, you need to have a
reference to the object that the variable belongs to, when you call var_*.
> Do I need to call var_SetString inside my module or just memcopy to the
> interface var?
> The current status is that it works functionally and the klv string gets
> to the calling application but it crashes after a few seconds or
> minutes. I guess it's some memory corruption but I can't find it.
valgrind could be helpful there.
More information about the vlc-devel