Java Code Examples for android.media.CamcorderProfile#QUALITY_HIGH

The following examples show how to use android.media.CamcorderProfile#QUALITY_HIGH . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CameraSession.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
private int getHigh() {
    if ("LGE".equals(Build.MANUFACTURER) && "g3_tmo_us".equals(Build.PRODUCT)) {
        return CamcorderProfile.QUALITY_480P;
    }
    return CamcorderProfile.QUALITY_HIGH;
}
 
Example 2
Source File: VideoModule.java    From Camera2 with Apache License 2.0 4 votes vote down vote up
private void readVideoPreferences()
{
    // The preference stores values from ListPreference and is thus string type for all values.
    // We need to convert it to int manually.
    SettingsManager settingsManager = mActivity.getSettingsManager();
    String videoQualityKey = isCameraFrontFacing() ? Keys.KEY_VIDEO_QUALITY_FRONT
            : Keys.KEY_VIDEO_QUALITY_BACK;
    String videoQuality = settingsManager
            .getString(SettingsManager.SCOPE_GLOBAL, videoQualityKey);
    int quality = SettingsUtil.getVideoQuality(videoQuality, mCameraId);
    Log.d(TAG, "Selected video quality for '" + videoQuality + "' is " + quality);

    // Set video quality.
    Intent intent = mActivity.getIntent();
    if (intent.hasExtra(MediaStore.EXTRA_VIDEO_QUALITY))
    {
        int extraVideoQuality =
                intent.getIntExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
        if (extraVideoQuality > 0)
        {
            quality = CamcorderProfile.QUALITY_HIGH;
        } else
        {  // 0 is mms.
            quality = CamcorderProfile.QUALITY_LOW;
        }
    }

    // Set video duration limit. The limit is read from the preference,
    // unless it is specified in the intent.
    if (intent.hasExtra(MediaStore.EXTRA_DURATION_LIMIT))
    {
        int seconds =
                intent.getIntExtra(MediaStore.EXTRA_DURATION_LIMIT, 0);
        mMaxVideoDurationInMs = 1000 * seconds;
    } else
    {
        mMaxVideoDurationInMs = SettingsUtil.getMaxVideoDuration(mActivity
                .getAndroidContext());
    }

    // If quality is not supported, request QUALITY_HIGH which is always supported.
    if (CamcorderProfile.hasProfile(mCameraId, quality) == false)
    {
        quality = CamcorderProfile.QUALITY_HIGH;
    }
    mProfile = CamcorderProfile.get(mCameraId, quality);
    mPreferenceRead = true;
}
 
Example 3
Source File: CameraSession.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
private int getHigh() {
    if ("LGE".equals(Build.MANUFACTURER) && "g3_tmo_us".equals(Build.PRODUCT)) {
        return CamcorderProfile.QUALITY_480P;
    }
    return CamcorderProfile.QUALITY_HIGH;
}
 
Example 4
Source File: CameraSession.java    From KrGallery with GNU General Public License v2.0 4 votes vote down vote up
private int getHigh() {
    if ("LGE".equals(Build.MANUFACTURER) && "g3_tmo_us".equals(Build.PRODUCT)) {
        return CamcorderProfile.QUALITY_480P;
    }
    return CamcorderProfile.QUALITY_HIGH;
}
 
Example 5
Source File: CameraSession.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
private int getHigh() {
    if ("LGE".equals(Build.MANUFACTURER) && "g3_tmo_us".equals(Build.PRODUCT)) {
        return CamcorderProfile.QUALITY_480P;
    }
    return CamcorderProfile.QUALITY_HIGH;
}
 
Example 6
Source File: CameraSession.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
private int getHigh() {
    if ("LGE".equals(Build.MANUFACTURER) && "g3_tmo_us".equals(Build.PRODUCT)) {
        return CamcorderProfile.QUALITY_480P;
    }
    return CamcorderProfile.QUALITY_HIGH;
}