Forums - Compatible devices

3 posts / 0 new
Last post
Compatible devices
Hidden_Creative
Join Date: 28 Oct 11
Posts: 6
Posted: Fri, 2011-10-28 08:25

Hi all,

Is there a list of compatible devices. I've got a Galaxy Tab and a nexus S:

On the Galaxy Tab I can't see the image (maybe a camera configuration issue). And it crashes on the nexus S (in the resume Activity).

Thanks,

Hidden

  • Up0
  • Down0
Carsten_Roedel
Join Date: 28 Oct 11
Posts: 3
Posted: Sat, 2011-10-29 12:03

I have the Asus Transformer tablet and get invalid camera parameter exception during, what looks like, setting the focus mode. The sample app force closes. Log: NvOmxCameraSettingsParser  Failed substring capabilities check, unsupported parameter: 'infinity'

However, on my HTC Wildfire S, the sample app works flawless. 

  • Up0
  • Down0
Chad_Sweet
Join Date: 31 Oct 11
Posts: 5
Posted: Mon, 2011-10-31 10:29

The next release, hopefully soon, will improve compatibility of the sample app. Until then, here's a new version of setupCamera which should help on some devices:

private void setupCamera()

  {

 

      // Now that the size is known, set up the camera parameters and begin
      // the preview.
      Camera.Parameters parameters = mCamera.getParameters();

      parameters.setPreviewFrameRate( 30 );
      parameters.setPreviewSize( mDesiredWidth, mDesiredHeight );
      //
      //  Set Focus mode depending on what is supported. MODE_INFINITY is 
      //  preferred mode.
      // 
      List<String> supportedFocusModes = parameters.getSupportedFocusModes();
      if( supportedFocusModes!= null ) 
      {
         if( supportedFocusModes.contains
             (
                Camera.Parameters.FOCUS_MODE_INFINITY
             ) )
         {
            parameters.setFocusMode( Camera.Parameters.FOCUS_MODE_INFINITY );
            Log.v( TAG, "Set focus mode INFINITY" );
         }
         else if( supportedFocusModes.contains
                  (
                     Camera.Parameters.FOCUS_MODE_FIXED
                  ) )
         {
            parameters.setFocusMode( Camera.Parameters.FOCUS_MODE_FIXED );
            Log.v( TAG, "Set focus mode FIXED" );
         }
         else if( supportedFocusModes.contains
                  (
                     Camera.Parameters.FOCUS_MODE_AUTO
                  ) )
         {
            parameters.setFocusMode( Camera.Parameters.FOCUS_MODE_AUTO);
            Log.v( TAG, "Set focus mode AUTO" );
         }
      }
      //
      // Set White Balance to Auto if supported.
      // 
      List<String> supportedWhiteBalance = 
         parameters.getSupportedWhiteBalance();
      if( supportedWhiteBalance != null &amp;&amp;
          supportedWhiteBalance.contains
          (
             Camera.Parameters.WHITE_BALANCE_AUTO
          ) )
      {
         parameters.setWhiteBalance( Camera.Parameters.WHITE_BALANCE_AUTO );
         Log.v( TAG, "Set white balance AUTO" );
      }

      try
      {
         mCamera.setParameters( parameters );
      }
      catch( RuntimeException re )
      {
         //
         // NOTE that we shouldn't be here as we check where our specified 
         // parameters are supported or not. 
         // 
         re.printStackTrace();
         Log.e( TAG,"Unable to set Camera Parameters" );
         Log.i( TAG,"Falling back to setting just the camera preview" );
         parameters = mCamera.getParameters();
         parameters.setPreviewSize( mDesiredWidth, mDesiredHeight );         
         try
         {
            mCamera.setParameters( parameters );
         }
         catch( RuntimeException re2 )
         {
            re2.printStackTrace();
            Log.e( TAG, "Problem with camera configuration, unable to set "+ 
                   "Camera Parameters. Camera not available." );
            
         }
      }

      mPreviewWidth = mCamera.getParameters().getPreviewSize().width;
      mPreviewHeight = mCamera.getParameters().getPreviewSize().height;

      //
      // Perform FastCV example configurations as retrieved from application's
      // preferences
      //
      setScaling(mPrefScale);
      setFastCornerThreshold(mPrefThreshold);

      if(mPrefViewFinderEnable == 1)
         setViewFinderEnable(true);
      else
         setViewFinderEnable(false);

      if(mPrefEnablePixelOverlay == 1)
         setOverlayPixelsEnable(true);
      else
         setOverlayPixelsEnable(false);

      if(mPrefEnableGauss == 1)
         setGaussianEnable(true);
      else
         setGaussianEnable(false);
   }

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.