×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    166

    problem in initDisplaymode

    hi
    i am developing a application in which all video name in
    file:///c:/videos/ are appended to a list
    then according to user selection player is created.

    Player player = Manager.createPlayer("file:///c:/videos/"+VideoGallery.getString(VideoGallery.getSelectedIndex()));

    player.realize();
    VideoControl video = (VideoControl) player.getControl("VideoControl");

    if(video!=null){

    Item videoItem = (Item)video.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);


    statements below this are not getting executed

    plz help me resolving this problem

  2. #2
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    166

    Re: problem in initDisplaymode

    Any one having idea about how to display video using canvas

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: problem in initDisplaymode

    Hi Mahesh,
    If the control is not coming after
    Item videoItem = (Item)video.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);
    to that line that directly means that this lines is throwing any exception.
    Can you catch that, Which exception was it..??
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    166

    Re: problem in initDisplaymode

    hi raj

    its throwing class cast exception check out the complete method

    public void run()
    {

    try
    {

    // InputStream in=getClass().getResourceAsStream("file:///c:/videos/"+VideoGallery.getString(VideoGallery.getSelectedIndex()));
    // getDisplay().setCurrent(showvideo);
    //showvideo.append("file fetched");
    Player player = Manager.createPlayer("file:///c:/videos/"+VideoGallery.getString(VideoGallery.getSelectedIndex()));

    // player.addPlayerListener(this);
    player.prefetch();
    player.realize();
    VideoControl video = (VideoControl) player.getControl("VideoControl");


    //showvideo.append("Item created");

    if(video!=null){

    Item videoItem = (Item)video.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);
    getDisplay().setCurrent(showvideo);
    showvideo.append("file fetched");
    video.setDisplayFullScreen(true);
    // showvideo.append(videoItem);
    video.setVisible(true);
    getDisplay().setCurrent(showvideo);
    player.start();
    showvideo.append("player started");

    }else{
    getDisplay().setCurrent(get_VideoAlert());
    VideoAlert.setString("Unable to play video");
    }
    }catch(Exception ex){
    showvideo.append(ex.toString());
    getDisplay.setCurrent(showvideo);
    }
    }

  5. #5
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    166

    Re: problem in initDisplaymode

    hey raj

    thnks

    had forgotten to check the exception but now its working fine application had problem regarding polish after removing its working fine
    Last edited by mahesh_aquarius; 2008-11-13 at 05:49.

  6. #6
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: problem in initDisplaymode

    Hi,
    You exactly wana play a vedio file..right..
    What type of the vedio you have..extension..
    This is a very simple code to play the same..you can just change the same..
    http://www.java-tips.org/java-me-tip...e-devices.html
    and this also
    http://developers.sun.com/mobility/m...mmapioverview/
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  7. #7
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    166

    Re: problem in initDisplaymode

    thnks for help raj my problem is resolved
    application plays all video files supported by the device
    j2me polish was the only problem after removing it application works fine

    thanks

Similar Threads

  1. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. WAP service problem on Apache
    By bigg_o in forum Browsing and Mark-ups
    Replies: 3
    Last Post: 2005-04-17, 16:05
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

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