08 2021 档案

摘要:上一篇说的实际是调用自己生成的库 1、现在开始f fmpeg的-- 库移到 /armeabi-v7a 后报这个错 2 files found with path 'lib/armeabi-v7a/libavcodec.so' from inputs: cmakefile.txt里用这两行替代 set 阅读全文
posted @ 2021-08-27 10:42 cnchengv 阅读(649) 评论(0) 推荐(0) 编辑
摘要:1、ndk ffmpeg不行,那么先自己做一个简单的myso 2、先直接用gcc编译果然链接不行, gcc -shared -fPIC -o libmyso.so myso.c 用ndk里按照网上说的,还是有问题,报错,但是错误里明显把android studio的调用命令给出来了,那么用这个命令 阅读全文
posted @ 2021-08-26 21:14 cnchengv 阅读(271) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash #make clean # NDK的路径,根据自己的安装位置进行设置 export NDK=/Users/wangt/Library/Android/sdk/ndk/21.4.7075529 export SYSROOT=$NDK/toolchains/llvm/prebui 阅读全文
posted @ 2021-08-25 23:03 cnchengv 阅读(68) 评论(0) 推荐(0) 编辑
摘要:#include <jni.h> #include <string> #include <unistd.h> #include <android/native_window_jni.h> extern "C" { // #include "libavutil/avutil.h" #include < 阅读全文
posted @ 2021-08-24 22:23 cnchengv 阅读(72) 评论(0) 推荐(0) 编辑
摘要:建一个Native-cpp工程 1、引入android库的方法 CMakeLists.txt cmake_minimum_required(VERSION 3.4.1) add_library( # Sets the name of the library. native-lib # Sets th 阅读全文
posted @ 2021-08-23 09:33 cnchengv 阅读(35) 评论(0) 推荐(0) 编辑
摘要:好像这种方式不用再装cygwin了(编译ffmpeg之类还是需要的) 1、先装ndk,和cmake,勾选 show package details可以选择装什么版本 2、配置地址 在菜单“file”中选择“project structure”选项,按图片中的步骤即可以解决标题中的问题: 配置ndk地 阅读全文
posted @ 2021-08-23 09:26 cnchengv 阅读(62) 评论(0) 推荐(0) 编辑
摘要:1、重要要访问内部存储(即包内),外部存储要一大堆权限,最终还搞不定 String str ="data/data/com.example.pcmplayer/s16le.pcm";PCMAudioPlayer.getInstance().startPlay(str); 阅读全文
posted @ 2021-08-20 22:35 cnchengv 阅读(75) 评论(0) 推荐(0) 编辑
摘要:1、android环境出了点问题,卸载重装 a、卸载,把一些相关的目录也删了,搜 android studio b、代理配置 mirrors.neusoft.edu.cn:80 自己的android studio安装完会下载Sdk,不用单独下载安装,不过要设置正确 最重要,这个不设置正确,sdk在a 阅读全文
posted @ 2021-08-18 10:04 cnchengv 阅读(312) 评论(0) 推荐(0) 编辑
摘要:uint8_t *dst_data[4]; int dst_linesize[4]; int dst_bufsize; struct SwsContext *pSwsCtx; pSwsCtx = sws_getContext(w, h, ic->streams[videoIndex]->codec- 阅读全文
posted @ 2021-08-01 23:26 cnchengv 阅读(236) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示