Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Feb 2008
    Location
    Russia, Samara
    Posts
    47

    playing 3gp problems

    Hi! I use this code to play video.


    Code:
    public synchronized void playVideo() throws IOException, MediaException{       
            
            FileConnection fc = (FileConnection)Connector.open(fileName);
            InputStream is = fc.openInputStream();
            Player p = null;
            if(fileName.toUpperCase().endsWith(".GIF"))
                p = Manager.createPlayer(is,"image/gif");
            if(fileName.toUpperCase().endsWith(".MP4"))
                p = Manager.createPlayer(is,"video/mp4");
            if(fileName.toUpperCase().endsWith(".3GP"))
                p = Manager.createPlayer(is,"video/3gpp2");
            
            p.realize();
            VideoControl vc = (VideoControl) p.getControl("VideoControl");
            System.out.println("4");
            vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, midlet.videoCanvas);
            vc.setVisible(true);
            vc.setDisplayFullScreen(true);
            
            midlet.display.setCurrent(midlet.videoCanvas);
            p.start();
            
            while(p.getState()!=Player.PREFETCHED){
                try {
                    thread.sleep(2000);
                } catch (InterruptedException ex) {
                    ex.printStackTrace();
                }
            }
            is.close();
            fc.close();
            
        }
    On Nokia 6120c it works just fine. On 3250 3gp stugg some time, mp4 show only first frame, but sound is fine. On E61 I see no pic, just gray squere, but sond plays. What is problem?
    Last edited by Red Falcon; 2008-05-26 at 09:19.

Similar Threads

  1. Problems about maemo 4.0.1 SDK installation.
    By fgg_maemo in forum General Development Questions
    Replies: 3
    Last Post: 2008-10-07, 14:26
  2. amr playing resume problems
    By heshen in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2007-08-03, 14:54
  3. Need Help with 6270: No audio when playing 3gp video
    By lordtrader in forum Streaming and Video
    Replies: 2
    Last Post: 2006-10-13, 06:04
  4. File conversion problems (3gp to flv/mov/mpeg) big time !
    By busyanuj in forum Streaming and Video
    Replies: 2
    Last Post: 2006-09-17, 19:52
  5. Replies: 2
    Last Post: 2004-04-20, 16:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×