Log in or register to post comments

CameraDevice doesn't return any getNumVideoModes()

April 30, 2016 - 9:40am #1

I'm playing with your AR-VR5-5-9 demo.

The device I'm testing right now is a LG G4 with Android 6.0

It's working properly apart the live camera resolution: it's grabbing a 16:9 video.

Such a video, when rendered on the two CardBoard halfs, doesn't fullfill the entire screen.

 

To avoid the issue I tried to select the camera resolution. I'd like to set a 4:3 screen resolution that would better fit the screen when CardBoard mode is turned on.

 

There starts the issue. On such a device the getNumVideoModes() return 0.

Just to check, I tried to inspect the getVideoMode(0) that is returning w=0, h=0, frame rate=0.

 

Below my simple loop:

int nvm = CameraDevice.getInstance().getNumVideoModes();
for (int i=0; i<=nvm;i++) {
    vvm=CameraDevice.getInstance().getVideoMode(i);
    Log.v("VVM","Video enum: " + i);
    Log.v("VVM","Framerate: " + vvm.getFramerate());
    Log.v("VVM","Video Height: " + vvm.getHeight());
    Log.v("VVM","Video Width: " + vvm.getWidth());
}

CameraDevice doesn't return any getNumVideoModes()

May 5, 2016 - 12:24pm #4

When calling the getVideoMode(  mode  ) method, you can use one of the following 3 options:

 

  1. CameraDevice::getInstance().getVideoMode(Vuforia::CameraDevice::MODE_DEFAULT);
  2. CameraDevice::getInstance().getVideoMode(Vuforia::CameraDevice::MODE_OPTIMIZE_SPEED);
  3. CameraDevice::getInstance().getVideoMode(Vuforia::CameraDevice::MODE_OPTIMIZE_QUALITY);

 

You would not need to query the getNumVideoModes() for the 3 cases above, as those are predefined enums.

CameraDevice doesn't return any getNumVideoModes()

May 2, 2016 - 3:09pm #3

Can you provide the exact string for "Device Name" from Settings->About device for your device?

Thanks.

CameraDevice doesn't return any getNumVideoModes()

April 30, 2016 - 9:57am #2

I think I've found the way modifinyg the configureVideoBackground().

I'll update the post when I'll get a fully working solution.

 

By the way, why the getNumVideoModes() returning 0 on my device?

 

Log in or register to post comments