[vlc-devel] [PATCH 1/3] Fix IVLCVideo.teletext binding

Jean-Paul Saman jean-paul.saman at planet.nl
Fri Mar 28 15:40:12 CET 2008


Anthony Loiseau wrote:
> The IDL file describe API provided to interact with the ActiveX. Here is
> an extract of the current version:
> 
>         [propget, helpstring("Returns video subtitle used.")]
>         HRESULT subtitle([out, retval] long* spu);
>         [propput, helpstring("Sets video subtitle to use.")]
>         HRESULT subtitle([in] long spu);
> 
>         [propget, helpstring("Returns teletext page used.")]
>         HRESULT subtitle([out, retval] long* page);
>         [propput, helpstring("Sets teletext page to use.")]
>         HRESULT subtitle([in] long page);
> 
> 
> This extract focus a double definition of "subtitle(long):void" and
> "subtitle():long" for IVLCVideo interface. While compiling the IDL (with
> widl at least (*1)), generated axvlc_idl.h contains twice those methods
> definition which leads in a compilation error.
> 
> extract of generated axvlc_idl.h:
> """
>     virtual HRESULT STDMETHODCALLTYPE get_subtitle(
>         long *spu) = 0;
>     virtual HRESULT STDMETHODCALLTYPE put_subtitle(
>         long spu) = 0;
> 
>     virtual HRESULT STDMETHODCALLTYPE get_subtitle(
>         long *page) = 0;
>     virtual HRESULT STDMETHODCALLTYPE put_subtitle(
>         long page) = 0;
> """
> 
> I am not a user of subtitles and teletext, I didn't know that teletext
> was indeed a subtitle. I have found that get_teletext and put_teletext
> where implemented in vlccontrol2.cpp so I have guessed it was a
> copy-past mistake in IDL. This patch bind teletext call to the get_ and
> put_teletext in the IDL side (this patch does not include the three
> generated by IDL compiler (*2)).
> 
> *1: Compiler from Wine project, with the command line as following:
> widl -I/usr/include/wine/windows/ -h -H axvlc_idl.h -t -T axvlc.tlb \
>      -u -U axvlc_idl.c axvlc.idl

Using the widl from wine kills support for Visual Basic. (IIRC that is 
what damien (Quovodis) told me).

> *2: The patch 3/3 does, but based on the patched2/3 IDL. I should have
> provided generated files related to the patch1/3 only between patch 1
> and 2... I could regenerate it if needed.

Let me check what the right IDL compiler is. But in general I am not 
sure if it is wise to include generated headerfiles into the archive. 
VLC's policy is usually to not do that.

Gtz
Jean-Paul Saman.




More information about the vlc-devel mailing list