×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    14

    Invalid locator: capture://video

    Hi All,

    I'm trying to capture an image, but always it gives an error:
    javax.microedition.media.MediaException: Invalid locator: capture://video?encoding=image/jpeg
    or
    javax.microedition.media.MediaException: Invalid locator: capture://video?encoding=png
    I have also checked by System.getProperty("video.snapshot.encodings"); it returns "encoding=image/jpeg"
    I'm trying in NetBeanse 6.9.1 and emulator for Nokia Series 40
    my code is ==>
    player = Manager.createPlayer("capture://image"); //("capture://video");
    player.realize();
    videoControl = (VideoControl) (player.getControl("VideoControl"));
    videoControl.initDisplayMode(videoControl.USE_DIRECT_VIDEO,this);
    player.start();
    videoControl.setVisible(true);
    ................
    ...............
    if(videoControl != null){
    byte[] image = videoControl.getSnapshot("encoding=image/jpeg"); //Exception is giving in this location
    ........
    ...................
    }
    also I have tried videoControl.getSnapshot("null"); but same Exception I am getting javax.microedition.media.MediaException: Invalid locator: capture://video?null

    Please help me,it's urgent....
    Thanks,
    Shailendra

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Invalid locator: capture://video

    byte[] image = videoControl.getSnapshot("encoding=image/jpeg"); //Exception is giving in this location
    Please try

    Code:
    byte[] image = videoControl.getSnapshot("encoding=image/jpg");
    or if you want to specify the image dimensions (in case you get a very large image byte array)

    Code:
    byte[] image = videoControl.getSnapshot("encoding=image/jpg&width=270&height=360");

Similar Threads

  1. Locator not supported: capture://video
    By amit.rathi1982 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 12
    Last Post: 2011-05-27, 08:36
  2. Replies: 1
    Last Post: 2010-06-16, 07:45
  3. Nokia 6280 Problems Capture Video and Locator...
    By rodperez in forum Mobile Java Media (Graphics & Sounds)
    Replies: 10
    Last Post: 2008-05-19, 18:35
  4. exception :Invalid Locator, need help
    By bybash in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2007-03-13, 01:36
  5. Not supported locator: capture://video N73
    By nagkumar in forum Mobile Java General
    Replies: 2
    Last Post: 2007-02-19, 09: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
  •