当前位置: 首页>>代码示例>>Java>>正文


Java CameraUtil.isVideoSnapshotSupported方法代码示例

本文整理汇总了Java中com.android.camera.util.CameraUtil.isVideoSnapshotSupported方法的典型用法代码示例。如果您正苦于以下问题:Java CameraUtil.isVideoSnapshotSupported方法的具体用法?Java CameraUtil.isVideoSnapshotSupported怎么用?Java CameraUtil.isVideoSnapshotSupported使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.camera.util.CameraUtil的用法示例。


在下文中一共展示了CameraUtil.isVideoSnapshotSupported方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: takeASnapshot

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
private void takeASnapshot() {
    // Only take snapshots if video snapshot is supported by device
    if (CameraUtil.isVideoSnapshotSupported(mParameters) && !mIsVideoCaptureIntent) {
        if (!mMediaRecorderRecording || mPaused || mSnapshotInProgress) {
            return;
        }
        MediaSaveService s = mActivity.getMediaSaveService();
        if (s == null || s.isQueueFull()) {
            return;
        }

        // Set rotation and gps data.
        int rotation = CameraUtil.getJpegRotation(mCameraId, mOrientation);
        mParameters.setRotation(rotation);
        Location loc = mLocationManager.getCurrentLocation();
        CameraUtil.setGpsParameters(mParameters, loc);
        mCameraDevice.setParameters(mParameters);

        Log.v(TAG, "Video snapshot start");
        mCameraDevice.takePicture(mHandler,
                null, null, null, new JpegPictureCallback(loc));
        showVideoSnapshotUI(true);
        mSnapshotInProgress = true;
        UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA,
                UsageStatistics.ACTION_CAPTURE_DONE, "VideoSnapshot");
    }
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:28,代码来源:VideoModule.java

示例2: initializeVideoSnapshot

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
private void initializeVideoSnapshot() {
    if (mParameters == null) return;
    if (CameraUtil.isVideoSnapshotSupported(mParameters) && !mIsVideoCaptureIntent) {
        // Show the tap to focus toast if this is the first start.
        if (mPreferences.getBoolean(
                    CameraSettings.KEY_VIDEO_FIRST_USE_HINT_SHOWN, true)) {
            // Delay the toast for one second to wait for orientation.
            mHandler.sendEmptyMessageDelayed(SHOW_TAP_TO_SNAPSHOT_TOAST, 1000);
        }
    }
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:12,代码来源:VideoModule.java

示例3: showVideoSnapshotUI

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
void showVideoSnapshotUI(boolean enabled) {
    if (mParameters == null) return;
    if (CameraUtil.isVideoSnapshotSupported(mParameters) && !mIsVideoCaptureIntent) {
        if (enabled) {
            mUI.animateFlash();
            mUI.animateCapture();
        } else {
            mUI.showPreviewBorder(enabled);
        }
        mUI.enableShutter(!enabled);
    }
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:13,代码来源:VideoModule.java


注:本文中的com.android.camera.util.CameraUtil.isVideoSnapshotSupported方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。