×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2009
    Location
    Russia
    Posts
    10

    Camera and device orientation

    Code:
    Player p;
    VideoControl vc;
    p = Manager.createPlayer("capture://devcam0");
    p.realize();
    vc = (VideoControl)p.getControl("VideoControl");
    vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
    p.start();
    vc.setVisible(true);
    This code is in a constructor of a class extended from Canvas.
    When I start this app on Nokia 5800 in landscape orientation, it seems to work fine. But in portrait it shows only a part of viewfinder in the top of the screen. So, how do I get a full-size viewfinder (without clipping) in a portrait orientation? Tried to use locator string "capture://devcam0?width=480&height=640" and it failed with MediaException.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: Camera and device orientation

    Quote Originally Posted by Sean_11 View Post
    Code:
    Player p;
    VideoControl vc;
    p = Manager.createPlayer("capture://devcam0");
    p.realize();
    vc = (VideoControl)p.getControl("VideoControl");
    vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
    p.start();
    vc.setVisible(true);
    This code is in a constructor of a class extended from Canvas.
    When I start this app on Nokia 5800 in landscape orientation, it seems to work fine. But in portrait it shows only a part of viewfinder in the top of the screen. So, how do I get a full-size viewfinder (without clipping) in a portrait orientation? Tried to use locator string "capture://devcam0?width=480&height=640" and it failed with MediaException.
    What happens when you start the app in Portrait mode itself... while changing the orientation - you might require to re-initialize the player.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

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

    Thumbs up Re: Camera and device orientation

    Quote Originally Posted by Sean_11 View Post
    Code:
    Player p;
    VideoControl vc;
    p = Manager.createPlayer("capture://devcam0");
    p.realize();
    vc = (VideoControl)p.getControl("VideoControl");
    vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
    p.start();
    vc.setVisible(true);
    This code is in a constructor of a class extended from Canvas.
    When I start this app on Nokia 5800 in landscape orientation, it seems to work fine. But in portrait it shows only a part of viewfinder in the top of the screen. So, how do I get a full-size viewfinder (without clipping) in a portrait orientation? Tried to use locator string "capture://devcam0?width=480&height=640" and it failed with MediaException.
    While you are changing the mode as portrait from the landscape, Inside "capture://devcam0?width=480&height=640", try to give the width and height as 240 and 320 respectively, and let us know the results.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. portrait orientation and landscape orientation in N96
    By videoFx in forum [Archived] Flash Lite on Nokia Devices
    Replies: 0
    Last Post: 2009-05-20, 15:13
  2. Camera orientation
    By patrickfrei in forum Symbian
    Replies: 6
    Last Post: 2008-04-05, 21:47
  3. Application/camera orientation
    By dudi in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2008-01-29, 16:52
  4. Camera image orientation
    By phishboh in forum Symbian
    Replies: 1
    Last Post: 2007-09-28, 08:53

Posting Permissions

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