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


Java VCamera类代码示例

本文整理汇总了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();
}
 
开发者ID:Zhaoss,项目名称:WeiXinRecordedDemo,代码行数:19,代码来源:MainActivity.java

示例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);
}
 
开发者ID:Zhaoss,项目名称:WeiXinRecordedDemo,代码行数:17,代码来源:MyApplication.java

示例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);
}
 
开发者ID:Tinker-S,项目名称:VCameraSample,代码行数:21,代码来源:VCameraDemoApplication.java

示例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();
	}
}
 
开发者ID:Tinker-S,项目名称:VCameraSample,代码行数:20,代码来源:MediaRecorderActivity.java

示例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());
}
 
开发者ID:NullUsera,项目名称:meipai-Android,代码行数:13,代码来源:RecordVideoActivity.java

示例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();
}
 
开发者ID:Zhaoss,项目名称:WeiXinRecordedDemo,代码行数:18,代码来源:MainActivity.java

示例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();

}
 
开发者ID:NullUsera,项目名称:meipai-Android,代码行数:18,代码来源:RecordVideoActivity.java


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