本文整理汇总了Java中com.yixia.camera.VCamera类的典型用法代码示例。如果您正苦于以下问题:Java VCamera类的具体用法?Java VCamera怎么用?Java VCamera使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VCamera类属于com.yixia.camera包,在下文中一共展示了VCamera类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initMediaRecorder
import com.yixia.camera.VCamera; //导入依赖的package包/类
/**
* 初始化录制对象
*/
private void initMediaRecorder() {
mMediaRecorder = new MediaRecorderNative();
mMediaRecorder.setOnEncodeListener(this);
String key = String.valueOf(System.currentTimeMillis());
//设置缓存文件夹
mMediaObject = mMediaRecorder.setOutputDirectory(key, VCamera.getVideoCachePath());
//设置视频预览源
mMediaRecorder.setSurfaceHolder(sv_ffmpeg.getHolder());
//准备
mMediaRecorder.prepare();
//滤波器相关
UtilityAdapter.freeFilterParser();
UtilityAdapter.initFilterParser();
}
示例2: onCreate
import com.yixia.camera.VCamera; //导入依赖的package包/类
@Override
public void onCreate() {
VIDEO_PATH += String.valueOf(System.currentTimeMillis());
File file = new File(VIDEO_PATH);
if(!file.exists()) file.mkdirs();
//设置视频缓存路径
VCamera.setVideoCachePath(VIDEO_PATH);
// 开启log输出,ffmpeg输出到logcat
VCamera.setDebugMode(true);
// 初始化拍摄SDK,必须
VCamera.initialize(this);
}
示例3: onCreate
import com.yixia.camera.VCamera; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// 设置拍摄视频缓存路径
File dcim = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);
if (DeviceUtils.isZte()) {
if (dcim.exists()) {
VCamera.setVideoCachePath(dcim + "/Camera/VCameraDemo/");
} else {
VCamera.setVideoCachePath(dcim.getPath().replace("/sdcard/", "/sdcard-ext/") + "/Camera/VCameraDemo/");
}
} else {
VCamera.setVideoCachePath(dcim + "/Camera/VCameraDemo/");
}
// 开启log输出,ffmpeg输出到logcat
VCamera.setDebugMode(true);
// 初始化拍摄SDK,必须
VCamera.initialize(this);
}
示例4: initMediaRecorder
import com.yixia.camera.VCamera; //导入依赖的package包/类
private void initMediaRecorder() {
mMediaRecorder = new MediaRecorderFilter();
mMediaRecorder.setOnErrorListener(this);
mMediaRecorder.setOnPreparedListener(this);
//WIFI下800k码率,其他情况(4G/3G/2G)600K码率
mMediaRecorder.setVideoBitRate(NetworkUtils.isWifiAvailable(this) ? MediaRecorder.VIDEO_BITRATE_MEDIUM : MediaRecorder.VIDEO_BITRATE_NORMAL);
// mMediaRecorder.setSurfaceHolder(mSurfaceView.getHolder());
mMediaRecorder.setSurfaceView(mSurfaceView);
String key = String.valueOf(System.currentTimeMillis());
mMediaObject = mMediaRecorder.setOutputDirectory(key, VCamera.getVideoCachePath() + key);
if (mMediaObject != null) {
mMediaRecorder.prepare();
mMediaRecorder.setCameraFilter(MediaRecorderFilter.CAMERA_FILTER_NO);
mProgressView.setData(mMediaObject);
} else {
Toast.makeText(this, R.string.record_camera_init_faild, Toast.LENGTH_SHORT).show();
finish();
}
}
示例5: initVCamera
import com.yixia.camera.VCamera; //导入依赖的package包/类
private void initVCamera() {
mVideoPath = FileUtil.getCacheDir(this) + RECORD_TEMP_FILE_NAME + "/" + System.currentTimeMillis();
File file = new File(mVideoPath);
if (!file.exists()) {
//noinspection ResultOfMethodCallIgnored
file.mkdirs();
}
VCamera.setVideoCachePath(mVideoPath);
VCamera.setDebugMode(true);
VCamera.initialize(getApplicationContext());
}
示例6: initMediaRecorder
import com.yixia.camera.VCamera; //导入依赖的package包/类
/**
* 初始化录制对象
*/
private void initMediaRecorder() {
mMediaRecorder = new MediaRecorderNative();
String key = String.valueOf(System.currentTimeMillis());
//设置缓存文件夹
mMediaObject = mMediaRecorder.setOutputDirectory(key, VCamera.getVideoCachePath());
//设置视频预览源
mMediaRecorder.setSurfaceHolder(sv_ffmpeg.getHolder());
//准备
mMediaRecorder.prepare();
//滤波器相关
UtilityAdapter.freeFilterParser();
UtilityAdapter.initFilterParser();
}
示例7: initMediaRecorder
import com.yixia.camera.VCamera; //导入依赖的package包/类
/**
* 初始化录制对象
*/
private void initMediaRecorder() {
mMediaRecorder = new MediaRecorderNative();
String key = String.valueOf(System.currentTimeMillis());
//设置缓存文件夹
mMediaObject = mMediaRecorder.setOutputDirectory(key, VCamera.getVideoCachePath());
//设置视频预览源
mMediaRecorder.setSurfaceHolder(svFocusRecordVideoActivity.getHolder());
//准备
mMediaRecorder.prepare();
//滤波器相关
UtilityAdapter.freeFilterParser();
UtilityAdapter.initFilterParser();
}