[vlc-devel] Writing new KLV module

Yair Han YairH at optibase.com
Sat May 8 18:59:08 CEST 2010


Hi Guys,

 

I wrote a new KLV parser module for VLC. I used the wiki page for
writing new module. I need to understand the memory flow (allocation and
de-allocation) so it won't crash.

 

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?

Can I use the block from the demux or should I use duplicate block
before using on the module? 

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?

 

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?

How and where I need to exclude access to interface string?

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.

 

Thanks for the Help guys,

Yair Han

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100508/34c4610b/attachment.html>


More information about the vlc-devel mailing list