raspbian - Run omxplayer "Always on top" from java code -


i have raspberrypi2 (1gb ram version) raspbian os. need execute omxplayer play video. if execute new process, omxplayer on background. need omxplayer on top. how it? omxplayer has not switch stay on top example mplayer (-ontop).

i found (https://askubuntu.com/questions/7377/how-to-start-an-app-with-always-on-top-set) wmctrl. tried run java execute omxplayer , after execute:

processbuilder pb2 = new processbuilder("bash", "-c", "wmctrl -a omxplayer"); process p2 = pb2.start(); // start process. 

but not working, because javafx working framebuffer, not x11. source: why javafx application not have frame when run on raspberrypi?

i feeling not possible tu run omxplayer on java in fullscreen on raspberrypi.

code run omxplayer new process:

public class omxplayer {      private int xposition;     private int yposition;     private int width;     private int height;      /** constructor.      *       * */     omxplayer (int xposition, int yposition, int width, int height) {         this.xposition = xposition;         this.yposition = yposition;         this.width = width;         this.height = height;      }      public void play(string url){          try {             processbuilder pb = new processbuilder("bash", "-c", "omxplayer -r -o hdmi "+url);             process p = pb.start(); // start process.              log.write("i playing file: "+url, log.enable_stdout);              //p.waitfor(); // wait process finish.              log.write("file played.", log.enable_stdout);         } catch (exception e) {             stringwriter err = new stringwriter();             e.printstacktrace(new printwriter(err));             log.write(err.tostring(), log.enable_stdout);         }     } } 

thank you.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -