本文整理汇总了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");
}
}
示例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);
}
}
}
示例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);
}
}