×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    14

    Prefecting a player takes a long time. Why is that?

    Hi I'm using this code to download the video and play it on my phone. at the moment I'm testing it from WTK2.5.2 only. but the problem is player will created so quickly but when it is prefetching it takes a long time. Is there something wrong with my code but I guess there is nothing wrong . Oh and the url for the player would be http://www.onlnet.com/amila/v1.mpg .
    thanks in advance.
    and here is my code

    Code:
    Thread t = new Thread() {
                    public void run() {
                        try {
                            form1 = null;
                            player1 = null;
                            vc1 = null;
                            videoDisp1 = null;
                            form1 = new Form("player1");
                            player1 = Manager.createPlayer(url);
                            System.out.println("player 1 created");
                            player1.realize();
                            player1.prefetch();                        
                            player1.addPlayerListener(this);
                            System.out.println("player 1 pre and rea");
                            vc1 = (VideoControl) player1.getControl("VideoControl");
                            videoDisp1 = (Item) vc1.initDisplayMode(vc1.USE_GUI_PRIMITIVE, null);
                            form1.append(videoDisp1);
                            
                        } catch (Exception e) {
                        }
                    }
    }

  2. #2
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    254

    Re: Prefecting a player takes a long time. Why is that?

    prefetching the player takes along time because its loading and buffering the data to run
    if u see the code the player is prefecthed then it is asked to play
    for further refrence you can see the transition state of the player that it goes through :-

    PREFETCHED, establishes network connections for streaming data, and performs other initialization tasks
    so it takes time
    and u can have alook on java API for Mobile Media
    regards
    Arun Gupta

Similar Threads

  1. why file writing on memory card takes time
    By vinayakak in forum Symbian
    Replies: 2
    Last Post: 2008-04-10, 20:47
  2. Conection - how long time it takes?
    By koperak in forum Bluetooth Technology
    Replies: 2
    Last Post: 2002-12-18, 10:48
  3. Querying the status over a long time crashes the connector application
    By tuender in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2002-07-25, 05:28
  4. SMS time stamp format with time zone parameter?
    By turunhe in forum General Messaging
    Replies: 1
    Last Post: 2002-06-11, 07:00

Posting Permissions

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