[vlc-devel] Re: Python+wxPython bindings on Mac (patch)

Damien Fouilleul damien.fouilleul at laposte.net
Fri May 25 11:39:56 CEST 2007


Jan,

i was actually thinking of adding an extra API, such as, 
libvlc_video_set_drawable_type() to allow passing different type of 
drawable to the vout handler, not necessarily limited to MacOS X 
drawable types, this has the nice advantage to be backward compatible 
with existing api.
You would still use libvlc_video_set_drawable() to pass a reference to 
the drawable.

I was reading your previous emails, and I don't understand why you need 
the vout to call InvalidateRect() after an aglSwap(), since the latter 
would repaint the video.
regarding resize, you should call libvlc_video_set_viewport()

Damien

Jan David Mol wrote:
> Hi,
>
> Thanks for your input. I'm processing this, and will post a patch 
> again when done. I am also looking at having wxPython call some 
> onresize function in vlc instead of having vlc check every frame 
> whether the window size changed (which is my code now, and is rather 
> ugly).
>
> Jan David
>
> On 19-mei-2007, at 17:15, Pierre d'Herbemont wrote:
>
>> Hello Jan,
>>
>> On 19 mai 07, at 12:19, Jan David Mol wrote:
>>
>>> I just finished obtaining VLC playback under wxPython on Mac.
>>
>> Nice!
>>
>>> My modifications may break other stuff and require some ugly hacks 
>>> (imho), but do get the job done. I like any advice on how to proceed 
>>> or fix these issues.
>>
>>
>> You could simply expand the drawable to a pointer to a structure like 
>> this:
>>
>> enum macosx_drawable_type_t
>> {
>>     VLCDrawableControlRefType,
>>     VLCDrawableAGLDrawableType,
>>     VLCDrawableNSViewType
>> }
>>
>> struct {
>>     enum macosx_drawable_type_t type;
>>     union value
>>      {
>>         ControlRef control;
>>         AGLDrawable agl;
>>         NSView * view;
>>     }
>> }
>>
>> Then your code could be isolated well from the existing code which is 
>> used by the mozilla plugin.
>>
>> Pierre.
>>
>> -- 
>> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
>> To unsubscribe, please read http://developers.videolan.org/lists.html
>>
>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list