![]() Video content is played back in full-screen mode.ĭefault. ![]() Thanks in advice for help.The fullScreen property specifies or retrieves a value indicating whether video content is played back in full-screen mode. I can provide more information if necessary, i had to remove more then half of my (attempt to) first post due to the limit here. (winid) Here are some references in case some one is interested: Note: to get the window id for the canvas i use this hack: * Move the Canvas to another window without changing the window id. * Easiest one: (but not java related) Change the window id in mplayer during playback. So, can anyone give some tips about where to look for a solution? I have some solutions in mind, but i dont know how to use any of them: This does work, but menus get behind the JWindow and, well, the behaviour is really ugly. I used an dummy JPanel to set the wanted position of the video output and CompoentListener to resize, move and fix the aspect ratio of the JWindow with the mplayer Canvas. I have created a JWindow just for mplayer and made it always stay on top while the main window with the controls is activated. Also, i have not found a way to change window id in mplayer during playback, which would make this a good solution.Ģ. This works, but is WAY to slow, especially with streams. Restart mplayer every time i do enter fullscreen to giva a new window id. I have gotten close to a solution with two different approaches:ġ. ![]() Actually, the thing with a JWindow for fullscreen is a solution i like because i can add different components easily. What i also have tried is creating a JWindow and adding the canvas to that one, but simply moving the canvas to another top level component changes its window id. That is fine, but when i do that and make the frame visible again the window id of the canvas changes, and mplayer gives a lot of errors and no video. If (device.getFullScreenWindow() = window) In order to get into exclusive fullscreen mode i need to set the JFrame undecorated, and to do so i need to call removeNotyfy(). ![]() GraphicsDevice device = env.getDefaultScreenDevice() GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment() Giving mplayer the fullscreen parameter wont do anything, so i have tried something like this: The problem is: entering fullscreen mode is almost impossible. }This code works and i also have an componentlistener to fix the aspect ratio of the video when the canvas gets resized. ![]() Parameters = parameters + " -wid " winid Object obj = m.invoke(overlay.getPeer()) m = cl.getMethod("getContentWindow", null) f = cl.getDeclaredField("hwnd") įinal Class cl = Class.forName("11ComponentPeer") Public void mplayerstart(Canvas overlay, String filePath)įinal Class cl = Class.forName("") There is a lot more code here, but the post got too long. That way i can give mplayer the parameter -wid and define the window to output the video on. I have used an quite ugly hack from jjmplayer to gain the window id for a Canvas. Another note: i am using linux.Ĭontroling mplayer is no problem so far, but its really hard to embed it in a good way. Im trying to write a frontend for mplayer in java, but there are some things that seem to be completely impossible to solve, so im hoping to get some advice. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |