Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: dual display problem

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default dual display problem

    good day there's anyone here create a program that display video in second monitor ....
    every time i run my code it display the video in first monitor not in second monitor ..

    pls help me with my problem ...

    Here my path i used
    private static String mplayerOptions = "mplayer -noborder -vo fbdev2 -nokeepaspect movies.mpeg";
    Last edited by lhon12006; March 12th, 2014 at 09:35 PM.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: dual display problem

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

  3. #3
    Junior Member
    Join Date
    Mar 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: dual display problem

    sir i edit my post here for my problem sir and have been read post code guidelines ..

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: dual display problem

    Provide an example program that demonstrates the problem. What you're seeing and trying to fix is not clear. Is it a Java problem or a an OS or hardware problem? Do you have a container on each monitor, both containing a video? Show that code.

  5. #5
    Junior Member
    Join Date
    Mar 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: dual display problem

    actually this is my source in java that works but everytime i call that mplayer in the second monitor it play in the first monitor im using linux centos 6.5 i tried to read in the other tutorial they modify the xorg.conf but in centos 6.5 the does not have xorg.conf in X11 data source what should i do to display my movie in second monitor please help ....


     public static void startMPlayer() throws IOException {
    		if (mplayerProcess == null) {
    			// start MPlayer as an external process
    			String command = mplayerOptions ;
    			System.out.println("command  ==  "+command);
    			mplayerProcess = Runtime.getRuntime().exec(command);
     
    			// create the piped streams where to redirect the standard output and error of MPlayer
    			// specify a bigger pipesize
    			PipedInputStream  readFrom = new PipedInputStream(1024*1024);
    			PipedOutputStream writeTo = new PipedOutputStream(readFrom);
    			mplayerOutErr = new BufferedReader(new InputStreamReader(readFrom));
     
    			// create the threads to redirect the standard output and error of MPlayer
    			new LineRedirecter(mplayerProcess.getInputStream(), writeTo, "MPlayer says: ").start();
    			new LineRedirecter(mplayerProcess.getErrorStream(), writeTo, "MPlayer encountered an error: ").start();
     
    			// the standard input of MPlayer
    			mplayerIn = new PrintStream(mplayerProcess.getOutputStream());
    		}
    		// wait to start playing
    		waitForAnswer("Starting playback...");
    		//logger.info("Started playing file ");
    	}


    --- Update ---

    actually this is my source in java that works but everytime i call that mplayer in the second monitor it play in the first monitor im using linux centos 6.5 i tried to read in the other tutorial they modify the xorg.conf but in centos 6.5 the does not have xorg.conf in X11 data source what should i do to display my movie in second monitor please help ....


     public static void startMPlayer() throws IOException {
    		if (mplayerProcess == null) {
    			// start MPlayer as an external process
    			String command = mplayerOptions ;
    			System.out.println("command  ==  "+command);
    			mplayerProcess = Runtime.getRuntime().exec(command);
     
    			// create the piped streams where to redirect the standard output and error of MPlayer
    			// specify a bigger pipesize
    			PipedInputStream  readFrom = new PipedInputStream(1024*1024);
    			PipedOutputStream writeTo = new PipedOutputStream(readFrom);
    			mplayerOutErr = new BufferedReader(new InputStreamReader(readFrom));
     
    			// create the threads to redirect the standard output and error of MPlayer
    			new LineRedirecter(mplayerProcess.getInputStream(), writeTo, "MPlayer says: ").start();
    			new LineRedirecter(mplayerProcess.getErrorStream(), writeTo, "MPlayer encountered an error: ").start();
     
    			// the standard input of MPlayer
    			mplayerIn = new PrintStream(mplayerProcess.getOutputStream());
    		}
    		// wait to start playing
    		waitForAnswer("Starting playback...");
    		//logger.info("Started playing file ");
    	}

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: dual display problem

    Try searching the web for 'x11 java multi display'. I saw a couple results that looked promising, but I leave the discovery to you.

  7. #7
    Junior Member
    Join Date
    Mar 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Re: dual display problem

    Quote Originally Posted by GregBrannon View Post
    Try searching the web for 'x11 java multi display'. I saw a couple results that looked promising, but I leave the discovery to you.
    thank you so much sir for your reply ... now i have an idea how to finish my work ...
    i start read what you have been given to me ... thanks again sir ...

  8. #8
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: dual display problem

    You're welcome, and I hope you find a solution. If you do, please post it so that others will be able to learn from your adventure.

  9. #9
    Junior Member
    Join Date
    Mar 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: dual display problem

    I have a last question sir ... is there's a X11 in centos6.5 and where did i find it ...

    i run my program but still in the first monitor ..

Similar Threads

  1. random card display problem
    By wetwater in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 12th, 2013, 06:01 AM
  2. Display() and readInput () function Problem
    By DavidXCode in forum Object Oriented Programming
    Replies: 5
    Last Post: November 20th, 2012, 12:01 AM
  3. JList display problem
    By Poseidon in forum AWT / Java Swing
    Replies: 3
    Last Post: February 19th, 2012, 08:37 AM
  4. A Dual loop and methods
    By rarman in forum Loops & Control Statements
    Replies: 1
    Last Post: December 11th, 2011, 06:40 AM
  5. GridBagLayout display problem
    By mjpam in forum What's Wrong With My Code?
    Replies: 0
    Last Post: May 5th, 2011, 04:58 PM