• 大小: 40.61M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-22
  • 语言: Java
  • 标签: 视频对讲  对讲  视频  

资源简介

本项目提供Android平台点对点音视频对讲功能,项目的基本架构如下:
1. Android Camera2 API 采集预览视频
2. MediaCodec 进行硬编码,编码成h264视频文件
3. AudioRecord采集音频PCM数据,同样利用MediaCodec编码成AAC数据
4. jrtplib库进行视频音频数据发送,本项目修改jrtplib库,添加了大数据切片功能,方便进行网络传输
5. ffmpeg对接收到的数据进行解码,利用ffmpeg软解码的原因是减少延时,Android硬解码由于机制问题,会存在
    缓冲队列,导致延时过大,ffmpeg能够很好解决这个问题。
6. 利用SurfaceTexture进行绘制,在JNI层直接将解码的RGB数据拷贝到Surface中,减少数据传递

资源截图

代码片段和文件信息

package com.forrest.communication;

import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCaptureSession;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CameraManager;
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.support.annotation.NonNull;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-08-15 09:04  Communication-master\
     文件         216  2019-08-15 09:04  Communication-master\.gitignore
     目录           0  2019-08-15 09:04  Communication-master\.idea\
     目录           0  2019-08-15 09:04  Communication-master\.idea\codestyles\
     文件        7402  2019-08-15 09:04  Communication-master\.idea\codestyles\Project.xml
     文件         153  2019-08-15 09:04  Communication-master\.idea\codestyles\codestyleConfig.xml
     目录           0  2019-08-15 09:04  Communication-master\.idea\dictionaries\
     文件          82  2019-08-15 09:04  Communication-master\.idea\dictionaries\who.xml
     文件         135  2019-08-15 09:04  Communication-master\.idea\encodings.xml
     文件         729  2019-08-15 09:04  Communication-master\.idea\gradle.xml
     文件        4265  2019-08-15 09:04  Communication-master\.idea\markdown-navigator.xml
     目录           0  2019-08-15 09:04  Communication-master\.idea\markdown-navigator\
     文件         104  2019-08-15 09:04  Communication-master\.idea\markdown-navigator\profiles_settings.xml
     文件        3077  2019-08-15 09:04  Communication-master\.idea\misc.xml
     文件         564  2019-08-15 09:04  Communication-master\.idea\runConfigurations.xml
     文件         180  2019-08-15 09:04  Communication-master\.idea\vcs.xml
     文件        1068  2019-08-15 09:04  Communication-master\LICENSE
     文件        1264  2019-08-15 09:04  Communication-master\README.md
     目录           0  2019-08-15 09:04  Communication-master\app\
     文件           8  2019-08-15 09:04  Communication-master\app\.gitignore
     文件        4495  2019-08-15 09:04  Communication-master\app\CMakeLists.txt
     文件        1139  2019-08-15 09:04  Communication-master\app\build.gradle
     文件         772  2019-08-15 09:04  Communication-master\app\proguard-rules.pro
     目录           0  2019-08-15 09:04  Communication-master\app\release\
     文件    18567060  2019-08-15 09:04  Communication-master\app\release\app-release.apk
     文件         234  2019-08-15 09:04  Communication-master\app\release\output.json
     目录           0  2019-08-15 09:04  Communication-master\app\src\
     目录           0  2019-08-15 09:04  Communication-master\app\src\main\
     文件        1236  2019-08-15 09:04  Communication-master\app\src\main\AndroidManifest.xml
     目录           0  2019-08-15 09:04  Communication-master\app\src\main\java\
     目录           0  2019-08-15 09:04  Communication-master\app\src\main\java\com\
............此处省略445个文件信息

评论

共有 条评论