提交 de9ef06d authored 作者: autulin's avatar autulin

1.日志导出到文件

2.编译版本限制
上级 ed6a66cd
......@@ -13,6 +13,11 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// 指定ndk编译的平台
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
externalNativeBuild {
cmake {
cppFlags "-std=c++14"
......
......@@ -190,9 +190,9 @@ void *GB28181Muxer::startEncode(void *obj) {
ret = avcodec_send_frame(gb28181Muxer->pCodecCtx, pFrame);
}
int64_t et2 = getCurrentTime();
LOGE("从队列取耗时:%lld(队列剩余帧:%d),送入FFmpeg耗时:%lld.", et1 - st, gb28181Muxer->vFrame_queue.size(), et2 - et1);
LOGE("fetch queue time:%lld(frame left:%d),in FFmpeg time:%lld.", et1 - st, gb28181Muxer->vFrame_queue.size(), et2 - et1);
if (ret < 0) {
LOGE("送入FFmpeg错误:%d.", ret);
LOGE("send FFmpeg error:%d.", ret);
}
}
}
......@@ -231,7 +231,7 @@ void *GB28181Muxer::startMux(void *obj) {
}
int64_t et = getCurrentTime();
if (ret >= 0)
LOGE("消费用时:%lld", et - st);
LOGE("mux one time:%lld", et - st);
}
if (gb28181Muxer->is_end) {
gb28181Muxer->endMux();
......
......@@ -52,27 +52,12 @@ public class DemoActivity extends AppCompatActivity implements
// new Thread(runnable).start();
}
});
}
private Runnable runnable = new Runnable() {
@Override
public void run() {
try {
DatagramSocket socket = new DatagramSocket(8888);
InetAddress serverAddress = InetAddress.getByName("10.112.181.160");
String str = "hello";
DatagramPacket pkt = new DatagramPacket (str.getBytes() , str.getBytes().length , serverAddress , 8888);
socket.send(pkt);
socket.close();
} catch (SocketException e) {
e.printStackTrace();
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
try {
Runtime.getRuntime().exec("logcat -f /sdcard/DCIM/pstest/log.txt");
} catch (IOException e) {
e.printStackTrace();
}
};
}
@Override
public void onResume() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论