[vlc-devel] Play DVD on MacOSX, can't control DVD-menu

Rémi Denis-Courmont remi at remlab.net
Thu May 19 12:53:48 CEST 2011


On Thu, 19 May 2011 12:41:43 +0800, monkeycz <monkeycz at gmail.com> wrote:
> I use VLCKit.framework on MacOSX, when I open a DVD disc like
this:"[player
> setMedia:[VLCMedia mediaWithPath:@"/Volumes/xxxxx/"]];", DVD-menu has
been
> displayed, but can't control it by mouse, looks like miss mouse event.

I don't know the detailed semantics of your window system, but this is
usually a sign that your application catches the mouse events such that VLC
cannot get them. You need to fix that.

> I tried libVLC, same result. VLCKit.framework use --vout=macosx. May be
I
> need a function like "libvlc_video_set_cursor" in mouseMoved: event.
> 
> --- A/video.c
> +++ B/video.c
> @@ -205,6 +205,18 @@
>      return 0;
>  }
> 
> +int libvlc_video_set_cursor( libvlc_media_player_t *mp, unsigned num,
> +                             int x, int y )
> +{
> +    vout_thread_t *p_vout = GetVout (mp, num);
> +    if (p_vout == NULL)
> +        return -1;
> +
> +    var_SetCoords (p_vout, "mouse-moved", x, y);
> +    vlc_object_release (p_vout);
> +    return 0;
> +}

I don't think this will work. The "mouse-moved" coordinates must be
expressed in the original video resolution, while the caller only knows the
mouse coordinates in the screen and/or in the window.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list