[vlc-devel] [Dermot McGahon <dermot at lincor.com>] Patch to move video_output window (linux only at the moment) on-the-fly

System administration admin at via.ecp.fr
Fri Sep 30 16:20:30 CEST 2005


 The deleted attachment is at:
    <http://www.videolan.org/~admin/20050930-videolan/vlc_patch_30SEP.diff>

----- Forwarded message from Dermot McGahon <dermot at lincor.com> -----

From: Dermot McGahon <dermot at lincor.com>
Date: Fri, 30 Sep 2005 12:26:26 +0100
Subject: Patch to move video_output window (linux only at the moment) on-the-fly

Hi,

Find attached all current non-trickplay changes I have against VLC.

The functionality is to be able to move a video_output window from
location to location. This should be possible before it is playing,
on-the-fly, and in the background while currently fullscreen. Similar
requirement for the fullscreen command. It should be possible to
apply it even in advance of playing the item.

There are two other small changes that are more than likely only
application to our application and environment. I am including them
for completeness and so that you can make up your own mind about
that.

I will describe each hunk briefly,

modules/control/rc.c:
---------------------

 - create vout-x/vout-y variable on the intf (Q: is this necessary for
   each new RC command?)

 - set fullscreen var on the playlist, allows fullscreen command to work
   even when nothing is currently being played.

 - msg_rc text describing the new command could do with improvement.

 - can two values be passed in one command? i.e rc> vout_win_move 100 50,
   this is related to the question about the p_intf variables above.

 - if not, use a static to store the X val and act when Y val is received

 - set video-x/video-y on the playlist, this allows to set the values
   before playing the item, or when one item is stopped before starting
   the next; instead of on-the-fly video_output window placement it means
   apply these changes to any later video_output windows.

 - next hunk sets video-x/video-y on the vout, this is to deal with the
   situation that we are in fullscreen currently so the XMoveWindow is
   not going to apply to the fullscreen window. This stores the values
   so that they can be applied to the original_window when we eventually
   leave fullscreen; again not on-the-fly, instead it's apply these
   changes to the windowed window (we use this with the earlier no-deco
   patch) when fullscreen is exited.

 - this hunk also calls a new vout_Control VOUT_MOVE_WINDOW which does
   the actual on-the-fly movement. The previous two parts were to deal
   with special cases (no currrent window and currently in fullscreen).
   Hopefully, somebody can implement this control in the windows and
   mac video_output modules.


modules/video_output/x11/xcommon.c:
-----------------------------------

 - Call XRaiseWindow every 20 frames to deal with Metacity craziness.
   You will very likely not want or need this hunk. I'm not even sure
   that even XRaiseWindow entirely works anyway.

 - Next is a change to double-click behaviour. Probably not one you
   will want either. We use touchscreens and our customer want to be
   able to single-click to turn small preview windows into fullscreen
   playback. They don't want single-click to return from fullscreen to
   windowed (we use no-deco patch again for this and display a small
   "window" over a HTML interface).

 - The XMoveWindow after the XMapWindow is to deal with the stored X
   and Y co-ordinates - to process them when we are exiting from
   fullscreen.

 - Control() case: VOUT_MOVE_WINDOW, the warn could be removed or
   changed to a dbg. I will recheck if x/y need to be set on both
   p_win and original_window, that may have been an earlier attempt
   at storing values while in fullscreen. I wasn't sure in the mutex
   was required around XMoveWindow so decided to err on the side of
   caution.


include/video_output.h:
-----------------------

 - addition of new VOUT_MOVE_WINDOW vout_control



Comments expected and welcomed.


Warm Regards,

Dermot McGahon.
--



----- End forwarded message -----

-- 
System administration <admin at via.ecp.fr>
VIA, Ecole Centrale Paris, France

-- 
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