cainkernel / caincamera Goto Github PK
View Code? Open in Web Editor NEWCainCamera is an Android Project to learn about development of beauty camera, image and short video
CainCamera is an Android Project to learn about development of beauty camera, image and short video
快速点击录制按钮不断进行录制、停止录制功能切换,小概率导致找不到录制的视频文件,录制的视频数目正确。
呵呵
@CainKernel 你好, 我看到RenderManager初始化滤镜的时候添加了许多滤镜,有些滤镜效果我希望禁调, 但是我注释掉任何一个滤镜之后就看不到预览的画面。该如何处理, 才能去掉一些滤镜,能指点下吗?
@CainKernel 你好, 我看到在RenderThread中,你是收到相机的回调方法onPreviewFrame之后调用requestRender,然后开始drawFrame的,在drawFrame中调用了updateTexImage。但是updateTexImage需要在SurfaceTexture的一帧数据可用之后调用。这里能够保证onFrameAvailable在相机回调onPreviewFrame之前就被调用了吗?
CainCamera-master\ffmpeglibrary\src\main\cpp\cainmedia\cainsdl\cainsdl_egl.c
undefined reference to 'eglMakeCurrent'
undefined reference to 'eglDestroyContext'
undefined reference to 'eglDestroySurface'
undefined reference to 'eglReleaseThread'
在红米5Plus 中,经过上述操作之后,从原先的平均30帧降低到了平均21帧,原因目前还在找
老哥ffmpeg x264是什么版本,怎么编译出错
LandmarkEngine.getInstance().hasFace()始终为false和LandmarkEngine.getInstance().getFaceSize()始终为0,这是为什么呢
java.lang.RuntimeException: glReadPixels: glError 0x502
at com.cgfay.filterlibrary.glfilter.utils.OpenGLUtils.checkGlError(OpenGLUtils.java:184)
at com.cgfay.filterlibrary.gles.EglSurfaceBase.getCurrentFrame(EglSurfaceBase.java:172)
at com.cgfay.cameralibrary.engine.render.RenderThread.surfaceCreated(RenderThread.java:169)
at com.cgfay.cameralibrary.engine.render.RenderHandler.handleMessage(RenderHandler.java:68)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.os.HandlerThread.run(HandlerThread.java:61)
一拍照就报这个 A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 5243闪退了
/**
* 获取当前帧的缓冲
* @return
*/
public ByteBuffer getCurrentFrame() {
int width = getWidth();
int height = getHeight();
ByteBuffer buf = ByteBuffer.allocateDirect(width * height * 4);
buf.order(ByteOrder.LITTLE_ENDIAN);
GLES30.glReadPixels(0, 0, width, height,
GLES30.GL_RGBA, GLES30.GL_UNSIGNED_BYTE, buf);
OpenGLUtils.checkGlError("glReadPixels");
buf.rewind();
return buf;
}
buf为数组为空
如何获取相机预览的原始帧数据和美颜后的帧数据?在哪里获取?
使用FFmpeg命令工具合并多个视频时,不同的视频有不同的滤镜,此时合并将会失败。
最近在做美颜 滤镜 看你源码里面有好多library 如果只需要用到美颜 滤镜 磨皮 用那几个?
机型小米Max2
横竖屏切换会出现崩溃现象
横竖屏切换的快的话会出现
另外横屏之后预览画面没有切换成横屏 但拍出来的视频正常
java.lang.RuntimeException: glCreateShader type=35633: glError 0x501
at com.cgfay.filterlibrary.glfilter.utils.OpenGLUtils.checkGlError(OpenGLUtils.java:184)
at com.cgfay.filterlibrary.glfilter.utils.OpenGLUtils.loadShader(OpenGLUtils.java:161)
at com.cgfay.filterlibrary.glfilter.utils.OpenGLUtils.createProgram(OpenGLUtils.java:123)
at com.cgfay.filterlibrary.glfilter.base.GLImageFilter.initProgramHandle(GLImageFilter.java:103)
at com.cgfay.filterlibrary.glfilter.base.GLImageOESInputFilter.initProgramHandle(GLImageOESInputFilter.java:30)
at com.cgfay.filterlibrary.glfilter.base.GLImageFilter.<init>(GLImageFilter.java:94)
at com.cgfay.filterlibrary.glfilter.base.GLImageOESInputFilter.<init>(GLImageOESInputFilter.java:25)
at com.cgfay.filterlibrary.glfilter.base.GLImageOESInputFilter.<init>(GLImageOESInputFilter.java:20)
at com.cgfay.cameralibrary.engine.render.RenderManager.initFilters(RenderManager.java:137)
at com.cgfay.cameralibrary.engine.render.RenderManager.init(RenderManager.java:72)
at com.cgfay.cameralibrary.engine.render.RenderThread.surfaceCreated(RenderThread.java:147)
at com.cgfay.cameralibrary.engine.render.RenderHandler.handleMessage(RenderHandler.java:68)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.os.HandlerThread.run(HandlerThread.java:61)
是需要自己重新弄个face++的人脸识别sdk吗,直接跑你的工程好像已经没有反应了。
大神,全屏预览会变形怎么处理啊
My ndk is r16b.
E:\project\demo\CainCamera\ffmpeglibrary\src\main\cpp\cainmedia\cainfilters\YUV420PImageFilter.cpp
fatal error: 'GlShaders.h' file not found
fatal error: 'GlShaders.h' file not found
E:\project\demo\CainCamera\ffmpeglibrary\src\main\cpp\cainmedia\cainplayer\Demuxer.h
error: unknown linkage language
error: unknown linkage language
error: unknown linkage language
error: unknown linkage language
error: unknown linkage language
error: unknown linkage language
2019-01-16 17:49:34.945 24511-24511/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{c761204 com.android.packageinstaller/com.android.packageinstaller.permission.ui.GrantPermissionsActivity,ident = 15}, this = DecorView@a8ab335[GrantPermissionsActivity]
2019-01-16 17:49:34.946 24511-24511/? I/Choreographer: Skipped 5 frames! The application may be doing too much work on its main thread.
2019-01-16 17:49:34.946 1257-26888/? D/AES: onEndOfErrorDumpThread: data_app_crash Process: com.cgfay.caincamera
Time: 1547632174842
Flags: 0x38e8bf46
Package: com.cgfay.caincamera v1 (1.0)
PID: 26842
Foreground: Yes
Build: OPPO/A79/A79:7.1.1/N6F26Q/1536669917:user/release-keys
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.next(ArrayList.java:831)
at com.cgfay.filterlibrary.glfilter.resource.FilterHelper.decompressResource(FilterHelper.java:84)
at com.cgfay.filterlibrary.glfilter.resource.FilterHelper.initAssetsFilter(FilterHelper.java:66)
at com.cgfay.caincamera.activity.MainActivity$2.run(MainActivity.java:148)
at java.lang.Thread.run(Thread.java:761)
CPU usage from 41475ms to 0ms ago (2019-01-16 17:48:53.369 to 2019-01-16 17:49:34.844):
33% 1257/system_server: 25% user + 7.6% kernel / faults: 26665 minor 12 major
22% 367/surfaceflinger: 12% user + 9.5% kernel / faults: 658 minor 2 major
12% 1699/com.android.systemui: 8.8% user + 4% kernel / faults: 3505 minor 2 major
7.9% 560/cameraserver: 6.4% user + 1.5% kernel / faults: 12637 minor
9.8% 24511/com.android.packageinstaller: 6.9% user + 2.8% kernel / faults: 3660 minor 5 major
5.9% 2789/com.oppo.launcher: 4.5% user + 1.3% kernel / faults: 19864 minor 7 major
4.4% 24179/adbd: 1.1% user + 3.3% kernel / faults: 9015 minor
4.2% 2600/com.coloros.safecenter: 3.1% user + 1% kernel / faults: 14615 minor 3 major
4% 1664/com.nearme.statistics.rom: 3% user + 0.9% kernel / faults: 1600 minor 3 major
2.7% 307/logd: 0.7% user + 1.9% kernel / faults: 11 minor
2% 225/exe_cq: 0% user + 2% kernel
1.3% 23763/com.oppo.market: 1.1% user + 0.2% kernel / faults: 2529 minor 4 major
1.4% 366/servicemanager: 0.5% user + 0.9% kernel
1.4% 1616/com.coloros.safecenter:clear_filter: 0.8% user + 0.6% kernel / faults: 259 minor
1.4% 6504/com.google.android.gms: 1.1% user + 0.3% kernel / faults: 744 minor 2 major
1.1% 25785/com.coloros.weather.service: 0.7% user + 0.3% kernel / faults: 1497 minor 14 major
1.2% 474/disp_queue_P0: 0% user + 1.2% kernel
1% 1555/tx_thread: 0% user + 1% kernel
1% 227/mmcqd/0: 0% user + 1% kernel
0.9% 18975/kworker/u17:0: 0% user + 0.9% kernel
0.9% 2482/com.coloros.securitypermission: 0.5% user + 0.3% kernel / faults: 436 minor 1 major
0.7% 22817/kworker/u17:2: 0% user + 0.7% kernel
0.8% 537/aal: 0.4% user + 0.4% kernel
0.6% 189/tee_fastcall: 0% user + 0.6% kernel
0.8% 1747/com.android.phone: 0.6% user + 0.2% kernel / faults: 109 minor
0.8% 16953/kworker/u16:5: 0% user + 0.8% kernel
0.7% 24240/logcat: 0.2% user + 0.4% kernel / faults: 1 minor
0.6% 7/rcu_preempt: 0% user + 0.6% kernel
0.4% 24807/com.nearme.gamec
--------- beginning of main
01-16 17:49:31.501 2789 2789 D Launcher.PackageUpdateHandler: onReceive intent = Intent { act=oppo.intent.action.OPPO_START_INSTALL flg=0x10 (has extras) }
01-16 17:49:31.501 2789 2789 D Launcher.PackageUpdateHandler: onReceive userHandle = UserHandle{0}
01-16 17:49:31.508 1257 1257 I PackageManager: onServiceConnected
01-16 17:49:31.508 1257 1257 I PackageManager: onServiceConnected: true, 0
01-16 17:49:31.523 2789 2943 I OppoConvertIcon: maskBitmap -- mIconBackground == null
01-16 17:49:31.524 2789 2789 D Launcher.Launcher: addToAllAppsListData, result = true, appInfo = App{T=null U=true UN=0 CN=ComponentInfo{com.cgfay.caincamera/downloadAppClassName} IS=4 ISrc=com.android.packageinstaller DP = 0 TP = 100 S=-1 C=-1 cell=-1/-1 span=1/1 rank=0 loc=0}
01-16 17:49:31.524 2789 2789 D Launcher.Workspace: addApps, 11 findEmptyCell success: [1, 1] for com.cgfay.caincamera
01-16 17:49:31.528 2789 2789 I OppoConvertIcon: maskBitmap -- mIconBackground == null
01-16 17:49:31.545 1257 1393 I PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl979895754.tmp/base.apk pkg=com.cgfay.caincamera isa=arm vmSafeMode=false debuggable=true target-filter=interpret-only oatDir = /data/app/vmdl979895754.tmp/oat sharedLibraries=null
--------- beginning of events
01-16 17:49:31.570 1257 1311 I am_destroy_activity: [0,118710639,6913,com.android.pack
2019-01-16 17:49:34.946 1257-26888/? W/AES: Exception Log handling...
2019-01-16 17:49:34.970 1257-26888/? D/AES: ExceptionLog: notify aed
2019-01-16 17:49:34.970 1257-26888/? D/AES: process : com.cgfay.caincamera
2019-01-16 17:49:34.970 1257-26888/? D/AES: module : com.cgfay.caincamera v1 (1.0)
2019-01-16 17:49:34.970 1257-26888/? D/AES: cause : data_app_crash
2019-01-16 17:49:34.970 1257-26888/? D/AES: pid : 26842
2019-01-16 17:49:34.970 1257-26888/? D/AEE_LIBAEE: shell: raise_exp(4, 26842, -1361051648, com.cgfay.caincamera, 0x0x7e43385f20, 0x0x0)
2019-01-16 17:49:34.971 1257-26888/? D/AEE_LIBAEE: shell: connected with AED OK
2019-01-16 17:49:34.972 596-596/? D/AEE_AED:
2019-01-16 17:49:34.972 596-596/? D/AEE_AED: p 1 poll events 1 revents 1
2019-01-16 17:49:34.972 596-596/? D/AEE_AED: PPM cpu cores:8, online:8
2019-01-16 17:49:34.973 596-596/? D/AEE_AED: aed_main_fork_worker: generator 0x7e4f42fcc0, worker 0x7fe98849e0, recv_fd 12
2019-01-16 17:49:34.974 26892-26892/? D/AEE_AED: read success, handling msg (Ind, AE_IND_EXP_RAISED)
2019-01-16 17:49:34.974 26892-26892/? I/AEE_AED: [preset_info] pid: 26842, tid: -1361051648, name: UNKNOWN >>> UNKNOWN <<<
2019-01-16 17:49:34.974 26892-26892/? V/AEE_AED: Write: Req.AE_REQ_PROCESS, seq:ffffffff
2019-01-16 17:49:34.974 1257-26888/? D/AEE_LIBAEE: shell: got the request (cmd:Req,AE_REQ_PROCESS)
2019-01-16 17:49:34.975 26892-26892/? V/AEE_AED: Read: Rsp.AE_REQ_PROCESS, seq:ffffffff, 0, 15
2019-01-16 17:49:34.975 26892-26892/? D/AEE_AED: Process:com.cgfay.caincamera
2019-01-16 17:49:34.975 26892-26892/? V/AEE_AED: dashboard_record_update() : rec->module = com.cgfay.caincamera
2019-01-16 17:49:34.975 26892-26892/? D/AEE_AED: Duplicated exception, cnt = 2
2019-01-16 17:49:34.975 26892-26892/? D/AEE_AED: Last exception time: 1547632122
2019-01-16 17:49:34.975 26892-26892/? D/AEE_AED: cur time: 1547632174
2019-01-16 17:49:34.975 26892-26892/? D/AEE_AED: Skip for Exp level'0'
2019-01-16 17:49:34.975 1257-1343/? V/WindowManager: reevaluateVisibility focusApp:AppWindowToken{aa4ba44 token=Token{9958f57 ActivityRecord{6ed10d6 u0 com.android.packageinstaller/.permission.ui.GrantPermissionsActivity t6915}}}
2019-01-16 17:49:34.975 1257-26888/? D/AEE_LIBAEE: shell: got the request (cmd:Ind,AE_IND_LOG_CLOSE)
2019-01-16 17:49:34.975 1257-26888/? D/AEE_LIBAEE: shell: Got session close ind from AED
2019-01-16 17:49:34.976 596-596/? D/AEE_AED: clear ppm settings
2019-01-16 17:49:34.976 367-367/? I/BufferQueue: unnamed-367-430 BufferQueue core=(367:/system/bin/surfaceflinger)
2019-01-16 17:49:34.976 596-596/? D/AEE_AED:
2019-01-16 17:49:34.976 367-367/? I/BufferQueueConsumer: unnamed-367-430 connect(C): consumer=(367:/system/bin/surfaceflinger) controlledByApp=false
2019-01-16 17:49:34.977 367-367/? D/MALI: eglCreateImageKHR:501: [Crop] 0 0 0 0 img[1080 674]
我录制完一段想走一下合并流程crash了 请问是哪里的问题呢
D/CameraPreviewFragment: 开始合并
2019-01-30 11:46:58.210 3835-4851/com.abc.demo E/WVMExtractor: Failed to open libwvm.so: dlopen failed: library "libwvm.so" not found
2019-01-30 11:46:58.266 3835-3835/com.abc.demo V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@9cca21c
2019-01-30 11:46:58.329 3835-4851/com.abc.demo E/VideoCombiner: No video track found in /storage/emulated/0/Android/data/com.abc.demo/cache/audio/video_temp.mp4
2019-01-30 11:46:58.329 3835-4851/com.abc.demo E/VideoCombiner: No audio track found in /storage/emulated/0/Android/data/com.abc.demo/cache/audio/video_temp.mp4
2019-01-30 11:46:58.443 3835-4851/com.abc.demo I/MPEG4Writer: limits: 4294967295/0 bytes/us, bit rate: -1 bps and the estimated moov size 3195 bytes
2019-01-30 11:46:58.443 3835-4851/com.abc.demo E/MPEG4Writer: No source added
--------- beginning of crash
2019-01-30 11:46:58.444 3835-4851/com.abc.demo E/AndroidRuntime: FATAL EXCEPTION: Thread-50
Process: com.abc.demo, PID: 3835
java.lang.IllegalStateException: Failed to start the muxer
at android.media.MediaMuxer.nativeStart(Native Method)
at android.media.MediaMuxer.start(MediaMuxer.java:231)
at com.cgfay.filterlibrary.multimedia.VideoCombiner.combineVideo(VideoCombiner.java:135)
at com.abc.demo.ui.editor.fragment.VideoRecordFragment$15.run(VideoRecordFragment.java:1382)
at java.lang.Thread.run(Thread.java:760)
2019-01-30 11:46:58.462 3835-4851/com.abc.demo E/CrashReport: Java Crash Happen cause by Thread-50(3364)
2019-01-30 11:46:58.521 3835-4660/com.abc.demo D/MPEG4Writer: Audio track stopping
2019-01-30 11:46:58.521 3835-4687/com.abc.demo I/MPEG4Writer: Received total/0-length (385/0) buffers and encoded 385 frames. - Audio
2019-01-30 11:46:58.521 3835-4660/com.abc.demo D/MPEG4Writer: Audio track source stopping
2019-01-30 11:46:58.521 3835-4687/com.abc.demo I/MPEG4Writer: Audio track drift time: 0 us
2019-01-30 11:46:58.521 3835-4660/com.abc.demo D/MPEG4Writer: Audio track source stopped
2019-01-30 11:46:58.522 3835-4660/com.abc.demo D/MPEG4Writer: Audio track stopped
2019-01-30 11:46:58.522 3835-4660/com.abc.demo D/MPEG4Writer: Video track stopping
2019-01-30 11:46:58.522 3835-4660/com.abc.demo D/MPEG4Writer: Video track source stopping
2019-01-30 11:46:58.522 3835-4660/com.abc.demo D/MPEG4Writer: Video track source stopped
2019-01-30 11:46:58.523 3835-4688/com.abc.demo I/MPEG4Writer: Received total/0-length (263/0) buffers and encoded 263 frames. - Video
2019-01-30 11:46:58.528 3835-4660/com.abc.demo D/MPEG4Writer: Video track stopped
2019-01-30 11:46:58.528 3835-4660/com.abc.demo D/MPEG4Writer: Duration from tracks range is [8728371, 9141338] us
2019-01-30 11:46:58.528 3835-4660/com.abc.demo D/MPEG4Writer: Stopping writer thread
2019-01-30 11:46:58.539 3835-4686/com.abc.demo D/MPEG4Writer: 0 chunks are written in the last batch
2019-01-30 11:46:58.539 3835-4660/com.abc.demo D/MPEG4Writer: Writer thread stopped
2019-01-30 11:46:58.541 3835-4660/com.abc.demo I/MPEG4Writer: The mp4 file will not be streamable.
2019-01-30 11:46:58.542 3835-4660/com.abc.demo D/MPEG4Writer: Audio track stopping
2019-01-30 11:46:58.542 3835-4660/com.abc.demo D/MPEG4Writer: Video track stopping
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
The target system is: Android - 1 - armv7-a
The host system is: Windows - 10.0.14393 - AMD64
how can I save the photo?
@CainKernel
你好,想了解下视频录制的时候增加动态贴纸(例如抖音,快手效果)有木有什么实现方案呢? 我看到项目里面GLStickerFilter
有提到,是不是使用GLStickerFilter
可以实现呢?
本地camera 运行不起来,报Error:error: no input files
问一下大佬,如何把预览画面切割成正方形,视频保存的时候也保存为正方形
@CainKernel
这是我在代码中的部分代码,最后再手机中显示的就是一个黑色的一个矩形图像
@Override
public void surfaceCreated(SurfaceHolder holder) {
start();
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
mWidth = width;
mHeight = height;
}
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
stop();
}
public void start() {
/if (mCamera != null) {
return;
}/
// 自己修改的部分
if (mCamera != null) {
mCamera.setPreviewCallback(null);
mCamera.stopPreview();
mCamera.release();
mCamera = null;
}
if (getParent() == null) {
LinearLayout preview = (LinearLayout) ((LCoopEye) mContext).findViewById(R.id.eye_main);
ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(128, 72);
// LayoutParams lp = new LayoutParams(5, 5);
this.setLayoutParams(lp);
preview.addView(this);
}
// mRect = new Rect(0, 0, mWidth, mHeight);
mCamera = Camera.open();
mCamera.setDisplayOrientation(90);
Camera.Parameters param = mCamera.getParameters();
//param.setFocusMode(param.FOCUS_MODE_CONTINUOUS_VIDEO);
param.setPreviewFormat(ImageFormat.NV21);
// 设置预览大小
param.setPreviewSize(mWidth, mHeight);
// 设置图片大小
param.setPictureSize(mWidth, mHeight);
selectFrameRate(param);
// 设置参数
mCamera.setParameters(param);
mCamera.setPreviewCallback(this);
if (mAvail != null) {
try {
// mCamera.setPreviewTexture(mAvail);
mCamera.setPreviewDisplay(mSurfaceHolder);
this.setVisibility(VISIBLE);
mCamera.startPreview();
//this.setVisibility(INVISIBLE);
} catch (IOException e) {
Log.i(TAG, "setPreviewTexture fail", new Exception());
return;
}
}
parameters(mCamera);
Log.i(TAG, "start");
}
public void stop() {
if (mCamera == null)
return;
mCamera.stopPreview();
mCamera.setPreviewCallback(null);
mCamera.release();
mCamera = null;
Log.i(TAG, "stop");
}
public void resume() {
if (mCamera == null)
return;
//this.setVisibility(VISIBLE);
}
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
// Log.i(TAG,"onPreviewFrame");
Log.d(TAG, "onPreviewFrame: data的数据" + data.toString(), new Exception());
Camera.Parameters parameters = camera.getParameters();
int imageFormat = parameters.getPreviewFormat(); // 拿到默认格式
Camera.Size size = camera.getParameters().getPreviewSize();
int w = parameters.getPreviewSize().width; //拿到预览尺寸
int h = parameters.getPreviewSize().height;
Rect rect = new Rect(0, 0, w, h);
// YuvImage image = new YuvImage(data, ImageFormat.NV21, mWidth, mHeight, null);
YuvImage image = new YuvImage(data, imageFormat, w, h, null);
ByteArrayOutputStream mJpegStream = new ByteArrayOutputStream();
//image.compressToJpeg(mRect, 70, mJpegStream);
image.compressToJpeg(rect, 70, mJpegStream);
mDataListener.onData(mJpegStream.toByteArray());
/*try {
YuvImage yuvImage = new YuvImage(data, ImageFormat.NV21, size.width, size.height, null);
Log.i("yuvImage", "onPreviewFrame: " + yuvImage.getYuvFormat());
if (yuvImage != null) {
ByteArrayOutputStream mJpegStream = new ByteArrayOutputStream();
yuvImage.compressToJpeg(mRect, 70, mJpegStream);
mJpegStream.flush();
mDataListener.onData(mJpegStream.toByteArray());
}
} catch (Exception e) {
Log.e("SYS", "Error:" + e.getMessage());
}*/
}
现在也不知道哪里错了……就是不出来照相机预览图像,求大神指点迷津
看到有实现类似抖音的一些特效。相机里面怎么没有使用?怎么看这些特效?
相同的视频录制完成后,在文件夹内会保存两个视频文件,请问这是怎么回事
hello @CainKernel , 导入项目到AS后,编译出现下面的错误,切换了ndk版本也不可以。想问下是不是有其他地方需要特殊配置的?
D:\DevTools\ndk\android-ndk-r13\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\3.8.256229\include\stdatomic.h
Error:(156, 11) fatal error: 'uchar.h' file not found
E:\Android\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\3.8.275480\include\stdatomic.h
Error:(150, 11) fatal error: 'uchar.h' file not found
这是什么原因呢
本人在测试荣耀7X的时候发现,当存在多个HandlerThread的时候,人脸检测的关键点不正确,关键点返回的结果严重滞后。而在只有单一一条HandlerThread线程做人脸检测,不做GPU渲染处理的时候,人脸检测的关键点是正确的。多HandlerThread线程做这方面的处理似乎都存在这样的情况,麒麟和MTK的CPU都存在这样的问题,好像没发现高通的CPU存在这样的情况。
@CainKernel 你好,我想问下滤镜用到的颜色查找表(如图)是怎样生成的呢?
clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/Dev/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Dev/android-sdk/ndk-bundle/sysroot -Dpusher_EXPORTS -I../../../../src/main/cpp/libpolarssl/include -I../../../../src/main/cpp -I../../../../src/main/cpp/librtmp -isystem /Dev/android-sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Dev/android-sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /Dev/android-sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /Dev/android-sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=19 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIC -fpermissive -std=c++11 -D__STDC_CONSTANT_MACROS -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT=; -UHAVE_CONFIG_H -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/pusher.dir/src/main/cpp/pusher/cain_pusher.cpp.o -MF CMakeFiles/pusher.dir/src/main/cpp/pusher/cain_pusher.cpp.o.d -o CMakeFiles/pusher.dir/src/main/cpp/pusher/cain_pusher.cpp.o -c /CainCamera/pushlibrary/src/main/cpp/pusher/cain_pusher.cpp
clang++: error: no input files
/bin/sh: -UHAVE_CONFIG_H: command not found
请问录屏支持区域录屏吗
某些MV视频,利用命令 ffmpeg -i input.mp4 -ss start -t duration -acodec copy、-vcodec copy -y output.mp4 会导致开头的视频帧丢失。我用FFmpeg 官方的Windows 版命令工具裁剪也出现这个问题,前面会丢失一大段视频帧。建议慎用命令行处理。
您好,目前针对如何给编辑的视频增加特效后,保存已编辑的视频,您有官方的方案吗?可不可以针对您现有的框架,给我提出一点可行性的建议呢?
FAILED: /Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/Android/Sdk/ndk-bundle/sysroot -Dpusher_EXPORTS -I../../../../src/main/cpp/libpolarssl/include -I../../../../src/main/cpp -I../../../../src/main/cpp/librtmp -isystem /Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=19 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIC -fpermissive -std=c++11 -D__STDC_CONSTANT_MACROS -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT=; -UHAVE_CONFIG_H -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/pusher.dir/src/main/cpp/pusher/RtmpPush.cpp.o -MF CMakeFiles/pusher.dir/src/main/cpp/pusher/RtmpPush.cpp.o.d -o CMakeFiles/pusher.dir/src/main/cpp/pusher/RtmpPush.cpp.o -c /androidproject/demo/camera/CainCamera/pushlibrary/src/main/cpp/pusher/RtmpPush.cpp
clang++: error: no input files
/bin/sh: 1: -UHAVE_CONFIG_H: not found
FAILED: /Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/Android/Sdk/ndk-bundle/sysroot -Dpusher_EXPORTS -I../../../../src/main/cpp/libpolarssl/include -I../../../../src/main/cpp -I../../../../src/main/cpp/librtmp -isystem /Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /home/doug/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=19 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIC -fpermissive -std=c++11 -D__STDC_CONSTANT_MACROS -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT=; -UHAVE_CONFIG_H -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/pusher.dir/src/main/cpp/pusher/cain_pusher.cpp.o -MF CMakeFiles/pusher.dir/src/main/cpp/pusher/cain_pusher.cpp.o.d -o CMakeFiles/pusher.dir/src/main/cpp/pusher/cain_pusher.cpp.o -c /androidproject/demo/camera/CainCamera/pushlibrary/src/main/cpp/pusher/cain_pusher.cpp
clang++: error: no input files
/bin/sh: 1: -UHAVE_CONFIG_H: not found
log如下:
11-07 18:05:44.327 15083-15121/com.cgfay.caincamera E/OpenGLUtils: Could not compile shader 35632:
0:8: S0032: no default precision defined for variable 'strength'
11-07 18:05:44.392 15083-15121/com.cgfay.caincamera E/OpenGLUtils: glGenTexture: glError 0x501
11-07 18:05:44.393 15083-15121/com.cgfay.caincamera E/AndroidRuntime: FATAL EXCEPTION: RenderThread
Process: com.cgfay.caincamera, PID: 15083
java.lang.RuntimeException: glGenTexture: glError 0x501
at com.cgfay.filterlibrary.glfilter.utils.OpenGLUtils.checkGlError(OpenGLUtils.java:184)
at com.cgfay.filterlibrary.glfilter.utils.OpenGLUtils.createTexture(OpenGLUtils.java:304)
at com.cgfay.filterlibrary.glfilter.color.DynamicColorLoader.loadColorTexture(DynamicColorLoader.java:91)
at com.cgfay.filterlibrary.glfilter.color.DynamicColorLoader.<init>(DynamicColorLoader.java:71)
at com.cgfay.filterlibrary.glfilter.color.DynamicColorBaseFilter.<init>(DynamicColorBaseFilter.java:27)
at com.cgfay.filterlibrary.glfilter.color.DynamicColorFilter.<init>(DynamicColorFilter.java:13)
at com.cgfay.filterlibrary.glfilter.color.GLImageDynamicColorFilter.<init>(GLImageDynamicColorFilter.java:23)
at com.cgfay.cameralibrary.engine.render.RenderManager.changeDynamicResource(RenderManager.java:185)
at com.cgfay.cameralibrary.engine.render.RenderThread.changeDynamicResource(RenderThread.java:289)
at com.cgfay.cameralibrary.engine.render.RenderHandler.handleMessage(RenderHandler.java:127)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
我想参考分段录制部分的代码
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.