├── .idea
├── compiler.xml
├── gradle.xml
├── jarRepositories.xml
├── misc.xml
├── modules.xml
└── vcs.xml
├── Android下音视频对讲演示程序.apk
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ ├── HeavenTao
│ │ ├── Ado
│ │ │ ├── AAjb.java
│ │ │ ├── AdoWavfm.java
│ │ │ ├── RNNoise.java
│ │ │ ├── SpeexAec.java
│ │ │ ├── SpeexDecd.java
│ │ │ ├── SpeexEncd.java
│ │ │ ├── SpeexPrpocs.java
│ │ │ ├── SpeexWebRtcAec.java
│ │ │ ├── WebRtcAec.java
│ │ │ ├── WebRtcAec3.java
│ │ │ ├── WebRtcAecm.java
│ │ │ ├── WebRtcNs.java
│ │ │ └── WebRtcNsx.java
│ │ ├── Data
│ │ │ ├── HTInt.java
│ │ │ ├── HTLong.java
│ │ │ ├── HTObject.java
│ │ │ ├── HTShort.java
│ │ │ ├── HTString.java
│ │ │ ├── MsgQueue.java
│ │ │ └── Vstr.java
│ │ ├── Media
│ │ │ ├── AdoInpt.java
│ │ │ ├── AdoOtpt.java
│ │ │ ├── AviFileWriter.java
│ │ │ ├── BdctClnt.java
│ │ │ ├── ClntMediaPocsThrd.java
│ │ │ ├── HTListView.java
│ │ │ ├── HTSurfaceView.java
│ │ │ ├── MediaPocsThrd.java
│ │ │ ├── SrvrThrd.java
│ │ │ ├── TkbkClnt.java
│ │ │ ├── VdoInpt.java
│ │ │ ├── VdoOtpt.java
│ │ │ ├── WaveFileReader.java
│ │ │ └── WaveFileWriter.java
│ │ ├── Sokt
│ │ │ ├── AudpSokt.java
│ │ │ ├── TcpClntSokt.java
│ │ │ ├── TcpSrvrSokt.java
│ │ │ └── UdpSokt.java
│ │ ├── TinyXml2
│ │ │ ├── XMLDocument.java
│ │ │ └── XMLElement.java
│ │ └── Vdo
│ │ │ ├── LibYUV.java
│ │ │ ├── OpenH264Decd.java
│ │ │ ├── OpenH264Encd.java
│ │ │ ├── SystemH264Decd.java
│ │ │ ├── SystemH264Encd.java
│ │ │ └── VAjb.java
│ └── com
│ │ └── example
│ │ └── andrd_ado_vdo_tkbk_demo
│ │ ├── AndrdAdoVdoTkbkStng.java
│ │ ├── FrgndSrvc.java
│ │ ├── LicnCode.java
│ │ ├── MainAct.java
│ │ ├── MyClntMediaPocsThrd.java
│ │ └── MySrvrThrd.java
│ ├── jniLibs
│ ├── arm64-v8a
│ │ ├── libAdoWavfm.so
│ │ ├── libAjb.so
│ │ ├── libDataStruct.so
│ │ ├── libFunc.so
│ │ ├── libLibYUV.so
│ │ ├── libMediaFile.so
│ │ ├── libOpenH264.so
│ │ ├── libRNNoise.so
│ │ ├── libSokt.so
│ │ ├── libSpeex.so
│ │ ├── libSpeexDsp.so
│ │ ├── libSpeexWebRtcAec.so
│ │ ├── libSystemH264.so
│ │ ├── libWebRtc.so
│ │ ├── libWebRtc3.so
│ │ └── libc++_shared.so
│ ├── armeabi-v7a
│ │ ├── libAdoWavfm.so
│ │ ├── libAjb.so
│ │ ├── libDataStruct.so
│ │ ├── libFunc.so
│ │ ├── libLibYUV.so
│ │ ├── libMediaFile.so
│ │ ├── libOpenH264.so
│ │ ├── libRNNoise.so
│ │ ├── libSokt.so
│ │ ├── libSpeex.so
│ │ ├── libSpeexDsp.so
│ │ ├── libSpeexWebRtcAec.so
│ │ ├── libSystemH264.so
│ │ ├── libWebRtc.so
│ │ ├── libWebRtc3.so
│ │ └── libc++_shared.so
│ ├── x86
│ │ ├── libAdoWavfm.so
│ │ ├── libAjb.so
│ │ ├── libDataStruct.so
│ │ ├── libFunc.so
│ │ ├── libLibYUV.so
│ │ ├── libMediaFile.so
│ │ ├── libOpenH264.so
│ │ ├── libRNNoise.so
│ │ ├── libSokt.so
│ │ ├── libSpeex.so
│ │ ├── libSpeexDsp.so
│ │ ├── libSpeexWebRtcAec.so
│ │ ├── libSystemH264.so
│ │ ├── libWebRtc.so
│ │ ├── libWebRtc3.so
│ │ └── libc++_shared.so
│ └── x86_64
│ │ ├── libAdoWavfm.so
│ │ ├── libAjb.so
│ │ ├── libDataStruct.so
│ │ ├── libFunc.so
│ │ ├── libLibYUV.so
│ │ ├── libMediaFile.so
│ │ ├── libOpenH264.so
│ │ ├── libRNNoise.so
│ │ ├── libSokt.so
│ │ ├── libSpeex.so
│ │ ├── libSpeexDsp.so
│ │ ├── libSpeexWebRtcAec.so
│ │ ├── libSystemH264.so
│ │ ├── libWebRtc.so
│ │ ├── libWebRtc3.so
│ │ └── libc++_shared.so
│ └── res
│ ├── layout
│ ├── ajb_stng_lyot.xml
│ ├── clnt_stng_lyot.xml
│ ├── cnct_and_clnt_lst_item.xml
│ ├── main_lyot.xml
│ ├── openh264_codec_stng_lyot.xml
│ ├── save_ado_inpt_otpt_to_wave_file_stng_lyot.xml
│ ├── save_ado_vdo_inpt_otpt_to_avi_file_stng_lyot.xml
│ ├── save_sts_to_txt_file_stng_lyot.xml
│ ├── speex_aec_stng_lyot.xml
│ ├── speex_codec_stng_lyot.xml
│ ├── speex_prpocs_ns_stng_lyot.xml
│ ├── speex_prpocs_stng_lyot.xml
│ ├── speex_webrtc_aec_stng_lyot.xml
│ ├── srvr_stng_lyot.xml
│ ├── stng_lyot.xml
│ ├── systemh264_codec_stng_lyot.xml
│ ├── webrtc_aec3_stng_lyot.xml
│ ├── webrtc_aec_stng_lyot.xml
│ ├── webrtc_aecm_stng_lyot.xml
│ ├── webrtc_ns_stng_lyot.xml
│ └── webrtc_nsx_stng_lyot.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_round.png
│ ├── tkbk_icon.png
│ └── tkbk_round_icon.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ └── values
│ ├── colors.xml
│ ├── dimen.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Android下音视频对讲演示程序.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/Android下音视频对讲演示程序.apk
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdk 35
5 | buildToolsVersion = '36.0.0'
6 |
7 | defaultConfig {
8 | applicationId "com.example.andrd_ado_vdo_tkbk_demo"
9 |
10 | //minSdkVersion 9
11 | minSdkVersion 14
12 | targetSdk 35
13 | versionCode 1
14 | versionName "2025.04.26"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 |
17 | ndk {
18 | abiFilters 'armeabi-v7a' //指定NDK的平台。
19 | abiFilters 'arm64-v8a' //指定NDK的平台。
20 | abiFilters 'x86' //指定NDK的平台。
21 | abiFilters 'x86_64' //指定NDK的平台。
22 | }
23 | }
24 | buildTypes {
25 | release {
26 | minifyEnabled false
27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28 | }
29 | }
30 | namespace 'com.example.andrd_ado_vdo_tkbk_demo'
31 | }
32 |
33 | dependencies {
34 | implementation fileTree(dir: 'libs', include: ['*.jar'])
35 | implementation 'com.android.support:appcompat-v7:28.0.0', 'com.android.support.constraint:constraint-layout:2.0.4' //Android API 14及以上版本使用。
36 | //implementation 'com.android.support:appcompat-v7:25.4.0', 'com.android.support.constraint:constraint-layout:1.1.3' //Android API 9~25版本使用。
37 | testImplementation 'junit:junit:4.13.2'
38 | }
39 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\AndroidSDK/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
28 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/AAjb.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //音频自适应抖动缓冲器。
6 | public class AAjb
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "Ajb" ); //加载libAjb.so。
13 | }
14 |
15 | public long m_AAjbPt; //存放音频自适应抖动缓冲器的指针。
16 |
17 | //构造函数。
18 | public AAjb()
19 | {
20 | m_AAjbPt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy( null );
27 | }
28 |
29 | //音频自适应抖动缓冲器获取应用程序限制信息。
30 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
31 | {
32 | return AAjbGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
33 | }
34 |
35 | //创建并初始化音频自适应抖动缓冲器。
36 | public int Init( byte LicnCodePt[], int SmplRate, long FrmLenUnit, int IsHaveTimeStamp, int TimeStampStep, int InactIsContPut, int MinNeedBufFrmCnt, int MaxNeedBufFrmCnt, int MaxCntuLostFrmCnt, float AdaptSensitivity, int IsDelObsltFrm, Vstr ErrInfoVstrPt )
37 | {
38 | if( m_AAjbPt == 0 )
39 | {
40 | HTLong p_AAjbPt = new HTLong();
41 | if( AAjbInit( LicnCodePt, p_AAjbPt, SmplRate, FrmLenUnit, IsHaveTimeStamp, TimeStampStep, InactIsContPut, MinNeedBufFrmCnt, MaxNeedBufFrmCnt, MaxCntuLostFrmCnt, AdaptSensitivity, IsDelObsltFrm, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
42 | {
43 | m_AAjbPt = p_AAjbPt.m_Val;
44 | return 0;
45 | }
46 | else
47 | {
48 | return -1;
49 | }
50 | }
51 | else
52 | {
53 | return 0;
54 | }
55 | }
56 |
57 | //放入字节型帧到音频自适应抖动缓冲器。
58 | public int PutByteFrm( int TimeStamp, byte ByteFrmPt[], long FrmStart, long FrmLen, int IsAutoLock, Vstr ErrInfoVstrPt )
59 | {
60 | return AAjbPutByteFrm( m_AAjbPt, TimeStamp, ByteFrmPt, FrmStart, FrmLen, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
61 | }
62 |
63 | //放入短整型帧到音频自适应抖动缓冲器。
64 | public int PutShortFrm( int TimeStamp, short ShortFrmPt[], long FrmStart, long FrmLen, int IsAutoLock, Vstr ErrInfoVstrPt )
65 | {
66 | return AAjbPutShortFrm( m_AAjbPt, TimeStamp, ShortFrmPt, FrmStart, FrmLen, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
67 | }
68 |
69 | //从音频自适应抖动缓冲器取出字节型帧。
70 | public int GetByteFrm( HTInt TimeStampPt, byte ByteFrmPt[], long FrmStart, long FrmSz, HTLong FrmLenPt, int IsAutoLock, Vstr ErrInfoVstrPt )
71 | {
72 | return AAjbGetByteFrm( m_AAjbPt, TimeStampPt, ByteFrmPt, FrmStart, FrmSz, FrmLenPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
73 | }
74 |
75 | //从音频自适应抖动缓冲器取出短整型帧。
76 | public int GetShortFrm( HTInt TimeStampPt, short ShortFrmPt[], long FrmStart, long FrmSz, HTLong FrmLenPt, int IsAutoLock, Vstr ErrInfoVstrPt )
77 | {
78 | return AAjbGetShortFrm( m_AAjbPt, TimeStampPt, ShortFrmPt, FrmStart, FrmSz, FrmLenPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
79 | }
80 |
81 | //获取缓冲帧的数量。
82 | public int GetBufFrmCnt( HTInt CurHaveBufActFrmCntPt, HTInt CurHaveBufInactFrmCntPt, HTInt CurHaveBufFrmCntPt, HTInt MinNeedBufFrmCntPt, HTInt MaxNeedBufFrmCntPt, HTInt MaxCntuLostFrmCntPt, HTInt CurNeedBufFrmCntPt, int IsAutoLock, Vstr ErrInfoVstrPt )
83 | {
84 | return AAjbGetBufFrmCnt( m_AAjbPt, CurHaveBufActFrmCntPt, CurHaveBufInactFrmCntPt, CurHaveBufFrmCntPt, MinNeedBufFrmCntPt, MaxNeedBufFrmCntPt, MaxCntuLostFrmCntPt, CurNeedBufFrmCntPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
85 | }
86 |
87 | //清空音频自适应抖动缓冲器。
88 | public int Clear( int IsAutoLock, Vstr ErrInfoVstrPt )
89 | {
90 | return AAjbClear( m_AAjbPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
91 | }
92 |
93 | //清空并重置音频自适应抖动缓冲器。
94 | public int Reset( int IsAutoLock, Vstr ErrInfoVstrPt )
95 | {
96 | return AAjbReset( m_AAjbPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
97 | }
98 |
99 | //销毁音频自适应抖动缓冲器。
100 | public int Dstoy( Vstr ErrInfoVstrPt )
101 | {
102 | if( m_AAjbPt != 0 )
103 | {
104 | if( AAjbDstoy( m_AAjbPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
105 | {
106 | m_AAjbPt = 0;
107 | return 0;
108 | }
109 | else
110 | {
111 | return -1;
112 | }
113 | }
114 | else
115 | {
116 | return 0;
117 | }
118 | }
119 |
120 | //音频自适应抖动缓冲器获取应用程序限制信息。
121 | private static native int AAjbGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
122 |
123 | //创建并初始化音频自适应抖动缓冲器。
124 | private native int AAjbInit( byte LicnCodePt[], HTLong AAjbPt, int SmplRate, long FrmLenUnit, int IsHaveTimeStamp, int TimeStampStep, int InactIsContPut, int MinNeedBufFrmCnt, int MaxNeedBufFrmCnt, int MaxCntuLostFrmCnt, float AdaptSensitivity, int IsDelObsltFrm, long ErrInfoVstrPt );
125 |
126 | //放入字节型帧到音频自适应抖动缓冲器。
127 | private native int AAjbPutByteFrm( long AAjbPt, int TimeStamp, byte ByteFrmPt[], long FrmStart, long FrmStartLenByt, int IsAutoLock, long ErrInfoVstrPt );
128 |
129 | //放入短整型帧到音频自适应抖动缓冲器。
130 | private native int AAjbPutShortFrm( long AAjbPt, int TimeStamp, short ShortFrmPt[], long FrmStart, long FrmStartLenTwoByt, int IsAutoLock, long ErrInfoVstrPt );
131 |
132 | //从音频自适应抖动缓冲器取出字节型帧。
133 | private native int AAjbGetByteFrm( long AAjbPt, HTInt TimeStampPt, byte ByteFrmPt[], long FrmStart, long FrmStartSzByt, HTLong FrmLenBytPt, int IsAutoLock, long ErrInfoVstrPt );
134 |
135 | //从音频自适应抖动缓冲器取出短整型帧。
136 | private native int AAjbGetShortFrm( long AAjbPt, HTInt TimeStampPt, short ShortFrmPt[], long FrmStart, long FrmStartSzTwoByt, HTLong FrmLenTwoBytPt, int IsAutoLock, long ErrInfoVstrPt );
137 |
138 | //获取缓冲帧的数量。
139 | private native int AAjbGetBufFrmCnt( long AAjbPt, HTInt CurHaveBufActFrmCntPt, HTInt CurHaveBufInactFrmCntPt, HTInt CurHaveBufFrmCntPt, HTInt MinNeedBufFrmCntPt, HTInt MaxNeedBufFrmCntPt, HTInt MaxCntuLostFrmCntPt, HTInt CurNeedBufFrmCntPt, int IsAutoLock, long ErrInfoVstrPt );
140 |
141 | //清空音频自适应抖动缓冲器。
142 | private native int AAjbClear( long AAjbPt, int IsAutoLock, long ErrInfoVstrPt );
143 |
144 | //清空并重置音频自适应抖动缓冲器。
145 | private native int AAjbReset( long AAjbPt, int IsAutoLock, long ErrInfoVstrPt );
146 |
147 | //销毁音频自适应抖动缓冲器。
148 | private native int AAjbDstoy( long AAjbPt, long ErrInfoVstrPt );
149 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/AdoWavfm.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import android.view.Surface;
4 |
5 | import HeavenTao.Data.*;
6 |
7 | //音频波形器。
8 | public class AdoWavfm
9 | {
10 | static
11 | {
12 | System.loadLibrary( "Func" ); //加载libFunc.so。
13 | System.loadLibrary( "AdoWavfm" ); //加载libAdoWavfm.so。
14 | }
15 |
16 | public long m_AdoWavfmPt; //存放音频波形器的指针。
17 |
18 | //构造函数。
19 | public AdoWavfm()
20 | {
21 | m_AdoWavfmPt = 0;
22 | }
23 |
24 | //析构函数。
25 | protected void finalize()
26 | {
27 | Dstoy( null );
28 | }
29 |
30 | //创建并初始化音频波形器。
31 | public int Init( Vstr ErrInfoVstrPt )
32 | {
33 | if( m_AdoWavfmPt == 0 )
34 | {
35 | HTLong p_AdoWavfmPt = new HTLong();
36 | if( AdoWavfmInit( p_AdoWavfmPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
37 | {
38 | m_AdoWavfmPt = p_AdoWavfmPt.m_Val;
39 | return 0;
40 | }
41 | else
42 | {
43 | return -1;
44 | }
45 | }
46 | else
47 | {
48 | return 0;
49 | }
50 | }
51 |
52 | //绘制音频波形到Surface。
53 | public int Draw( short PcmFrmPt[], long FrmLenUnit, Surface DstSurfacePt, Vstr ErrInfoVstrPt )
54 | {
55 | return AdoWavfmDraw( m_AdoWavfmPt, PcmFrmPt, FrmLenUnit, DstSurfacePt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
56 | }
57 |
58 | //销毁音频波形器。
59 | public int Dstoy( Vstr ErrInfoVstrPt )
60 | {
61 | if( m_AdoWavfmPt != 0 )
62 | {
63 | if( AdoWavfmDstoy( m_AdoWavfmPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
64 | {
65 | m_AdoWavfmPt = 0;
66 | return 0;
67 | }
68 | else
69 | {
70 | return -1;
71 | }
72 | }
73 | else
74 | {
75 | return 0;
76 | }
77 | }
78 |
79 | //创建并初始化音频波形器。
80 | private native int AdoWavfmInit( HTLong AdoWavfmPt, long ErrInfoVstrPt );
81 |
82 | //绘制音频波形到Surface。
83 | private native int AdoWavfmDraw( long AdoWavfmPt, short PcmFrmPt[], long FrmLenUnit, Surface DstSurfacePt, long ErrInfoVstrPt );
84 |
85 | //销毁音频波形器。
86 | private native int AdoWavfmDstoy( long AdoWavfmPt, long ErrInfoVstrPt );
87 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/RNNoise.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //RNNoise噪音抑制器。
6 | public class RNNoise
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "WebRtc" ); //加载libWebRtc.so。
13 | System.loadLibrary( "RNNoise" ); //加载libRNNoise.so。
14 | }
15 |
16 | public long m_RNNoisePt; //RNNoise噪音抑制器的指针。
17 |
18 | //构造函数。
19 | public RNNoise()
20 | {
21 | m_RNNoisePt = 0;
22 | }
23 |
24 | //析构函数。
25 | protected void finalize()
26 | {
27 | Dstoy();
28 | }
29 |
30 | //RNNoise噪音抑制器获取应用程序限制信息。
31 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
32 | {
33 | return RNNoiseGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
34 | }
35 |
36 | //创建并初始化RNNoise噪音抑制器。
37 | public int Init( byte LicnCodePt[], int SmplRate, long FrmLenUnit, Vstr ErrInfoVstrPt )
38 | {
39 | if( m_RNNoisePt == 0 )
40 | {
41 | HTLong p_RNNoisePt = new HTLong();
42 | if( RNNoiseInit( LicnCodePt, p_RNNoisePt, SmplRate, FrmLenUnit, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
43 | {
44 | m_RNNoisePt = p_RNNoisePt.m_Val;
45 | return 0;
46 | }
47 | else
48 | {
49 | return -1;
50 | }
51 | }
52 | else
53 | {
54 | return 0;
55 | }
56 | }
57 |
58 | //用RNNoise噪音抑制器对单声道16位有符号整型Pcm格式帧进行RNNoise噪音抑制。
59 | public int Pocs( short FrmPt[], short RsltFrmPt[] )
60 | {
61 | return RNNoisePocs( m_RNNoisePt, FrmPt, RsltFrmPt );
62 | }
63 |
64 | //销毁RNNoise噪音抑制器。
65 | public int Dstoy()
66 | {
67 | if( m_RNNoisePt != 0 )
68 | {
69 | if( RNNoiseDstoy( m_RNNoisePt ) == 0 )
70 | {
71 | m_RNNoisePt = 0;
72 | return 0;
73 | }
74 | else
75 | {
76 | return -1;
77 | }
78 | }
79 | else
80 | {
81 | return 0;
82 | }
83 | }
84 |
85 | //RNNoise噪音抑制器获取应用程序限制信息。
86 | private static native int RNNoiseGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
87 |
88 | //创建并初始化RNNoise噪音抑制器。
89 | private native int RNNoiseInit( byte LicnCodePt[], HTLong RNNoisePt, int SmplRate, long FrmLenUnit, long ErrInfoVstrPt );
90 |
91 | //用RNNoise噪音抑制器对单声道16位有符号整型Pcm格式帧进行RNNoise噪音抑制。
92 | private native int RNNoisePocs( long RNNoisePt, short FrmPt[], short RsltFrmPt[] );
93 |
94 | //销毁RNNoise噪音抑制器。
95 | private native int RNNoiseDstoy( long RNNoisePt );
96 | }
97 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/SpeexAec.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //Speex声学回音消除器。
6 | public class SpeexAec
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "SpeexDsp" ); //加载libSpeexDsp.so。
12 | }
13 |
14 | public long m_SpeexAecPt; //存放Speex声学回音消除器的指针。
15 |
16 | //构造函数。
17 | public SpeexAec()
18 | {
19 | m_SpeexAecPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy();
26 | }
27 |
28 | //Speex声学回音消除器获取应用程序限制信息。
29 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
30 | {
31 | return SpeexAecGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
32 | }
33 |
34 | //创建并初始化Speex声学回音消除器。
35 | public int Init( byte LicnCodePt[], int SmplRate, long FrmLenUnit, int FilterLenMsec, int IsUseRec, float EchoMutp, float EchoCntu, int EchoSupes, int EchoSupesAct, Vstr ErrInfoVstrPt )
36 | {
37 | if( m_SpeexAecPt == 0 )
38 | {
39 | HTLong p_SpeexAecPt = new HTLong();
40 | if( SpeexAecInit( LicnCodePt, p_SpeexAecPt, SmplRate, FrmLenUnit, FilterLenMsec, IsUseRec, EchoMutp, EchoCntu, EchoSupes, EchoSupesAct, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
41 | {
42 | m_SpeexAecPt = p_SpeexAecPt.m_Val;
43 | return 0;
44 | }
45 | else
46 | {
47 | return -1;
48 | }
49 | }
50 | else
51 | {
52 | return 0;
53 | }
54 | }
55 |
56 | //用Speex声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行Speex声学回音消除。
57 | public int Pocs( short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] )
58 | {
59 | return SpeexAecPocs( m_SpeexAecPt, InptFrmPt, OtptFrmPt, RsltFrmPt );
60 | }
61 |
62 | //销毁Speex声学回音消除器。
63 | public int Dstoy()
64 | {
65 | if( m_SpeexAecPt != 0 )
66 | {
67 | if( SpeexAecDstoy( m_SpeexAecPt ) == 0 )
68 | {
69 | m_SpeexAecPt = 0;
70 | return 0;
71 | }
72 | else
73 | {
74 | return -1;
75 | }
76 | }
77 | else
78 | {
79 | return 0;
80 | }
81 | }
82 |
83 | //Speex声学回音消除器获取应用程序限制信息。
84 | private static native int SpeexAecGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
85 |
86 | //创建并初始化Speex声学回音消除器。
87 | private native int SpeexAecInit( byte LicnCodePt[], HTLong SpeexAecPt, int SmplRate, long FrmLenUnit, int FilterLenMsec, int IsUseRec, float EchoMutp, float EchoCntu, int EchoSupes, int EchoSupesAct, long ErrInfoVstrPt );
88 |
89 | //用Speex声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行Speex声学回音消除。
90 | private native int SpeexAecPocs( long SpeexAecPt, short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] );
91 |
92 | //销毁Speex声学回音消除器。
93 | private native int SpeexAecDstoy( long SpeexAecPt );
94 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/SpeexDecd.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //Speex解码器。
6 | public class SpeexDecd
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "Speex" ); //加载libSpeex.so。
12 | }
13 |
14 | public long m_SpeexDecdPt; //存放Speex解码器的指针。
15 |
16 | //构造函数。
17 | public SpeexDecd()
18 | {
19 | m_SpeexDecdPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy();
26 | }
27 |
28 | //创建并初始化Speex解码器。
29 | public int Init( int SmplRate, int IsUsePrcplEnhsmt )
30 | {
31 | if( m_SpeexDecdPt == 0 )
32 | {
33 | HTLong p_SpeexDecdPt = new HTLong();
34 | if( SpeexDecdInit( p_SpeexDecdPt, SmplRate, IsUsePrcplEnhsmt ) == 0 )
35 | {
36 | m_SpeexDecdPt = p_SpeexDecdPt.m_Val;
37 | return 0;
38 | }
39 | else
40 | {
41 | return -1;
42 | }
43 | }
44 | else
45 | {
46 | return 0;
47 | }
48 | }
49 |
50 | //用Speex解码器对单声道16位有符号整型20毫秒Pcm格式帧进行Speex格式编码。
51 | public int Pocs( byte SpeexFrmPt[], long SpeexFrmLen, short PcmFrmPt[] )
52 | {
53 | return SpeexDecdPocs( m_SpeexDecdPt, SpeexFrmPt, SpeexFrmLen, PcmFrmPt );
54 | }
55 |
56 | //销毁Speex解码器。
57 | public int Dstoy()
58 | {
59 | if( m_SpeexDecdPt != 0 )
60 | {
61 | if( SpeexDecdDstoy( m_SpeexDecdPt ) == 0 )
62 | {
63 | m_SpeexDecdPt = 0;
64 | return 0;
65 | }
66 | else
67 | {
68 | return -1;
69 | }
70 | }
71 | else
72 | {
73 | return 0;
74 | }
75 | }
76 |
77 | //创建并初始化Speex解码器。
78 | private native int SpeexDecdInit( HTLong SpeexDecdPt, int SmplRate, int IsUsePrcplEnhsmt );
79 |
80 | //用Speex解码器对单声道16位有符号整型20毫秒Speex格式帧进行Pcm格式解码。
81 | private native int SpeexDecdPocs( long SpeexDecdPt, byte SpeexFrmPt[], long SpeexFrmLen, short PcmFrmPt[] );
82 |
83 | //销毁Speex解码器。
84 | private native int SpeexDecdDstoy( long SpeexDecdPt );
85 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/SpeexEncd.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //Speex编码器。
6 | public class SpeexEncd
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "Speex" ); //加载libSpeex.so。
12 | }
13 |
14 | public long m_SpeexEncdPt; //存放Speex编码器的指针。
15 |
16 | //构造函数。
17 | public SpeexEncd()
18 | {
19 | m_SpeexEncdPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy();
26 | }
27 |
28 | //创建并初始化Speex编码器。
29 | public int Init( int SmplRate, int UseCbrOrVbr, int Quality, int Complexity, int PlcExptLossRate )
30 | {
31 | if( m_SpeexEncdPt == 0 )
32 | {
33 | HTLong p_SpeexEncdPt = new HTLong();
34 | if( SpeexEncdInit( p_SpeexEncdPt, SmplRate, UseCbrOrVbr, Quality, Complexity, PlcExptLossRate ) == 0 )
35 | {
36 | m_SpeexEncdPt = p_SpeexEncdPt.m_Val;
37 | return 0;
38 | }
39 | else
40 | {
41 | return -1;
42 | }
43 | }
44 | else
45 | {
46 | return 0;
47 | }
48 | }
49 |
50 | //用Speex编码器对单声道16位有符号整型20毫秒Pcm格式帧进行Speex格式编码。
51 | public int Pocs( short PcmFrmPt[], byte SpeexFrmPt[], long SpeexFrmSz, HTLong SpeexFrmLenPt, HTInt IsNeedTransPt )
52 | {
53 | return SpeexEncdPocs( m_SpeexEncdPt, PcmFrmPt, SpeexFrmPt, SpeexFrmSz, SpeexFrmLenPt, IsNeedTransPt );
54 | }
55 |
56 | //销毁Speex编码器。
57 | public int Dstoy()
58 | {
59 | if( m_SpeexEncdPt != 0 )
60 | {
61 | if( SpeexEncdDstoy( m_SpeexEncdPt ) == 0 )
62 | {
63 | m_SpeexEncdPt = 0;
64 | return 0;
65 | }
66 | else
67 | {
68 | return -1;
69 | }
70 | }
71 | else
72 | {
73 | return 0;
74 | }
75 | }
76 |
77 | //创建并初始化Speex编码器。
78 | private native int SpeexEncdInit( HTLong SpeexEncdPt, int SmplRate, int UseCbrOrVbr, int Qualt, int Cmplxt, int PlcExptLossRate );
79 |
80 | //用Speex编码器对单声道16位有符号整型20毫秒Pcm格式帧进行Speex格式编码。
81 | private native int SpeexEncdPocs( long SpeexEncdPt, short PcmFrmPt[], byte SpeexFrmPt[], long SpeexFrmSz, HTLong SpeexFrmLenPt, HTInt IsNeedTransPt );
82 |
83 | //销毁Speex编码器。
84 | private native int SpeexEncdDstoy( long SpeexEncdPt );
85 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/SpeexPrpocs.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //Speex预处理器。
6 | public class SpeexPrpocs
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "SpeexDsp" ); //加载libSpeexDsp.so。
12 | }
13 |
14 | public long m_SpeexPrpocsPt; //存放Speex预处理器的指针。
15 |
16 | //构造函数。
17 | public SpeexPrpocs()
18 | {
19 | m_SpeexPrpocsPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy();
26 | }
27 |
28 | //创建并初始化Speex预处理器。
29 | public int Init( int SmplRate, long FrmLenUnit, int IsUseNs, int NoiseSupes, int IsUseDereverb, int IsUseVad, int VadProbStart, int VadProbCntu, int IsUseAgc, int AgcLevel, int AgcIncrement, int AgcDecrement, int AgcMaxGain, Vstr ErrInfoVstrPt )
30 | {
31 | if( m_SpeexPrpocsPt == 0 )
32 | {
33 | HTLong p_SpeexPrpocsPt = new HTLong();
34 | if( SpeexPrpocsInit( p_SpeexPrpocsPt, SmplRate, FrmLenUnit, IsUseNs, NoiseSupes, IsUseDereverb, IsUseVad, VadProbStart, VadProbCntu, IsUseAgc, AgcLevel, AgcIncrement, AgcDecrement, AgcMaxGain, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
35 | {
36 | m_SpeexPrpocsPt = p_SpeexPrpocsPt.m_Val;
37 | return 0;
38 | }
39 | else
40 | {
41 | return -1;
42 | }
43 | }
44 | else
45 | {
46 | return 0;
47 | }
48 | }
49 |
50 | //用Speex预处理器对单声道16位有符号整型Pcm格式帧进行Speex预处理。
51 | public int Pocs( short FrmPt[], short RsltFrmPt[], HTInt VoiceActStsPt )
52 | {
53 | return SpeexPrpocsPocs( m_SpeexPrpocsPt, FrmPt, RsltFrmPt, VoiceActStsPt );
54 | }
55 |
56 | //销毁Speex预处理器。
57 | public int Dstoy()
58 | {
59 | if( m_SpeexPrpocsPt != 0 )
60 | {
61 | if( SpeexPrpocsDstoy( m_SpeexPrpocsPt ) == 0 )
62 | {
63 | m_SpeexPrpocsPt = 0;
64 | return 0;
65 | }
66 | else
67 | {
68 | return -1;
69 | }
70 | }
71 | else
72 | {
73 | return 0;
74 | }
75 | }
76 |
77 | //创建并初始化Speex预处理器。
78 | private native int SpeexPrpocsInit( HTLong SpeexPrpocsPt, int SmplRate, long FrmLenUnit, int IsUseNs, int NoiseSupes, int IsUseDereverb, int IsUseVad, int VadProbStart, int VadProbCntu, int IsUseAgc, int AgcLevel, int AgcIncrement, int AgcDecrement, int AgcMaxGain, long ErrInfoVstrPt );
79 |
80 | //用Speex预处理器对单声道16位有符号整型Pcm格式帧进行Speex预处理。
81 | private native int SpeexPrpocsPocs( long SpeexPrpocsPt, short FrmPt[], short RsltFrmPt[], HTInt VoiceActStsPt );
82 |
83 | //销毁Speex预处理器。
84 | private native int SpeexPrpocsDstoy( long SpeexPrpocsPt );
85 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/SpeexWebRtcAec.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //SpeexWebRtc三重声学回音消除器。
6 | public class SpeexWebRtcAec
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "SpeexDsp" ); //加载libSpeex.so。
12 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
13 | System.loadLibrary( "WebRtc" ); //加载libWebRtc.so。
14 | System.loadLibrary( "WebRtc3" ); //加载libWebRtc.so。
15 | System.loadLibrary( "SpeexWebRtcAec" ); //加载libSpeexWebRtcAec.so。
16 | }
17 |
18 | public class WorkMode
19 | {
20 | public static final int SpeexAecWebRtcAecm = 0b0011; //Speex声学回音消除器+WebRtc定点版声学回音消除器。
21 | public static final int WebRtcAecmWebRtcAec = 0b0110; //WebRtc定点版声学回音消除器+WebRtc浮点版声学回音消除器。
22 | public static final int SpeexAecWebRtcAecmWebRtcAec = 0b0111; //Speex声学回音消除器+WebRtc定点版声学回音消除器+WebRtc浮点版声学回音消除器。
23 | public static final int WebRtcAecmWebRtcAec3 = 0b1010; //WebRtc定点版声学回音消除器+WebRtc第三版声学回音消除器。
24 | public static final int SpeexAecWebRtcAecmWebRtcAec3 = 0b1011; //Speex声学回音消除器+WebRtc定点版声学回音消除器+WebRtc第三版声学回音消除器。
25 | }
26 |
27 | public long m_SpeexWebRtcAecPt; //存放SpeexWebRtc三重声学回音消除器的指针。
28 |
29 | //构造函数。
30 | public SpeexWebRtcAec()
31 | {
32 | m_SpeexWebRtcAecPt = 0;
33 | }
34 |
35 | //析构函数。
36 | protected void finalize()
37 | {
38 | Dstoy();
39 | }
40 |
41 | //SpeexWebRtc三重声学回音消除器获取应用程序限制信息。
42 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
43 | {
44 | return SpeexWebRtcAecGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
45 | }
46 |
47 | //创建并初始化SpeexWebRtc三重声学回音消除器。
48 | public int Init( byte LicnCodePt[], int SmplRate, long FrmLenUnit, int WorkMode, int SpeexAecFilterLenMsec, int SpeexAecIsUseRec, float SpeexAecEchoMultiple, float SpeexAecEchoCont, int SpeexAecEchoSupes, int SpeexAecEchoSupesAct, int WebRtcAecmIsUseCNGMode, int WebRtcAecmEchoMode, int WebRtcAecmDelay, int WebRtcAecEchoMode, int WebRtcAecDelay, int WebRtcAecIsUseDelayAgstcMode, int WebRtcAecIsUseExtdFilterMode, int WebRtcAecIsUseRefinedFilterAdaptAecMode, int WebRtcAecIsUseAdaptAdjDelay, int WebRtcAec3Delay, int IsUseSameRoomAec, int SameRoomEchoMinDelay, Vstr ErrInfoVstrPt )
49 | {
50 | if( m_SpeexWebRtcAecPt == 0 )
51 | {
52 | HTLong p_SpeexWebRtcAecPt = new HTLong();
53 | if( SpeexWebRtcAecInit( LicnCodePt, p_SpeexWebRtcAecPt, SmplRate, FrmLenUnit, WorkMode, SpeexAecFilterLenMsec, SpeexAecIsUseRec, SpeexAecEchoMultiple, SpeexAecEchoCont, SpeexAecEchoSupes, SpeexAecEchoSupesAct, WebRtcAecmIsUseCNGMode, WebRtcAecmEchoMode, WebRtcAecmDelay, WebRtcAecEchoMode, WebRtcAecDelay, WebRtcAecIsUseDelayAgstcMode, WebRtcAecIsUseExtdFilterMode, WebRtcAecIsUseRefinedFilterAdaptAecMode, WebRtcAecIsUseAdaptAdjDelay, WebRtcAec3Delay, IsUseSameRoomAec, SameRoomEchoMinDelay, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
54 | {
55 | m_SpeexWebRtcAecPt = p_SpeexWebRtcAecPt.m_Val;
56 | return 0;
57 | }
58 | else
59 | {
60 | return -1;
61 | }
62 | }
63 | else
64 | {
65 | return 0;
66 | }
67 | }
68 |
69 | //设置SpeexWebRtc三重声学回音消除器的WebRtc定点版声学回音消除器的回音延迟。
70 | public int SetWebRtcAecmDelay( int WebRtcAecmDelay )
71 | {
72 | return SpeexWebRtcAecSetWebRtcAecmDelay( m_SpeexWebRtcAecPt, WebRtcAecmDelay );
73 | }
74 |
75 | //获取SpeexWebRtc三重声学回音消除器的WebRtc定点版声学回音消除器的回音延迟。
76 | public int GetWebRtcAecmDelay( HTInt WebRtcAecmDelayPt )
77 | {
78 | return SpeexWebRtcAecGetWebRtcAecmDelay( m_SpeexWebRtcAecPt, WebRtcAecmDelayPt );
79 | }
80 |
81 | //设置SpeexWebRtc三重声学回音消除器的WebRtc浮点版声学回音消除器的回音延迟。
82 | public int SetWebRtcAecDelay( int WebRtcAecDelay )
83 | {
84 | return SpeexWebRtcAecSetWebRtcAecDelay( m_SpeexWebRtcAecPt, WebRtcAecDelay );
85 | }
86 |
87 | //获取SpeexWebRtc三重声学回音消除器的WebRtc浮点版声学回音消除器的回音延迟。
88 | public int GetWebRtcAecDelay( HTInt WebRtcAecDelayPt )
89 | {
90 | return SpeexWebRtcAecGetWebRtcAecDelay( m_SpeexWebRtcAecPt, WebRtcAecDelayPt );
91 | }
92 |
93 | //设置SpeexWebRtc三重声学回音消除器的WebRtc第三版声学回音消除器的回音延迟。
94 | public int SetWebRtcAec3Delay( int WebRtcAec3Delay )
95 | {
96 | return SpeexWebRtcAecSetWebRtcAec3Delay( m_SpeexWebRtcAecPt, WebRtcAec3Delay );
97 | }
98 |
99 | //获取SpeexWebRtc三重声学回音消除器的WebRtc第三版声学回音消除器的回音延迟。
100 | public int GetWebRtcAec3Delay( HTInt WebRtcAec3DelayPt )
101 | {
102 | return SpeexWebRtcAecGetWebRtcAec3Delay( m_SpeexWebRtcAecPt, WebRtcAec3DelayPt );
103 | }
104 |
105 | //用SpeexWebRtc三重声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行SpeexWebRtc三重声学回音消除。
106 | public int Pocs( short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] )
107 | {
108 | return SpeexWebRtcAecPocs( m_SpeexWebRtcAecPt, InptFrmPt, OtptFrmPt, RsltFrmPt );
109 | }
110 |
111 | //销毁SpeexWebRtc三重声学回音消除器。
112 | public int Dstoy()
113 | {
114 | if( m_SpeexWebRtcAecPt != 0 )
115 | {
116 | if( SpeexWebRtcAecDstoy( m_SpeexWebRtcAecPt ) == 0 )
117 | {
118 | m_SpeexWebRtcAecPt = 0;
119 | return 0;
120 | }
121 | else
122 | {
123 | return -1;
124 | }
125 | }
126 | else
127 | {
128 | return 0;
129 | }
130 | }
131 |
132 | //SpeexWebRtc三重声学回音消除器获取应用程序限制信息。
133 | private static native int SpeexWebRtcAecGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
134 |
135 | //创建并初始化SpeexWebRtc三重声学回音消除器。
136 | private native int SpeexWebRtcAecInit( byte LicnCodePt[], HTLong SpeexWebRtcAecPt, int SmplRate, long FrmLenUnit, int WorkMode, int SpeexAecFilterLenMsec, int SpeexAecIsUseRec, float SpeexAecEchoMultiple, float SpeexAecEchoCont, int SpeexAecEchoSupes, int SpeexAecEchoSupesAct, int WebRtcAecmIsUseCNGMode, int WebRtcAecmEchoMode, int WebRtcAecmDelay, int WebRtcAecEchoMode, int WebRtcAecDelay, int WebRtcAecIsUseDelayAgstcMode, int WebRtcAecIsUseExtdFilterMode, int WebRtcAecIsUseRefinedFilterAdaptAecMode, int WebRtcAecIsUseAdaptAdjDelay, int WebRtcAec3Delay, int IsUseSameRoomAec, int SameRoomEchoMinDelay, long ErrInfoVstrPt );
137 |
138 | //设置SpeexWebRtc三重声学回音消除器的WebRtc定点版声学回音消除器的回音延迟。
139 | private native int SpeexWebRtcAecSetWebRtcAecmDelay( long SpeexWebRtcAecPt, int WebRtcAecmDelay );
140 |
141 | //获取SpeexWebRtc三重声学回音消除器的WebRtc定点版声学回音消除器的回音延迟。
142 | private native int SpeexWebRtcAecGetWebRtcAecmDelay( long SpeexWebRtcAecPt, HTInt WebRtcAecmDelayPt );
143 |
144 | //设置SpeexWebRtc三重声学回音消除器的WebRtc浮点版声学回音消除器的回音延迟。
145 | private native int SpeexWebRtcAecSetWebRtcAecDelay( long SpeexWebRtcAecPt, int WebRtcAecDelay );
146 |
147 | //获取SpeexWebRtc三重声学回音消除器的WebRtc浮点版声学回音消除器的回音延迟。
148 | private native int SpeexWebRtcAecGetWebRtcAecDelay( long SpeexWebRtcAecPt, HTInt WebRtcAecDelayPt );
149 |
150 | //设置SpeexWebRtc三重声学回音消除器的WebRtc第三版声学回音消除器的回音延迟。
151 | private native int SpeexWebRtcAecSetWebRtcAec3Delay( long SpeexWebRtcAecPt, int WebRtcAec3Delay );
152 |
153 | //获取SpeexWebRtc三重声学回音消除器的WebRtc第三版声学回音消除器的回音延迟。
154 | private native int SpeexWebRtcAecGetWebRtcAec3Delay( long SpeexWebRtcAecPt, HTInt WebRtcAec3DelayPt );
155 |
156 | //用SpeexWebRtc三重声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行SpeexWebRtc三重声学回音消除。
157 | private native int SpeexWebRtcAecPocs( long SpeexWebRtcAecPt, short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] );
158 |
159 | //销毁SpeexWebRtc三重声学回音消除器。
160 | private native int SpeexWebRtcAecDstoy( long SpeexWebRtcAecPt );
161 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/WebRtcAec.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //WebRtc浮点版声学回音消除器。
6 | public class WebRtcAec
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "WebRtc" ); //加载libWebRtc.so。
13 | }
14 |
15 | public long m_WebRtcAecPt; //存放WebRtc浮点版声学回音消除器的指针。
16 |
17 | //构造函数。
18 | public WebRtcAec()
19 | {
20 | m_WebRtcAecPt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy();
27 | }
28 |
29 | //WebRtc浮点版声学回音消除器获取应用程序限制信息。
30 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
31 | {
32 | return WebRtcAecGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
33 | }
34 |
35 | //创建并初始化WebRtc浮点版声学回音消除器。
36 | public int Init( byte LicnCodePt[], int SmplRate, long FrmLenUnit, int EchoMode, int Delay, int IsUseDelayAgstcMode, int IsUseExtdFilterMode, int IsUseRefinedFilterAdaptAecMode, int IsUseAdaptAdjDelay, Vstr ErrInfoVstrPt )
37 | {
38 | if( m_WebRtcAecPt == 0 )
39 | {
40 | HTLong p_WebRtcAecPt = new HTLong();
41 | if( WebRtcAecInit( LicnCodePt, p_WebRtcAecPt, SmplRate, FrmLenUnit, EchoMode, Delay, IsUseDelayAgstcMode, IsUseExtdFilterMode, IsUseRefinedFilterAdaptAecMode, IsUseAdaptAdjDelay, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
42 | {
43 | m_WebRtcAecPt = p_WebRtcAecPt.m_Val;
44 | return 0;
45 | }
46 | else
47 | {
48 | return -1;
49 | }
50 | }
51 | else
52 | {
53 | return 0;
54 | }
55 | }
56 |
57 | //设置WebRtc浮点版声学回音消除器的回音延迟。
58 | public int SetDelay( int Delay )
59 | {
60 | return WebRtcAecSetDelay( m_WebRtcAecPt, Delay );
61 | }
62 |
63 | //获取WebRtc浮点版声学回音消除器的回音延迟。
64 | public int GetDelay( HTInt DelayPt )
65 | {
66 | return WebRtcAecGetDelay( m_WebRtcAecPt, DelayPt );
67 | }
68 |
69 | //用WebRtc浮点版声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行WebRtc浮点版声学回音消除。
70 | public int Pocs( short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] )
71 | {
72 | return WebRtcAecPocs( m_WebRtcAecPt, InptFrmPt, OtptFrmPt, RsltFrmPt );
73 | }
74 |
75 | //销毁WebRtc浮点版声学回音消除器。
76 | public int Dstoy()
77 | {
78 | if( m_WebRtcAecPt != 0 )
79 | {
80 | if( WebRtcAecDstoy( m_WebRtcAecPt ) == 0 )
81 | {
82 | m_WebRtcAecPt = 0;
83 | return 0;
84 | }
85 | else
86 | {
87 | return -1;
88 | }
89 | }
90 | else
91 | {
92 | return 0;
93 | }
94 | }
95 |
96 | //WebRtc浮点版声学回音消除器获取应用程序限制信息。
97 | private static native int WebRtcAecGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
98 |
99 | //创建并初始化WebRtc浮点版声学回音消除器。
100 | private native int WebRtcAecInit( byte LicnCodePt[], HTLong WebRtcAecPt, int SmplRate, long FrmLenUnit, int EchoMode, int Delay, int IsUseDelayAgstcMode, int IsUseExtdFilterMode, int IsUseRefinedFilterAdaptAecMode, int IsUseAdaptAdjDelay, long ErrInfoVstrPt );
101 |
102 | //设置WebRtc浮点版声学回音消除器的回音延迟。
103 | private native int WebRtcAecSetDelay( long WebRtcAecPt, int Delay );
104 |
105 | //获取WebRtc浮点版声学回音消除器的回音延迟。
106 | private native int WebRtcAecGetDelay( long WebRtcAecPt, HTInt DelayPt );
107 |
108 | //用WebRtc浮点版声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行WebRtc浮点版声学回音消除。
109 | private native int WebRtcAecPocs( long WebRtcAecPt, short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] );
110 |
111 | //销毁WebRtc浮点版声学回音消除器。
112 | private native int WebRtcAecDstoy( long WebRtcAecPt );
113 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/WebRtcAec3.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //WebRtc第三版声学回音消除器。
6 | public class WebRtcAec3
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "WebRtc3" ); //加载libWebRtc3.so。
13 | }
14 |
15 | public long m_WebRtcAec3Pt; //存放WebRtc第三版声学回音消除器的指针。
16 |
17 | //构造函数。
18 | public WebRtcAec3()
19 | {
20 | m_WebRtcAec3Pt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy();
27 | }
28 |
29 | //WebRtc第三版声学回音消除器获取应用程序限制信息。
30 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
31 | {
32 | return WebRtcAec3GetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
33 | }
34 |
35 | //创建并初始化WebRtc第三版声学回音消除器。
36 | public int Init( byte LicnCodePt[], int SmplRate, long FrmLenUnit, int Delay, Vstr ErrInfoVstrPt )
37 | {
38 | if( m_WebRtcAec3Pt == 0 )
39 | {
40 | HTLong p_WebRtcAec3Pt = new HTLong();
41 | if( WebRtcAec3Init( LicnCodePt, p_WebRtcAec3Pt, SmplRate, FrmLenUnit, Delay, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
42 | {
43 | m_WebRtcAec3Pt = p_WebRtcAec3Pt.m_Val;
44 | return 0;
45 | }
46 | else
47 | {
48 | return -1;
49 | }
50 | }
51 | else
52 | {
53 | return 0;
54 | }
55 | }
56 |
57 | //设置WebRtc第三版声学回音消除器的回音延迟。
58 | public int SetDelay( int Delay )
59 | {
60 | return WebRtcAec3SetDelay( m_WebRtcAec3Pt, Delay );
61 | }
62 |
63 | //获取WebRtc第三版声学回音消除器的回音延迟。
64 | public int GetDelay( HTInt DelayPt )
65 | {
66 | return WebRtcAec3GetDelay( m_WebRtcAec3Pt, DelayPt );
67 | }
68 |
69 | //用WebRtc第三版声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行WebRtc第三版声学回音消除。
70 | public int Pocs( short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] )
71 | {
72 | return WebRtcAec3Pocs( m_WebRtcAec3Pt, InptFrmPt, OtptFrmPt, RsltFrmPt );
73 | }
74 |
75 | //销毁WebRtc第三版声学回音消除器。
76 | public int Dstoy()
77 | {
78 | if( m_WebRtcAec3Pt != 0 )
79 | {
80 | if( WebRtcAec3Dstoy( m_WebRtcAec3Pt ) == 0 )
81 | {
82 | m_WebRtcAec3Pt = 0;
83 | return 0;
84 | }
85 | else
86 | {
87 | return -1;
88 | }
89 | }
90 | else
91 | {
92 | return 0;
93 | }
94 | }
95 |
96 | //WebRtc第三版声学回音消除器获取应用程序限制信息。
97 | private static native int WebRtcAec3GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
98 |
99 | //创建并初始化WebRtc第三版声学回音消除器。
100 | private native int WebRtcAec3Init( byte LicnCodePt[], HTLong WebRtcAec3Pt, int SmplRate, long FrmLenUnit, int Delay, long ErrInfoVstrPt );
101 |
102 | //设置WebRtc第三版声学回音消除器的回音延迟。
103 | private native int WebRtcAec3SetDelay( long WebRtcAec3Pt, int Delay );
104 |
105 | //获取WebRtc第三版声学回音消除器的回音延迟。
106 | private native int WebRtcAec3GetDelay( long WebRtcAec3Pt, HTInt DelayPt );
107 |
108 | //用WebRtc第三版声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行WebRtc第三版声学回音消除。
109 | private native int WebRtcAec3Pocs( long WebRtcAec3Pt, short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] );
110 |
111 | //销毁WebRtc第三版声学回音消除器。
112 | private native int WebRtcAec3Dstoy( long WebRtcAec3Pt );
113 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/WebRtcAecm.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //WebRtc定点版声学回音消除器。
6 | public class WebRtcAecm
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "WebRtc" ); //加载libWebRtc.so。
13 | }
14 |
15 | public long m_WebRtcAecmPt; //存放WebRtc定点版声学回音消除器的指针。
16 |
17 | //构造函数。
18 | public WebRtcAecm()
19 | {
20 | m_WebRtcAecmPt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy();
27 | }
28 |
29 | //创建并初始化WebRtc定点版声学回音消除器。
30 | public int Init( int SmplRate, long FrmLenUnit, int IsUseCNGMode, int EchoMode, int Delay, Vstr ErrInfoVstrPt )
31 | {
32 | if( m_WebRtcAecmPt == 0 )
33 | {
34 | HTLong p_WebRtcAecmPt = new HTLong();
35 | if( WebRtcAecmInit( p_WebRtcAecmPt, SmplRate, FrmLenUnit, IsUseCNGMode, EchoMode, Delay, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
36 | {
37 | m_WebRtcAecmPt = p_WebRtcAecmPt.m_Val;
38 | return 0;
39 | }
40 | else
41 | {
42 | return -1;
43 | }
44 | }
45 | else
46 | {
47 | return 0;
48 | }
49 | }
50 |
51 | //设置WebRtc定点版声学回音消除器的回音延迟。
52 | public int SetDelay( int Delay )
53 | {
54 | return WebRtcAecmSetDelay( m_WebRtcAecmPt, Delay );
55 | }
56 |
57 | //获取WebRtc定点版声学回音消除器的回音延迟。
58 | public int GetDelay( HTInt DelayPt )
59 | {
60 | return WebRtcAecmGetDelay( m_WebRtcAecmPt, DelayPt );
61 | }
62 |
63 | //用WebRtc定点版声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行WebRtc定点版声学回音消除。
64 | public int Pocs( short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] )
65 | {
66 | return WebRtcAecmPocs( m_WebRtcAecmPt, InptFrmPt, OtptFrmPt, RsltFrmPt );
67 | }
68 |
69 | //销毁WebRtc定点版声学回音消除器。
70 | public int Dstoy()
71 | {
72 | if( m_WebRtcAecmPt != 0 )
73 | {
74 | if( WebRtcAecmDstoy( m_WebRtcAecmPt ) == 0 )
75 | {
76 | m_WebRtcAecmPt = 0;
77 | return 0;
78 | }
79 | else
80 | {
81 | return -1;
82 | }
83 | }
84 | else
85 | {
86 | return 0;
87 | }
88 | }
89 |
90 | //创建并初始化WebRtc定点版声学回音消除器。
91 | private native int WebRtcAecmInit( HTLong WebRtcAecmPt, int SmplRate, long FrmLenUnit, int IsUseCNGMode, int EchoMode, int Delay, long ErrInfoVstrPt );
92 |
93 | //设置WebRtc定点版声学回音消除器的回音延迟。
94 | private native int WebRtcAecmSetDelay( long WebRtcAecmPt, int Delay );
95 |
96 | //获取WebRtc定点版声学回音消除器的回音延迟。
97 | private native int WebRtcAecmGetDelay( long WebRtcAecmPt, HTInt DelayPt );
98 |
99 | //用WebRtc定点版声学回音消除器对单声道16位有符号整型Pcm格式输入帧进行WebRtc定点版声学回音消除。
100 | private native int WebRtcAecmPocs( long WebRtcAecmPt, short InptFrmPt[], short OtptFrmPt[], short RsltFrmPt[] );
101 |
102 | //销毁WebRtc定点版声学回音消除器。
103 | private native int WebRtcAecmDstoy( long WebRtcAecmPt );
104 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/WebRtcNs.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //WebRtc浮点版噪音抑制器。
6 | public class WebRtcNs
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "WebRtc" ); //加载libWebRtc.so。
13 | }
14 |
15 | public long m_WebRtcNsPt; //WebRtc浮点版噪音抑制器的指针。
16 |
17 | //构造函数。
18 | public WebRtcNs()
19 | {
20 | m_WebRtcNsPt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy();
27 | }
28 |
29 | //创建并初始化WebRtc浮点版噪音抑制器。
30 | public int Init( int SmplRate, long FrmLenUnit, int PolicyMode, Vstr ErrInfoVstrPt )
31 | {
32 | if( m_WebRtcNsPt == 0 )
33 | {
34 | HTLong p_WebRtcNsPt = new HTLong();
35 | if( WebRtcNsInit( p_WebRtcNsPt, SmplRate, FrmLenUnit, PolicyMode, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
36 | {
37 | m_WebRtcNsPt = p_WebRtcNsPt.m_Val;
38 | return 0;
39 | }
40 | else
41 | {
42 | return -1;
43 | }
44 | }
45 | else
46 | {
47 | return 0;
48 | }
49 | }
50 |
51 | //用WebRtc浮点版噪音抑制器对单声道16位有符号整型Pcm格式帧进行WebRtc浮点版噪音抑制。
52 | public int Pocs( short FrmObj[], short RsltFrmObj[] )
53 | {
54 | return WebRtcNsPocs( m_WebRtcNsPt, FrmObj, RsltFrmObj );
55 | }
56 |
57 | //销毁WebRtc浮点版噪音抑制器。
58 | public int Dstoy()
59 | {
60 | if( m_WebRtcNsPt != 0 )
61 | {
62 | if( WebRtcNsDstoy( m_WebRtcNsPt ) == 0 )
63 | {
64 | m_WebRtcNsPt = 0;
65 | return 0;
66 | }
67 | else
68 | {
69 | return -1;
70 | }
71 | }
72 | else
73 | {
74 | return 0;
75 | }
76 | }
77 |
78 | //创建并初始化WebRtc浮点版噪音抑制器。
79 | private native int WebRtcNsInit( HTLong WebRtcNsPt, int SmplRate, long FrmLenUnit, int PolicyMode, long ErrInfoVstrPt );
80 |
81 | //用WebRtc浮点版噪音抑制器对单声道16位有符号整型Pcm格式帧进行WebRtc浮点版噪音抑制。
82 | private native int WebRtcNsPocs( long WebRtcNsPt, short FrmObj[], short RsltFrmObj[] );
83 |
84 | //销毁WebRtc浮点版噪音抑制器。
85 | private native int WebRtcNsDstoy( long WebRtcNsPt );
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Ado/WebRtcNsx.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Ado;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //WebRtc定点版噪音抑制器。
6 | public class WebRtcNsx
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "WebRtc" ); //加载libWebRtc.so。
13 | }
14 |
15 | public long m_WebRtcNsxPt; //WebRtc定点版噪音抑制器的指针。
16 |
17 | //构造函数。
18 | public WebRtcNsx()
19 | {
20 | m_WebRtcNsxPt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy();
27 | }
28 |
29 | //创建并初始化WebRtc定点版噪音抑制器。
30 | public int Init( int SmplRate, long FrmLenUnit, int PolicyMode, Vstr ErrInfoVstrPt )
31 | {
32 | if( m_WebRtcNsxPt == 0 )
33 | {
34 | HTLong p_WebRtcNsxPt = new HTLong();
35 | if( WebRtcNsxInit( p_WebRtcNsxPt, SmplRate, FrmLenUnit, PolicyMode, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
36 | {
37 | m_WebRtcNsxPt = p_WebRtcNsxPt.m_Val;
38 | return 0;
39 | }
40 | else
41 | {
42 | return -1;
43 | }
44 | }
45 | else
46 | {
47 | return 0;
48 | }
49 | }
50 |
51 | //用WebRtc定点版噪音抑制器对单声道16位有符号整型Pcm格式帧进行WebRtc定点版噪音抑制。
52 | public int Pocs( short FrmPt[], short RsltFrmPt[] )
53 | {
54 | return WebRtcNsxPocs( m_WebRtcNsxPt, FrmPt, RsltFrmPt );
55 | }
56 |
57 | //销毁WebRtc定点版噪音抑制器。
58 | public int Dstoy()
59 | {
60 | if( m_WebRtcNsxPt != 0 )
61 | {
62 | if( WebRtcNsxDstoy( m_WebRtcNsxPt ) == 0 )
63 | {
64 | m_WebRtcNsxPt = 0;
65 | return 0;
66 | }
67 | else
68 | {
69 | return -1;
70 | }
71 | }
72 | else
73 | {
74 | return 0;
75 | }
76 | }
77 |
78 | //创建并初始化WebRtc定点版噪音抑制器。
79 | private native int WebRtcNsxInit( HTLong WebRtcNsxPt, int SmplRate, long FrmLenUnit, int PolicyMode, long ErrInfoVstrPt );
80 |
81 | //用WebRtc定点版噪音抑制器对单声道16位有符号整型Pcm格式帧进行WebRtc定点版噪音抑制。
82 | private native int WebRtcNsxPocs( long WebRtcNsxPt, short FrmPt[], short RsltFrmPt[] );
83 |
84 | //销毁WebRtc定点版噪音抑制器。
85 | private native int WebRtcNsxDstoy( long WebRtcNsxPt );
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Data/HTInt.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Data;
2 |
3 | //整型。
4 | public class HTInt
5 | {
6 | public int m_Val;
7 |
8 | //构造函数。
9 | public HTInt()
10 | {
11 | m_Val = 0;
12 | }
13 |
14 | public HTInt( int Val )
15 | {
16 | m_Val = Val;
17 | }
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Data/HTLong.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Data;
2 |
3 | //长整型。
4 | public class HTLong
5 | {
6 | public long m_Val;
7 |
8 | //构造函数。
9 | public HTLong()
10 | {
11 | m_Val = 0;
12 | }
13 |
14 | public HTLong( long Val )
15 | {
16 | m_Val = Val;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Data/HTObject.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Data;
2 |
3 | //对象。
4 | public class HTObject
5 | {
6 | public Object m_Val;
7 |
8 | //构造函数。
9 | public HTObject()
10 | {
11 | m_Val = null;
12 | }
13 |
14 | public HTObject( Object Val )
15 | {
16 | m_Val = Val;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Data/HTShort.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Data;
2 |
3 | //短整型。
4 | public class HTShort
5 | {
6 | public short m_Val;
7 |
8 | //构造函数。
9 | public HTShort()
10 | {
11 | m_Val = 0;
12 | }
13 |
14 | public HTShort( short Val )
15 | {
16 | m_Val = Val;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Data/HTString.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Data;
2 |
3 | //字符串。
4 | public class HTString
5 | {
6 | public String m_Val;
7 |
8 | //构造函数。
9 | public HTString()
10 | {
11 | m_Val = null;
12 | }
13 |
14 | public HTString( String Val )
15 | {
16 | m_Val = Val;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Data/MsgQueue.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Data;
2 |
3 | import android.os.SystemClock;
4 |
5 | import java.util.concurrent.ConcurrentLinkedDeque;
6 |
7 | public abstract class MsgQueue //消息队列。
8 | {
9 | class Msg //消息。
10 | {
11 | int m_MsgPocsRslt; //消息处理结果。
12 | int m_MsgTyp; //消息类型。
13 | Object[] m_MsgArgCntnrPt; //消息参数容器的指针。
14 | }
15 | public final ConcurrentLinkedDeque< Msg > m_MsgCntnrPt = new ConcurrentLinkedDeque<>(); //存放消息容器的指针。这里忽略报错“Call requires API level 21 (current min is 14): new java.util.concurrent.ConcurrentLinkedDeque”。
16 | public final Thread m_MsgPocsThrdPt; //消息处理线程的指针。
17 |
18 | //用户定义的消息处理回调函数。
19 | public abstract int UserMsgPocs( int MsgTyp, Object[] MsgParmPt );
20 |
21 | //构造函数。
22 | public MsgQueue( Thread MsgPocsThrdPt )
23 | {
24 | m_MsgPocsThrdPt = MsgPocsThrdPt;
25 | }
26 |
27 | //消息处理线程进行消息处理。
28 | public int MsgPocsThrdMsgPocs()
29 | {
30 | int p_Rslt = -1; //存放本函数的执行结果,为0表示成功,为非0表示失败。
31 | Msg p_MsgPt;
32 |
33 | Out:
34 | {
35 | if( m_MsgCntnrPt.isEmpty() ) break Out; //如果没有消息需要处理。
36 |
37 | p_MsgPt = m_MsgCntnrPt.pollFirst(); //从消息容器中取出并删除第一个消息。这里忽略报错“Call requires API level 21 (current min is 14): java.util.concurrent.ConcurrentLinkedDeque#pollFirst”。
38 | p_MsgPt.m_MsgPocsRslt = UserMsgPocs( p_MsgPt.m_MsgTyp, p_MsgPt.m_MsgArgCntnrPt ); //调用用户定义的消息处理回调函数。
39 |
40 | p_Rslt = 0; //设置本函数执行成功。
41 | }
42 |
43 | if( p_Rslt != 0 ) //如果本函数执行失败。
44 | {
45 |
46 | }
47 | return p_Rslt;
48 | }
49 |
50 | //发送消息。
51 | public int SendMsg( int IsBlockWait, int AddFirstOrLast, int MsgTyp, Object... MsgParmPt )
52 | {
53 | int p_Rslt = -1; //存放本函数的执行结果,为0表示成功,为非0表示失败。
54 |
55 | Out:
56 | {
57 | Msg p_MsgPt = new Msg();
58 |
59 | //放入消息到消息容器。
60 | p_MsgPt.m_MsgPocsRslt = -99999;
61 | p_MsgPt.m_MsgTyp = MsgTyp;
62 | p_MsgPt.m_MsgArgCntnrPt = MsgParmPt;
63 | if( AddFirstOrLast == 0 ) m_MsgCntnrPt.addFirst( p_MsgPt ); //添加消息到消息容器第一个。这里忽略报错“Call requires API level 21 (current min is 14): java.util.concurrent.ConcurrentLinkedDeque#addFirst”。
64 | else m_MsgCntnrPt.addLast( p_MsgPt ); //添加消息到消息容器最后一个。这里忽略报错“Call requires API level 21 (current min is 14): java.util.concurrent.ConcurrentLinkedDeque#addLast”。
65 |
66 | if( IsBlockWait != 0 ) //如果要阻塞等待。
67 | {
68 | if( Thread.currentThread().getId() != m_MsgPocsThrdPt.getId() ) //如果发送消息线程不是消息处理线程。
69 | {
70 | do
71 | {
72 | SystemClock.sleep( 1 ); //暂停一下,避免CPU使用率过高。
73 | } while( ( m_MsgPocsThrdPt.isAlive() ) && ( p_MsgPt.m_MsgPocsRslt == -99999 ) );
74 | }
75 | else //如果发送消息线程就是消息处理线程。
76 | {
77 | do
78 | {
79 | MsgPocsThrdMsgPocs();
80 | } while( p_MsgPt.m_MsgPocsRslt == -99999 );
81 | }
82 | p_Rslt = p_MsgPt.m_MsgPocsRslt; //返回消息处理结果。
83 | }
84 | else //如果不阻塞等待。
85 | {
86 | p_Rslt = 0; //返回消息处理结果为成功。因为要让设置函数返回成功。
87 | }
88 | }
89 |
90 | return p_Rslt;
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Data/Vstr.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Data;
2 |
3 | //动态字符串。
4 | public class Vstr
5 | {
6 | static
7 | {
8 | System.loadLibrary( "Func" ); //加载libFunc.so。
9 | }
10 |
11 | public long m_VstrPt; //存放动态字符串的指针。
12 |
13 | //构造函数。
14 | public Vstr()
15 | {
16 | m_VstrPt = 0;
17 | }
18 |
19 | //析构函数。
20 | protected void finalize()
21 | {
22 | Dstoy();
23 | }
24 |
25 | //创建并初始化动态字符串。
26 | public int Init( String SrcStrPt )
27 | {
28 | if( m_VstrPt == 0 )
29 | {
30 | HTLong p_VstrPt = new HTLong();
31 | if( VstrInit( p_VstrPt, SrcStrPt ) == 0 )
32 | {
33 | m_VstrPt = p_VstrPt.m_Val;
34 | return 0;
35 | }
36 | else
37 | {
38 | return -1;
39 | }
40 | }
41 | else
42 | {
43 | return 0;
44 | }
45 | }
46 |
47 | //复制字符串到动态字符串。
48 | public int Cpy( String SrcStrPt )
49 | {
50 | return VstrCpy( m_VstrPt, SrcStrPt );
51 | }
52 |
53 | //插入字符串到动态字符串的指定位置。
54 | public int Ins( long Pos, String SrcStrPt )
55 | {
56 | return VstrIns( m_VstrPt, Pos, SrcStrPt );
57 | }
58 |
59 | //追加字符串到动态字符串的末尾。
60 | public int Cat( String SrcStrPt )
61 | {
62 | return VstrCat( m_VstrPt, SrcStrPt );
63 | }
64 |
65 | //清空动态字符串。
66 | public int SetEmpty()
67 | {
68 | return VstrSetEmpty( m_VstrPt );
69 | }
70 |
71 | //设置动态字符串的大小。
72 | public int SetSz( long VstrSzChr )
73 | {
74 | return VstrSetSz( m_VstrPt, VstrSzChr );
75 | }
76 |
77 | //获取动态字符串的字符串指针。
78 | public int GetStrPt( HTLong VstrStrPtPt )
79 | {
80 | return VstrGetStrPt( m_VstrPt, VstrStrPtPt );
81 | }
82 |
83 | //获取动态字符串的字符集。
84 | public int GetChrSet( HTInt VstrChrSetPt )
85 | {
86 | return VstrGetChrSet( m_VstrPt, VstrChrSetPt );
87 | }
88 |
89 | //获取动态字符串的大小。
90 | public int GetSz( HTLong VstrSzChrPt )
91 | {
92 | return VstrGetSz( m_VstrPt, VstrSzChrPt );
93 | }
94 |
95 | //获取动态字符串的长度。
96 | public int GetLen( HTLong VstrLenChrPt )
97 | {
98 | return VstrGetLen( m_VstrPt, VstrLenChrPt );
99 | }
100 |
101 | //获取动态字符串的大小。
102 | public int UrlParse( HTString PrtclVstrPt, HTString UsernameVstrPt, HTString PasswordVstrPt, HTString HostnameVstrPt, HTString PortVstrPt, HTString PathVstrPt, HTString ParametersVstrPt, HTString QueryVstrPt, HTString FragmentVstrPt, Vstr ErrInfoVstrPt )
103 | {
104 | return VstrUrlParse( m_VstrPt, PrtclVstrPt, UsernameVstrPt, PasswordVstrPt, HostnameVstrPt, PortVstrPt, PathVstrPt, ParametersVstrPt, QueryVstrPt, FragmentVstrPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
105 | }
106 |
107 | //获取动态字符串。
108 | public String GetStr()
109 | {
110 | return VstrGetStr( m_VstrPt );
111 | }
112 |
113 | //销毁动态字符串。
114 | public int Dstoy()
115 | {
116 | if( m_VstrPt != 0 )
117 | {
118 | if( VstrDstoy( m_VstrPt ) == 0 )
119 | {
120 | m_VstrPt = 0;
121 | return 0;
122 | }
123 | else
124 | {
125 | return -1;
126 | }
127 | }
128 | else
129 | {
130 | return 0;
131 | }
132 | }
133 |
134 | //创建并初始化动态字符串。
135 | private native int VstrInit( HTLong VstrPt, String SrcStrPt );
136 | //销毁动态字符串。
137 | private native int VstrDstoy( long VstrPt );
138 |
139 | //复制字符串到动态字符串。
140 | private native int VstrCpy( long VstrPt, String SrcStrPt );
141 |
142 | //插入字符串到动态字符串的指定位置。
143 | private native int VstrIns( long VstrPt, long Pos, String SrcStrPt );
144 |
145 | //追加字符串到动态字符串的末尾。
146 | private native int VstrCat( long VstrPt, String SrcStrPt );
147 |
148 | //清空动态字符串。
149 | private native int VstrSetEmpty( long VstrPt );
150 | //设置动态字符串的大小。
151 | private native int VstrSetSz( long VstrPt, long VstrSzChr );
152 |
153 | //获取动态字符串的字符串指针。
154 | private native int VstrGetStrPt( long VstrPt, HTLong VstrStrPtPt );
155 | //获取动态字符串的字符集。
156 | private native int VstrGetChrSet( long VstrPt, HTInt VstrChrSetPt );
157 | //获取动态字符串的大小。
158 | private native int VstrGetSz( long VstrPt, HTLong VstrSzChrPt );
159 | //获取动态字符串的长度。
160 | private native int VstrGetLen( long VstrPt, HTLong VstrLenChrPt );
161 |
162 | //动态字符串解析为Url。
163 | private native int VstrUrlParse( long VstrPt, HTString PrtclVstrPt, HTString UsernameVstrPt, HTString PasswordVstrPt, HTString HostnameVstrPt, HTString PortVstrPt, HTString PathVstrPt, HTString ParametersVstrPt, HTString QueryVstrPt, HTString FragmentVstrPt, long ErrInfoVstrPt );
164 |
165 | //获取动态字符串。
166 | private native String VstrGetStr( long VstrPt );
167 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Media/AviFileWriter.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Media;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //Avi文件写入器。
6 | public class AviFileWriter
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "MediaFile" ); //加载libMediaFile.so。
12 | }
13 |
14 | public long m_AviFileWriterPt; //存放Avi文件写入器的指针。
15 |
16 | //构造函数。
17 | public AviFileWriter()
18 | {
19 | m_AviFileWriterPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy( null );
26 | }
27 |
28 | //Avi文件写入器获取应用程序限制信息。
29 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
30 | {
31 | return AviFileWriterGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
32 | }
33 |
34 | //创建并初始化Avi文件写入器。
35 | public int Init( byte LicnCodePt[], String AviFileFullPathStrPt, long AviFileWrBufSzByt, int MaxStrmNum, Vstr ErrInfoVstrPt )
36 | {
37 | if( m_AviFileWriterPt == 0 )
38 | {
39 | HTLong p_AviFileWriterPt = new HTLong();
40 | if( AviFileWriterInit( LicnCodePt, p_AviFileWriterPt, AviFileFullPathStrPt, AviFileWrBufSzByt, MaxStrmNum, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
41 | {
42 | m_AviFileWriterPt = p_AviFileWriterPt.m_Val;
43 | return 0;
44 | }
45 | else
46 | {
47 | return -1;
48 | }
49 | }
50 | else
51 | {
52 | return 0;
53 | }
54 | }
55 |
56 | //设置整个Avi文件时间线的起始时间戳。
57 | public int SetStartTimeStamp( long StartTimeStampMsec, Vstr ErrInfoVstrPt )
58 | {
59 | return AviFileWriterSetStartTimeStamp( m_AviFileWriterPt, StartTimeStampMsec, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
60 | }
61 | //获取整个Avi文件时间线的起始时间戳。
62 | public int GetStartTimeStamp( HTLong StartTimeStampMsecPt, Vstr ErrInfoVstrPt )
63 | {
64 | return AviFileWriterGetStartTimeStamp( m_AviFileWriterPt, StartTimeStampMsecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
65 | }
66 |
67 | //Avi文件添加音频流。
68 | public int AddAdoStrm( int Fmt, int SampleRate, int ChanlNum, HTInt AdoStrmIdxPt, Vstr ErrInfoVstrPt )
69 | {
70 | return AviFileWriterAddAdoStrm( m_AviFileWriterPt, Fmt, SampleRate, ChanlNum, AdoStrmIdxPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
71 | }
72 | //设置Avi文件指定音频流的当前时间戳。
73 | public int AdoStrmSetCurTimeStamp( int AdoStrmIdx, long CurTimeStampMsec, Vstr ErrInfoVstrPt )
74 | {
75 | return AviFileWriterAdoStrmSetCurTimeStamp( m_AviFileWriterPt, AdoStrmIdx, CurTimeStampMsec, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
76 | }
77 | //获取Avi文件指定音频流的当前时间戳。
78 | public int AdoStrmGetCurTimeStamp( int AdoStrmIdx, HTLong CurTimeStampMsecPt, Vstr ErrInfoVstrPt )
79 | {
80 | return AviFileWriterAdoStrmGetCurTimeStamp( m_AviFileWriterPt, AdoStrmIdx, CurTimeStampMsecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
81 | }
82 | //Avi文件指定音频流的写入音频帧。
83 | public int AdoStrmWriteByte( int AdoStrmIdx, byte FrmPt[], long FrmLenByt, long FrmLenMsec, Vstr ErrInfoVstrPt )
84 | {
85 | return AviFileWriterAdoStrmWriteByte( m_AviFileWriterPt, AdoStrmIdx, FrmPt, FrmLenByt, FrmLenMsec, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
86 | }
87 | public int AdoStrmWriteShort( int AdoStrmIdx, short FrmPt[], long FrmLenByt, long FrmLenMsec, Vstr ErrInfoVstrPt )
88 | {
89 | return AviFileWriterAdoStrmWriteShort( m_AviFileWriterPt, AdoStrmIdx, FrmPt, FrmLenByt, FrmLenMsec, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
90 | }
91 |
92 | //Avi文件添加视频流。
93 | public int AddVdoStrm( int Fmt, int MaxSampleRate, HTInt VdoStrmIdxPt, Vstr ErrInfoVstrPt )
94 | {
95 | return AviFileWriterAddVdoStrm( m_AviFileWriterPt, Fmt, MaxSampleRate, VdoStrmIdxPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
96 | }
97 | //获取Avi文件指定视频流的当前时间戳。
98 | public int VdoStrmGetCurTimeStamp( int VdoStrmIdx, HTLong CurTimeStampMsecPt, Vstr ErrInfoVstrPt )
99 | {
100 | return AviFileWriterVdoStrmGetCurTimeStamp( m_AviFileWriterPt, VdoStrmIdx, CurTimeStampMsecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
101 | }
102 | //Avi文件指定视频流的写入视频帧。
103 | public int VdoStrmWriteByte( int VdoStrmIdx, long FrmTimeStampMsec, byte FrmPt[], long FrmLenByt, Vstr ErrInfoVstrPt )
104 | {
105 | return AviFileWriterVdoStrmWriteByte( m_AviFileWriterPt, VdoStrmIdx, FrmTimeStampMsec, FrmPt, FrmLenByt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
106 | }
107 | public int VdoStrmWriteShort( int VdoStrmIdx, long FrmTimeStampMsec, short FrmPt[], long FrmLenByt, Vstr ErrInfoVstrPt )
108 | {
109 | return AviFileWriterVdoStrmWriteShort( m_AviFileWriterPt, VdoStrmIdx, FrmTimeStampMsec, FrmPt, FrmLenByt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
110 | }
111 |
112 | //销毁Avi文件写入器。
113 | public int Dstoy( Vstr ErrInfoVstrPt )
114 | {
115 | if( m_AviFileWriterPt != 0 )
116 | {
117 | if( AviFileWriterDstoy( m_AviFileWriterPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
118 | {
119 | m_AviFileWriterPt = 0;
120 | return 0;
121 | }
122 | else
123 | {
124 | return -1;
125 | }
126 | }
127 | else
128 | {
129 | return 0;
130 | }
131 | }
132 |
133 | //Avi文件写入器获取应用程序限制信息。
134 | private static native int AviFileWriterGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
135 |
136 | //创建并初始化Avi文件写入器。
137 | private native int AviFileWriterInit( byte LicnCodePt[], HTLong AviFileWriterPt, String AviFileFullPathStrPt, long AviFileWrBufSzByt, int MaxStrmNum, long ErrInfoVstrPt );
138 |
139 | //设置整个Avi文件时间线的起始时间戳。
140 | private native int AviFileWriterSetStartTimeStamp( long AviFileWriterPt, long StartTimeStampMsec, long ErrInfoVstrPt );
141 | //获取整个Avi文件时间线的起始时间戳。
142 | private native int AviFileWriterGetStartTimeStamp( long AviFileWriterPt, HTLong StartTimeStampMsecPt, long ErrInfoVstrPt );
143 |
144 | //Avi文件添加音频流。
145 | private native int AviFileWriterAddAdoStrm( long AviFileWriterPt, int Fmt, int SampleRate, int ChanlNum, HTInt AdoStrmIdxPt, long ErrInfoVstrPt );
146 | //设置Avi文件指定音频流的当前时间戳。
147 | private native int AviFileWriterAdoStrmSetCurTimeStamp( long AviFileWriterPt, int AdoStrmIdx, long CurTimeStampMsec, long ErrInfoVstrPt );
148 | //获取Avi文件指定音频流的当前时间戳。
149 | private native int AviFileWriterAdoStrmGetCurTimeStamp( long AviFileWriterPt, int AdoStrmIdx, HTLong CurTimeStampMsecPt, long ErrInfoVstrPt );
150 | //Avi文件指定音频流的写入字节型音频帧。
151 | private native int AviFileWriterAdoStrmWriteByte( long AviFileWriterPt, int AdoStrmIdx, byte FrmPt[], long FrmLenByt, long FrmLenMsec, long ErrInfoVstrPt );
152 | //Avi文件指定音频流的写入短整型音频帧。
153 | private native int AviFileWriterAdoStrmWriteShort( long AviFileWriterPt, int AdoStrmIdx, short FrmPt[], long FrmLenTwoByt, long FrmLenMsec, long ErrInfoVstrPt );
154 |
155 | //Avi文件添加视频流。
156 | private native int AviFileWriterAddVdoStrm( long AviFileWriterPt, int Fmt, int MaxSampleRate, HTInt VdoStrmIdxPt, long ErrInfoVstrPt );
157 | //获取Avi文件指定视频流的当前时间戳。
158 | private native int AviFileWriterVdoStrmGetCurTimeStamp( long AviFileWriterPt, int VdoStrmIdx, HTLong CurTimeStampMsecPt, long ErrInfoVstrPt );
159 | //Avi文件指定视频流的写入字节型视频帧。
160 | private native int AviFileWriterVdoStrmWriteByte( long AviFileWriterPt, int VdoStrmIdx, long FrmTimeStampMsec, byte FrmPt[], long FrmLenByt, long ErrInfoVstrPt );
161 | //Avi文件指定视频流的写入短整型视频帧。
162 | private native int AviFileWriterVdoStrmWriteShort( long AviFileWriterPt, int VdoStrmIdx, long FrmTimeStampMsec, short FrmPt[], long FrmLenTwoByt, long ErrInfoVstrPt );
163 |
164 | //销毁Avi文件写入器。
165 | private native int AviFileWriterDstoy( long AviFileWriterPt, long ErrInfoVstrPt );
166 | }
167 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Media/HTListView.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Media;
2 |
3 | import android.content.Context;
4 | import android.os.Build;
5 | import android.support.annotation.RequiresApi;
6 | import android.util.AttributeSet;
7 | import android.util.Log;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.ListAdapter;
11 | import android.widget.ListView;
12 |
13 | public class HTListView extends ListView
14 | {
15 | public HTListView( Context context )
16 | {
17 | super( context );
18 | }
19 |
20 | @RequiresApi( api = Build.VERSION_CODES.LOLLIPOP ) public HTListView( Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes )
21 | {
22 | super( context, attrs, defStyleAttr, defStyleRes );
23 | }
24 |
25 | public HTListView( Context context, AttributeSet attrs, int defStyleAttr )
26 | {
27 | super( context, attrs, defStyleAttr );
28 | }
29 |
30 | public HTListView( Context context, AttributeSet attrs )
31 | {
32 | super( context, attrs );
33 | }
34 |
35 | //MeasureSpec值的高2位为测量模式,低30位为测量大小。widthMeasureSpec表示View宽度的测量模式和测量大小,heightMeasureSpec表示View高度的测量模式和测量大小。
36 | //测量模式包括:
37 | //View.MeasureSpec.AT_MOST: 这个子view你最大不能超过这个值。
38 | //View.MeasureSpec.UNSPECIFIED:这个子view你大小不确定,还得你自己用尺子给自己量一下,父view尽量给你所需的长度。
39 | //View.MeasureSpec.EXACTLY:这个子view你就是这么大了。*/
40 |
41 | @Override protected void onMeasure( int widthMeasureSpec, int heightMeasureSpec )
42 | {
43 | ListAdapter p_LstAdapterPt = getAdapter();
44 | int p_Height = 0;
45 |
46 | if( p_LstAdapterPt != null )
47 | {
48 | for( int i = 0; i < p_LstAdapterPt.getCount(); i++ )
49 | {
50 | View listItem = p_LstAdapterPt.getView( i, null, this );
51 |
52 | listItem.measure( widthMeasureSpec, View.MeasureSpec.UNSPECIFIED );
53 | p_Height += listItem.getMeasuredHeight();
54 | }
55 |
56 | p_Height += ( getDividerHeight() * ( p_LstAdapterPt.getCount() ) );
57 | }
58 | if( p_Height < 148 ) p_Height = 148;
59 |
60 | heightMeasureSpec = MeasureSpec.makeMeasureSpec( p_Height, MeasureSpec.EXACTLY );
61 | super.onMeasure( widthMeasureSpec, heightMeasureSpec );
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Media/HTSurfaceView.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Media;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.os.Build;
6 | import android.support.annotation.RequiresApi;
7 | import android.util.AttributeSet;
8 | import android.view.SurfaceView;
9 | import android.view.View;
10 |
11 | //自定义SurfaceView,为了保持宽高比。
12 | public class HTSurfaceView extends SurfaceView
13 | {
14 | public float m_WidthToHeightRatio = 1.0f; //存放宽高比。
15 |
16 | public HTSurfaceView( Context context )
17 | {
18 | super( context );
19 | }
20 |
21 | public HTSurfaceView( Context context, AttributeSet attrs )
22 | {
23 | super( context, attrs );
24 | }
25 |
26 | public HTSurfaceView( Context context, AttributeSet attrs, int defStyleAttr )
27 | {
28 | super( context, attrs, defStyleAttr );
29 | }
30 |
31 | @RequiresApi( api = Build.VERSION_CODES.LOLLIPOP ) public HTSurfaceView( Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes )
32 | {
33 | super( context, attrs, defStyleAttr, defStyleRes );
34 | }
35 |
36 | //MeasureSpec值的高2位为测量模式,低30位为测量大小。widthMeasureSpec表示View宽度的测量模式和测量大小,heightMeasureSpec表示View高度的测量模式和测量大小。
37 | //测量模式包括:
38 | //View.MeasureSpec.AT_MOST: 这个子view你最大不能超过这个值。
39 | //View.MeasureSpec.UNSPECIFIED:这个子view你大小不确定,还得你自己用尺子给自己量一下,父view尽量给你所需的长度。
40 | //View.MeasureSpec.EXACTLY:这个子view你就是这么大了。*/
41 |
42 | @Override protected void onMeasure( int widthMeasureSpec, int heightMeasureSpec )
43 | {
44 | int width = MeasureSpec.getSize( widthMeasureSpec );
45 | float height = width / m_WidthToHeightRatio;
46 | heightMeasureSpec = MeasureSpec.makeMeasureSpec( ( int ) height, heightMeasureSpec );
47 | super.onMeasure( widthMeasureSpec, heightMeasureSpec );
48 | }
49 |
50 | //设置宽高比。
51 | public void SetWidthToHeightRatio( float WidthToHeightRatio )
52 | {
53 | if( WidthToHeightRatio != m_WidthToHeightRatio ) //如果指定的宽高比与当前的宽高比不一致。
54 | {
55 | m_WidthToHeightRatio = WidthToHeightRatio; //设置视频预览SurfaceView的宽高比。
56 |
57 | post( new Runnable() { @Override public void run() { setLayoutParams( getLayoutParams() ); } } ); //刷新SurfaceView的尺寸显示。
58 | }
59 | }
60 |
61 | //设置黑屏。
62 | public void SetBlack()
63 | {
64 | Context p_CtxPt = getContext();
65 |
66 | if( p_CtxPt instanceof Activity )
67 | {
68 | ( ( Activity )p_CtxPt ).runOnUiThread( new Runnable()
69 | {
70 | public void run()
71 | {
72 | setVisibility( View.GONE );
73 | setVisibility( View.VISIBLE );
74 | }
75 | } );
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Media/WaveFileReader.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Media;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //Wave文件读取器。
6 | public class WaveFileReader
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "MediaFile" ); //加载libMediaFile.so。
12 | }
13 |
14 | public long m_WaveFileReaderPt; //存放Wave文件读取器的指针。
15 |
16 | //构造函数。
17 | public WaveFileReader()
18 | {
19 | m_WaveFileReaderPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy();
26 | }
27 |
28 | //创建并初始化Wave文件读取器。
29 | public int Init( String WaveFileFullPathStrPt, HTInt NumChanlPt, HTInt SmplRatePt, HTInt SmplBitPt )
30 | {
31 | if( m_WaveFileReaderPt == 0 )
32 | {
33 | HTLong p_WaveFileReaderPt = new HTLong();
34 | if( WaveFileReaderInit( p_WaveFileReaderPt, WaveFileFullPathStrPt, NumChanlPt, SmplRatePt, SmplBitPt ) == 0 )
35 | {
36 | m_WaveFileReaderPt = p_WaveFileReaderPt.m_Val;
37 | return 0;
38 | }
39 | else
40 | {
41 | return -1;
42 | }
43 | }
44 | else
45 | {
46 | return 0;
47 | }
48 | }
49 |
50 | //用Wave文件读取器读取Short型数据。
51 | public int ReadShort( short DataPt[], long DataSz, HTLong DataLenPt )
52 | {
53 | return WaveFileReaderReadShort( m_WaveFileReaderPt, DataPt, DataSz, DataLenPt );
54 | }
55 |
56 | //销毁Wave文件读取器。
57 | public int Dstoy()
58 | {
59 | if( m_WaveFileReaderPt != 0 )
60 | {
61 | if( WaveFileReaderDstoy( m_WaveFileReaderPt ) == 0 )
62 | {
63 | m_WaveFileReaderPt = 0;
64 | return 0;
65 | }
66 | else
67 | {
68 | return -1;
69 | }
70 | }
71 | else
72 | {
73 | return 0;
74 | }
75 | }
76 |
77 | //创建并初始化Wave文件读取器。
78 | private native int WaveFileReaderInit( HTLong WaveFileReaderPt, String WaveFileFullPathStrPt, HTInt NumChanlPt, HTInt SmplRatePt, HTInt SmplBitPt );
79 |
80 | //用Wave文件读取器读取数据。
81 | private native int WaveFileReaderReadShort( long WaveFileReaderPt, short DataPt[], long DataSz, HTLong DataLenPt );
82 |
83 | //销毁Wave文件读取器。
84 | private native int WaveFileReaderDstoy( long WaveFileReaderPt );
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Media/WaveFileWriter.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Media;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //Wave文件写入器。
6 | public class WaveFileWriter
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "MediaFile" ); //加载libMediaFile.so。
12 | }
13 |
14 | public long m_WaveFileWriterPt; //存放Wave文件写入器的指针。
15 |
16 | //构造函数。
17 | public WaveFileWriter()
18 | {
19 | m_WaveFileWriterPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy();
26 | }
27 |
28 | //创建并初始化Wave文件写入器。
29 | public int Init( String WaveFileFullPathStrPt, long WaveFileWrBufSzByt, int NumChanl, int SmplRate, int SmplBit )
30 | {
31 | if( m_WaveFileWriterPt == 0 )
32 | {
33 | HTLong p_WaveFileWriterPt = new HTLong();
34 | if( WaveFileWriterInit( p_WaveFileWriterPt, WaveFileFullPathStrPt, WaveFileWrBufSzByt, NumChanl, SmplRate, SmplBit ) == 0 )
35 | {
36 | m_WaveFileWriterPt = p_WaveFileWriterPt.m_Val;
37 | return 0;
38 | }
39 | else
40 | {
41 | return -1;
42 | }
43 | }
44 | else
45 | {
46 | return 0;
47 | }
48 | }
49 |
50 | //用Wave文件写入器写入Short型数据。
51 | public int WriteShort( short DataPt[], long DataLen )
52 | {
53 | return WaveFileWriterWriteShort( m_WaveFileWriterPt, DataPt, DataLen );
54 | }
55 |
56 | //销毁Wave文件写入器。
57 | public int Dstoy()
58 | {
59 | if( m_WaveFileWriterPt != 0 )
60 | {
61 | if( WaveFileWriterDstoy( m_WaveFileWriterPt ) == 0 )
62 | {
63 | m_WaveFileWriterPt = 0;
64 | return 0;
65 | }
66 | else
67 | {
68 | return -1;
69 | }
70 | }
71 | else
72 | {
73 | return 0;
74 | }
75 | }
76 |
77 | //创建并初始化Wave文件写入器。
78 | private native int WaveFileWriterInit( HTLong WaveFileWriterPt, String WaveFileFullPathStrPt, long WaveFileWrBufSzByt, int NumChanl, int SmplRate, int SmplBit );
79 |
80 | //用Wave文件写入器写入数据。
81 | private native int WaveFileWriterWriteShort( long WaveFileWriterPt, short DataPt[], long DataLen );
82 |
83 | //销毁Wave文件写入器。
84 | private native int WaveFileWriterDstoy( long WaveFileWriterPt );
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Sokt/TcpSrvrSokt.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Sokt;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //本端TCP协议服务端套接字。
6 | public class TcpSrvrSokt
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "DataStruct" ); //加载libDataStruct.so。
12 | System.loadLibrary( "Sokt" ); //加载libSokt.so。
13 | }
14 |
15 | public long m_TcpSrvrSoktPt; //存放本端TCP协议服务端套接字的指针。
16 |
17 | //构造函数。
18 | public TcpSrvrSokt()
19 | {
20 | m_TcpSrvrSoktPt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy( null );
27 | }
28 |
29 | //创建并初始化本端TCP协议服务端套接字。
30 | public int Init( int LclNodeAddrFmly, String LclNodeNamePt, String LclNodeSrvcPt, int MaxWait, int IsReuseAddr, short TcpClntSoktNtwkTmotMsec, Vstr ErrInfoVstrPt )
31 | {
32 | if( m_TcpSrvrSoktPt == 0 )
33 | {
34 | HTLong p_TcpSrvrSoktPt = new HTLong();
35 | if( TcpSrvrInit( p_TcpSrvrSoktPt, LclNodeAddrFmly, LclNodeNamePt, LclNodeSrvcPt, MaxWait, IsReuseAddr, TcpClntSoktNtwkTmotMsec, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
36 | {
37 | m_TcpSrvrSoktPt = p_TcpSrvrSoktPt.m_Val;
38 | return 0;
39 | }
40 | else
41 | {
42 | return -1;
43 | }
44 | }
45 | else
46 | {
47 | return 0;
48 | }
49 | }
50 | //关闭并销毁本端TCP协议服务端套接字。
51 | public int Dstoy( Vstr ErrInfoVstrPt )
52 | {
53 | if( m_TcpSrvrSoktPt != 0 )
54 | {
55 | if( TcpSrvrDstoy( m_TcpSrvrSoktPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
56 | {
57 | m_TcpSrvrSoktPt = 0;
58 | return 0;
59 | }
60 | else
61 | {
62 | return -1;
63 | }
64 | }
65 | else
66 | {
67 | return 0;
68 | }
69 | }
70 |
71 | //本端TCP协议服务端套接字的互斥锁加锁。
72 | public int Locked( Vstr ErrInfoVstrPt )
73 | {
74 | return TcpSrvrLocked( m_TcpSrvrSoktPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
75 | }
76 | //本端TCP协议服务端套接字的互斥锁解锁。
77 | public int Unlock( Vstr ErrInfoVstrPt )
78 | {
79 | return TcpSrvrUnlock( m_TcpSrvrSoktPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
80 | }
81 |
82 | //获取本端TCP协议服务端套接字绑定的本端节点地址和端口。
83 | public int GetLclAddr( HTInt LclNodeAddrFmlyPt, HTString LclNodeAddrPt, HTString LclNodePortPt, int IsAutoLock, Vstr ErrInfoVstrPt )
84 | {
85 | return TcpSrvrGetLclAddr( m_TcpSrvrSoktPt, LclNodeAddrFmlyPt, LclNodeAddrPt, LclNodePortPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
86 | }
87 |
88 | //用本端TCP协议服务端套接字接受远端TCP协议客户端套接字的连接。
89 | public int Acpt( TcpClntSokt TcpClntSoktPt, HTInt RmtNodeAddrFmlyPt, HTString RmtNodeAddrPt, HTString RmtNodePortPt, short TmotMsec, int IsAutoLock, Vstr ErrInfoVstrPt )
90 | {
91 | return TcpSrvrAcpt( m_TcpSrvrSoktPt, TcpClntSoktPt, RmtNodeAddrFmlyPt, RmtNodeAddrPt, RmtNodePortPt, TmotMsec, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
92 | }
93 |
94 | //创建并初始化本端TCP协议服务端套接字。
95 | private native int TcpSrvrInit( HTLong TcpSrvrSoktPt, int LclNodeAddrFmly, String LclNodeNamePt, String LclNodeSrvcPt, int MaxWait, int IsReuseAddr, short TcpClntSoktNtwkTmotMsec, long ErrInfoVstrPt );
96 | //关闭并销毁本端TCP协议服务端套接字。
97 | private native int TcpSrvrDstoy( long TcpSrvrSoktPt, long ErrInfoVstrPt );
98 |
99 | //本端TCP协议服务端套接字的互斥锁加锁。
100 | private native int TcpSrvrLocked( long TcpSrvrSoktPt, long ErrInfoVstrPt );
101 | //本端TCP协议服务端套接字的互斥锁解锁。
102 | private native int TcpSrvrUnlock( long TcpSrvrSoktPt, long ErrInfoVstrPt );
103 |
104 | //获取本端TCP协议服务端套接字绑定的本端节点地址和端口。
105 | private native int TcpSrvrGetLclAddr( long TcpSrvrSoktPt, HTInt LclNodeAddrFmlyPt, HTString LclNodeAddrPt, HTString LclNodePortPt, int IsAutoLock, long ErrInfoVstrPt );
106 |
107 | //用本端TCP协议服务端套接字接受远端TCP协议客户端套接字的连接。
108 | private native int TcpSrvrAcpt( long TcpSrvrSoktPt, TcpClntSokt TcpClntSoktPt, HTInt RmtNodeAddrFmlyPt, HTString RmtNodeAddrPt, HTString RmtNodePortPt, short TmotMsec, int IsAutoLock, long ErrInfoVstrPt );
109 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/TinyXml2/XMLDocument.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.TinyXml2;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | public class XMLDocument
6 | {
7 | static
8 | {
9 | System.loadLibrary( "Func" ); //加载libFunc.so。
10 | System.loadLibrary( "MediaFile" ); //加载libMediaFile.so。
11 | }
12 |
13 | public long m_XMLDocumentPt; //存放XMLDocument指针。
14 |
15 | //构造函数。
16 | public XMLDocument()
17 | {
18 | m_XMLDocumentPt = 0;
19 | }
20 |
21 | //析构函数。
22 | protected void finalize()
23 | {
24 | Dstoy();
25 | }
26 |
27 | public int Init()
28 | {
29 | if( m_XMLDocumentPt == 0 )
30 | {
31 | HTLong p_XMLDocumentPt = new HTLong();
32 | if( XMLDocumentInit( p_XMLDocumentPt ) == 0 )
33 | {
34 | m_XMLDocumentPt = p_XMLDocumentPt.m_Val;
35 | return 0;
36 | }
37 | else
38 | {
39 | return -1;
40 | }
41 | }
42 | else
43 | {
44 | return 0;
45 | }
46 | }
47 |
48 | public int NewElement( XMLElement XMLNewElementPt, String NamePt )
49 | {
50 | return XMLDocumentNewElement( m_XMLDocumentPt, XMLNewElementPt, NamePt );
51 | }
52 |
53 | public int InsertEndChild( XMLElement XMLChildElementPt )
54 | {
55 | return XMLDocumentInsertEndChild( m_XMLDocumentPt, ( XMLChildElementPt != null ) ? XMLChildElementPt.m_XMLElementPt : 0 );
56 | }
57 |
58 | public int FirstChildElement( XMLElement XMLFirstChildElementPt )
59 | {
60 | return XMLDocumentFirstChildElement( m_XMLDocumentPt, XMLFirstChildElementPt );
61 | }
62 |
63 | public int SaveFile( String FileFullNamePt )
64 | {
65 | return XMLDocumentSaveFile( m_XMLDocumentPt, FileFullNamePt );
66 | }
67 |
68 | public int LoadFile( String FileFullNamePt )
69 | {
70 | return XMLDocumentLoadFile( m_XMLDocumentPt, FileFullNamePt );
71 | }
72 |
73 | public int Dstoy()
74 | {
75 | if( m_XMLDocumentPt != 0 )
76 | {
77 | if( XMLDocumentDstoy( m_XMLDocumentPt ) == 0 )
78 | {
79 | m_XMLDocumentPt = 0;
80 | return 0;
81 | }
82 | else
83 | {
84 | return -1;
85 | }
86 | }
87 | else
88 | {
89 | return 0;
90 | }
91 | }
92 |
93 | private native int XMLDocumentInit( HTLong XMLDocumentPt );
94 |
95 | private native int XMLDocumentNewElement( long XMLDocumentPt, XMLElement XMLNewElementPt, String NamePt );
96 |
97 | private native int XMLDocumentInsertEndChild( long XMLDocumentPt, long XMLChildElementPt );
98 |
99 | private native int XMLDocumentFirstChildElement( long XMLDocumentPt, XMLElement XMLFirstChildElementPt );
100 |
101 | private native int XMLDocumentSaveFile( long XMLDocumentPt, String FileFullNamePt );
102 |
103 | private native int XMLDocumentLoadFile( long XMLDocumentPt, String FileFullNamePt );
104 |
105 | private native int XMLDocumentDstoy( long XMLDocumentPt );
106 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/TinyXml2/XMLElement.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.TinyXml2;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | public class XMLElement
6 | {
7 | static
8 | {
9 | System.loadLibrary( "Func" ); //加载libFunc.so。
10 | System.loadLibrary( "MediaFile" ); //加载libMediaFile.so。
11 | }
12 |
13 | public long m_XMLElementPt; //存放XMLElement指针。
14 |
15 | //构造函数。
16 | public XMLElement()
17 | {
18 | m_XMLElementPt = 0;
19 | }
20 |
21 | //析构函数。
22 | protected void finalize()
23 | {
24 | m_XMLElementPt = 0;
25 | }
26 |
27 | public int Name( HTString NamePt )
28 | {
29 | return XMLElementName( m_XMLElementPt, NamePt );
30 | }
31 |
32 | public int SetText( String TextPt )
33 | {
34 | return XMLElementSetText( m_XMLElementPt, TextPt );
35 | }
36 |
37 | public int GetText( HTString TextPt )
38 | {
39 | return XMLElementGetText( m_XMLElementPt, TextPt );
40 | }
41 |
42 | public int InsertEndChild( XMLElement XMLChildElementPt )
43 | {
44 | return XMLElementInsertEndChild( m_XMLElementPt, ( XMLChildElementPt != null ) ? XMLChildElementPt.m_XMLElementPt : 0 );
45 | }
46 |
47 | public int NextSiblingElement( XMLElement XMLNextSiblingElementPt )
48 | {
49 | return XMLElementNextSiblingElement( m_XMLElementPt, XMLNextSiblingElementPt );
50 | }
51 |
52 | public int FirstChildElement( XMLElement XMLFirstChildElementPt )
53 | {
54 | return XMLElementFirstChildElement( m_XMLElementPt, XMLFirstChildElementPt );
55 | }
56 |
57 | private native int XMLElementName( long XMLElementPt, HTString NamePt );
58 |
59 | private native int XMLElementSetText( long XMLElementPt, String TextPt );
60 |
61 | private native int XMLElementGetText( long XMLElementPt, HTString TextPt );
62 |
63 | private native int XMLElementInsertEndChild( long XMLElementPt, long XMLChildElementPt );
64 |
65 | private native int XMLElementNextSiblingElement( long XMLElementPt, XMLElement XMLNextSiblingElementPt );
66 |
67 | private native int XMLElementFirstChildElement( long XMLElementPt, XMLElement XMLFirstChildElementPt );
68 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Vdo/OpenH264Decd.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Vdo;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //OpenH264解码器。
6 | public class OpenH264Decd
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "OpenH264" ); //加载libOpenH264.so。
12 | }
13 |
14 | public long m_OpenH264DecdPt; //存放OpenH264解码器的指针。
15 |
16 | //构造函数。
17 | public OpenH264Decd()
18 | {
19 | m_OpenH264DecdPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy( null );
26 | }
27 |
28 | //OpenH264解码器获取应用程序限制信息。
29 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
30 | {
31 | return OpenH264DecdGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
32 | }
33 |
34 | //创建并初始化OpenH264解码器。
35 | public int Init( byte LicnCodePt[], int DecdThrdNum, Vstr ErrInfoVstrPt )
36 | {
37 | if( m_OpenH264DecdPt == 0 )
38 | {
39 | HTLong p_OpenH264DecdPt = new HTLong();
40 | if( OpenH264DecdInit( LicnCodePt, p_OpenH264DecdPt, DecdThrdNum, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
41 | {
42 | m_OpenH264DecdPt = p_OpenH264DecdPt.m_Val;
43 | return 0;
44 | }
45 | else
46 | {
47 | return -1;
48 | }
49 | }
50 | else
51 | {
52 | return 0;
53 | }
54 | }
55 |
56 | //用OpenH264解码器对H264格式进行8位无符号整型Yu12格式帧解码。
57 | public int Pocs( byte H264FrmPt[], long H264FrmLen,
58 | byte Yu12FrmPt[], long Yu12FrmSz, HTInt Yu12FrmWidth, HTInt Yu12FrmHeight,
59 | Vstr ErrInfoVstrPt )
60 | {
61 | return OpenH264DecdPocs( m_OpenH264DecdPt,
62 | H264FrmPt, H264FrmLen,
63 | Yu12FrmPt, Yu12FrmSz, Yu12FrmWidth, Yu12FrmHeight,
64 | ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
65 | }
66 |
67 | //销毁OpenH264解码器。
68 | public int Dstoy( Vstr ErrInfoVstrPt )
69 | {
70 | if( m_OpenH264DecdPt != 0 )
71 | {
72 | if( OpenH264DecdDstoy( m_OpenH264DecdPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
73 | {
74 | m_OpenH264DecdPt = 0;
75 | return 0;
76 | }
77 | else
78 | {
79 | return -1;
80 | }
81 | }
82 | else
83 | {
84 | return 0;
85 | }
86 | }
87 |
88 | //OpenH264解码器获取应用程序限制信息。
89 | private static native int OpenH264DecdGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
90 |
91 | //创建并初始化OpenH264解码器。
92 | private native int OpenH264DecdInit( byte LicnCodePt[], HTLong OpenH264DecdPt, int DecdThrdNum, long ErrInfoVstrPt );
93 |
94 | //用OpenH264解码器对H264格式进行8位无符号整型Yu12格式帧解码。
95 | private native int OpenH264DecdPocs( long OpenH264DecdPt,
96 | byte H264FrmPt[], long H264FrmLen,
97 | byte Yu12FrmPt[], long Yu12FrmSz, HTInt Yu12FrmWidth, HTInt Yu12FrmHeight,
98 | long ErrInfoVstrPt );
99 |
100 | //销毁OpenH264解码器。
101 | private native int OpenH264DecdDstoy( long OpenH264DecdPt, long ErrInfoVstrPt );
102 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Vdo/OpenH264Encd.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Vdo;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //OpenH264编码器。
6 | public class OpenH264Encd
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "OpenH264" ); //加载libOpenH264.so。
12 | }
13 |
14 | public long m_OpenH264EncdPt; //存放OpenH264编码器的指针。
15 |
16 | //构造函数。
17 | public OpenH264Encd()
18 | {
19 | m_OpenH264EncdPt = 0;
20 | }
21 |
22 | //析构函数。
23 | protected void finalize()
24 | {
25 | Dstoy( null );
26 | }
27 |
28 | //OpenH264编码器获取应用程序限制信息。
29 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
30 | {
31 | return OpenH264EncdGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
32 | }
33 |
34 | //创建并初始化OpenH264编码器。
35 | public int Init( byte LicnCodePt[], int EncdPictrWidth, int EncdPictrHeight, int VdoType, int EncdBitrate, int BitrateCtrlMode, int MaxFrmRate, int IDRFrmIntvlFrmCnt, int Complexity, Vstr ErrInfoVstrPt )
36 | {
37 | if( m_OpenH264EncdPt == 0 )
38 | {
39 | HTLong p_OpenH264EncdPt = new HTLong();
40 | if( OpenH264EncdInit( LicnCodePt, p_OpenH264EncdPt, EncdPictrWidth, EncdPictrHeight, VdoType, EncdBitrate, BitrateCtrlMode, MaxFrmRate, IDRFrmIntvlFrmCnt, Complexity, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
41 | {
42 | m_OpenH264EncdPt = p_OpenH264EncdPt.m_Val;
43 | return 0;
44 | }
45 | else
46 | {
47 | return -1;
48 | }
49 | }
50 | else
51 | {
52 | return 0;
53 | }
54 | }
55 |
56 | //设置OpenH264编码器的编码后比特率。
57 | public int SetEncdBitrate( int EncdBitrate, Vstr ErrInfoVstrPt )
58 | {
59 | return OpenH264EncdSetEncdBitrate( m_OpenH264EncdPt, EncdBitrate, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
60 | }
61 |
62 | //获取OpenH264编码器的编码后比特率。
63 | public int GetEncdBitrate( HTInt EncdBitratePt, Vstr ErrInfoVstrPt )
64 | {
65 | return OpenH264EncdGetEncdBitrate( m_OpenH264EncdPt, EncdBitratePt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
66 | }
67 |
68 | //用OpenH264编码器对8位无符号整型Yu12格式帧进行H264格式编码。
69 | public int Pocs( byte Yu12FrmPt[], int Yu12FrmWidth, int Yu12FrmHeight, long Yu12FrmTimeStampMsec,
70 | byte H264FrmPt[], long H264FrmSz, HTLong H264FrmLenPt,
71 | Vstr ErrInfoVstrPt )
72 | {
73 | return OpenH264EncdPocs( m_OpenH264EncdPt,
74 | Yu12FrmPt, Yu12FrmWidth, Yu12FrmHeight, Yu12FrmTimeStampMsec,
75 | H264FrmPt, H264FrmSz, H264FrmLenPt,
76 | ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
77 | }
78 |
79 | //销毁OpenH264编码器。
80 | public int Dstoy( Vstr ErrInfoVstrPt )
81 | {
82 | if( m_OpenH264EncdPt != 0 )
83 | {
84 | if( OpenH264EncdDstoy( m_OpenH264EncdPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
85 | {
86 | m_OpenH264EncdPt = 0;
87 | return 0;
88 | }
89 | else
90 | {
91 | return -1;
92 | }
93 | }
94 | else
95 | {
96 | return 0;
97 | }
98 | }
99 |
100 | //OpenH264编码器获取应用程序限制信息。
101 | private static native int OpenH264EncdGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
102 |
103 | //创建并初始化OpenH264编码器。
104 | private native int OpenH264EncdInit( byte LicnCodePt[], HTLong OpenH264EncdPt, int EncdPictrWidth, int EncdPictrHeight, int VdoType, int EncdBitrate, int BitrateCtrlMode, int MaxFrmRate, int IDRFrmIntvlFrmCnt, int Cmplxt, long ErrInfoVstrPt );
105 |
106 | //设置OpenH264编码器的编码后比特率。
107 | private native int OpenH264EncdSetEncdBitrate( long OpenH264EncdPt, int EncdBitrate, long ErrInfoVstrPt );
108 |
109 | //获取OpenH264编码器的编码后比特率。
110 | private native int OpenH264EncdGetEncdBitrate( long OpenH264EncdPt, HTInt EncdBitratePt, long ErrInfoVstrPt );
111 |
112 | //用OpenH264编码器对8位无符号整型Yu12格式帧进行H264格式编码。
113 | private native int OpenH264EncdPocs( long OpenH264EncdPt,
114 | byte Yu12FrmPt[], int Yu12FrmWidth, int Yu12FrmHeight, long Yu12FrmTimeStampMsec,
115 | byte H264FrmPt[], long H264FrmSz, HTLong H264FrmLenPt,
116 | long ErrInfoVstrPt );
117 |
118 | //销毁OpenH264编码器。
119 | private native int OpenH264EncdDstoy( long OpenH264EncdPt, long ErrInfoVstrPt );
120 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Vdo/SystemH264Decd.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Vdo;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //系统自带H264编码器。
6 | public class SystemH264Decd
7 | {
8 | static
9 | {
10 | if( android.os.Build.VERSION.SDK_INT >= 21 )
11 | {
12 | System.loadLibrary( "Func" ); //加载libFunc.so。
13 | System.loadLibrary( "SystemH264" ); //加载libSystemH264.so。
14 | }
15 | }
16 |
17 | public long m_SystemH264DecdPt; //存放系统自带H264解码器的指针。
18 |
19 | //构造函数。
20 | public SystemH264Decd()
21 | {
22 | m_SystemH264DecdPt = 0;
23 | }
24 |
25 | //析构函数。
26 | protected void finalize()
27 | {
28 | Dstoy( null );
29 | }
30 |
31 | //系统自带H264解码器获取应用程序限制信息。
32 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
33 | {
34 | return SystemH264DecdGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
35 | }
36 |
37 | //创建并初始化系统自带H264解码器。
38 | public int Init( byte LicnCodePt[], Vstr ErrInfoVstrPt )
39 | {
40 | if( m_SystemH264DecdPt == 0 )
41 | {
42 | if( android.os.Build.VERSION.SDK_INT < 21 )
43 | {
44 | if( ErrInfoVstrPt != null ) ErrInfoVstrPt.Cpy( "当前系统不自带H264编码器。" );
45 | return -1;
46 | }
47 |
48 | HTLong p_SystemH264DecdPt = new HTLong();
49 | if( SystemH264DecdInit( LicnCodePt, p_SystemH264DecdPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
50 | {
51 | m_SystemH264DecdPt = p_SystemH264DecdPt.m_Val;
52 | return 0;
53 | }
54 | else
55 | {
56 | return -1;
57 | }
58 | }
59 | else
60 | {
61 | return 0;
62 | }
63 | }
64 |
65 | //用系统自带H264解码器对H264格式进行8位无符号整型Yu12格式帧解码。
66 | public int Pocs( byte H264FrmPt[], long H264FrmLen, byte Yu12FrmPt[], long Yu12FrmSz, HTInt Yu12FrmWidth, HTInt Yu12FrmHeight, long TimeOutMsec, Vstr ErrInfoVstrPt )
67 | {
68 | return SystemH264DecdPocs( m_SystemH264DecdPt, H264FrmPt, H264FrmLen, Yu12FrmPt, Yu12FrmSz, Yu12FrmWidth, Yu12FrmHeight, TimeOutMsec, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
69 | }
70 |
71 | //销毁系统自带H264解码器。
72 | public int Dstoy( Vstr ErrInfoVstrPt )
73 | {
74 | if( m_SystemH264DecdPt != 0 )
75 | {
76 | if( SystemH264DecdDstoy( m_SystemH264DecdPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
77 | {
78 | m_SystemH264DecdPt = 0;
79 | return 0;
80 | }
81 | else
82 | {
83 | return -1;
84 | }
85 | }
86 | else
87 | {
88 | return 0;
89 | }
90 | }
91 |
92 | //系统自带H264解码器获取应用程序限制信息。
93 | private static native int SystemH264DecdGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
94 |
95 | //创建并初始化系统自带H264解码器。
96 | private native int SystemH264DecdInit( byte LicnCodePt[], HTLong SystemH264DecdPt, long ErrInfoVstrPt );
97 |
98 | //用系统自带H264解码器对H264格式进行8位无符号整型Yu12格式帧解码。
99 | private native int SystemH264DecdPocs( long SystemH264DecdPt, byte H264FrmPt[], long H264FrmLen, byte Yu12FrmPt[], long Yu12FrmSz, HTInt Yu12FrmWidth, HTInt Yu12FrmHeight, long TimeOutMsec, long ErrInfoVstrPt );
100 |
101 | //销毁系统自带H264解码器。
102 | private native int SystemH264DecdDstoy( long SystemH264DecdPt, long ErrInfoVstrPt );
103 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Vdo/SystemH264Encd.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Vdo;
2 |
3 | import HeavenTao.Data.HTLong;
4 | import HeavenTao.Data.Vstr;
5 |
6 | //系统自带H264编码器。
7 | public class SystemH264Encd
8 | {
9 | static
10 | {
11 | if( android.os.Build.VERSION.SDK_INT >= 21 )
12 | {
13 | System.loadLibrary( "Func" ); //加载libFunc.so。
14 | System.loadLibrary( "SystemH264" ); //加载libSystemH264.so。
15 | }
16 | }
17 |
18 | public long m_SystemH264EncdPt; //存放系统自带H264编码器的指针。
19 |
20 | //构造函数。
21 | public SystemH264Encd()
22 | {
23 | m_SystemH264EncdPt = 0;
24 | }
25 |
26 | //析构函数。
27 | protected void finalize()
28 | {
29 | Dstoy( null );
30 | }
31 |
32 | //系统自带H264编码器获取应用程序限制信息。
33 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
34 | {
35 | return SystemH264EncdGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
36 | }
37 |
38 | //创建并初始化系统自带H264编码器。
39 | public int Init( byte LicnCodePt[], int Yu12FrmWidth, int Yu12FrmHeight, int EncdBitrate, int BitrateCtrlMode, int MaxFrmRate, int IDRFrmIntvlTimeSec, int Complexity, Vstr ErrInfoVstrPt )
40 | {
41 | if( m_SystemH264EncdPt == 0 )
42 | {
43 | if( android.os.Build.VERSION.SDK_INT < 21 )
44 | {
45 | ErrInfoVstrPt.Cpy( "当前系统不自带H264编码器。" );
46 | return -1;
47 | }
48 |
49 | HTLong p_SystemH264EncdPt = new HTLong();
50 | if( SystemH264EncdInit( LicnCodePt, p_SystemH264EncdPt, Yu12FrmWidth, Yu12FrmHeight, EncdBitrate, BitrateCtrlMode, MaxFrmRate, IDRFrmIntvlTimeSec, Complexity, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
51 | {
52 | m_SystemH264EncdPt = p_SystemH264EncdPt.m_Val;
53 | return 0;
54 | }
55 | else
56 | {
57 | return -1;
58 | }
59 | }
60 | else
61 | {
62 | return 0;
63 | }
64 | }
65 |
66 | //用系统自带H264编码器对8位无符号整型Yu12格式帧进行H264格式编码。
67 | public int Pocs( byte Yu12FrmPt[], long Yu12FrmTimeStampMsec, byte H264FrmPt[], long H264FrmSz, HTLong H264FrmLenPt, long TimeOutMsec, Vstr ErrInfoVstrPt )
68 | {
69 | return SystemH264EncdPocs( m_SystemH264EncdPt, Yu12FrmPt, Yu12FrmTimeStampMsec, H264FrmPt, H264FrmSz, H264FrmLenPt, TimeOutMsec, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
70 | }
71 |
72 | //销毁系统自带H264编码器。
73 | public int Dstoy( Vstr ErrInfoVstrPt )
74 | {
75 | if( m_SystemH264EncdPt != 0 )
76 | {
77 | if( SystemH264EncdDstoy( m_SystemH264EncdPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
78 | {
79 | m_SystemH264EncdPt = 0;
80 | return 0;
81 | }
82 | else
83 | {
84 | return -1;
85 | }
86 | }
87 | else
88 | {
89 | return 0;
90 | }
91 | }
92 |
93 | //系统自带H264编码器获取应用程序限制信息。
94 | private static native int SystemH264EncdGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
95 |
96 | //创建并初始化系统自带H264编码器。
97 | private native int SystemH264EncdInit( byte LicnCodePt[], HTLong SystemH264EncdPt, int Yu12FrmWidth, int Yu12FrmHeight, int EncdBitrate, int BitrateCtrlMode, int MaxFrmRate, int IDRFrmIntvlTimeSec, int Cmplxt, long ErrInfoVstrPt );
98 |
99 | //用系统自带H264编码器对8位无符号整型Yu12格式帧进行H264格式编码。
100 | private native int SystemH264EncdPocs( long SystemH264EncdPt, byte Yu12FrmPt[], long Yu12FrmTimeStampMsec, byte H264FrmPt[], long H264FrmSz, HTLong H264FrmLenPt, long TimeOutMsec, long ErrInfoVstrPt );
101 |
102 | //销毁系统自带H264编码器。
103 | private native int SystemH264EncdDstoy( long SystemH264EncdPt, long ErrInfoVstrPt );
104 | }
--------------------------------------------------------------------------------
/app/src/main/java/HeavenTao/Vdo/VAjb.java:
--------------------------------------------------------------------------------
1 | package HeavenTao.Vdo;
2 |
3 | import HeavenTao.Data.*;
4 |
5 | //视频自适应抖动缓冲器。
6 | public class VAjb
7 | {
8 | static
9 | {
10 | System.loadLibrary( "Func" ); //加载libFunc.so。
11 | System.loadLibrary( "c++_shared" ); //加载libc++_shared.so。
12 | System.loadLibrary( "Ajb" ); //加载libAjb.so。
13 | }
14 |
15 | public long m_VAjbPt; //存放视频自适应抖动缓冲器的指针。
16 |
17 | //构造函数。
18 | public VAjb()
19 | {
20 | m_VAjbPt = 0;
21 | }
22 |
23 | //析构函数。
24 | protected void finalize()
25 | {
26 | Dstoy( null );
27 | }
28 |
29 | //视频自适应抖动缓冲器获取应用程序限制信息。
30 | public static int GetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, Vstr ErrInfoVstrPt )
31 | {
32 | return VAjbGetAppLmtInfo( LicnCodePt, LmtTimeSecPt, RmnTimeSecPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
33 | }
34 |
35 | //创建并初始化视频自适应抖动缓冲器。
36 | public int Init( byte LicnCodePt[], int IsHaveTimeStamp, int MinNeedBufFrmCnt, int MaxNeedBufFrmCnt, float AdaptSensitivity, Vstr ErrInfoVstrPt )
37 | {
38 | if( m_VAjbPt == 0 )
39 | {
40 | HTLong p_VAjbPt = new HTLong();
41 | if( VAjbInit( LicnCodePt, p_VAjbPt, IsHaveTimeStamp, MinNeedBufFrmCnt, MaxNeedBufFrmCnt, AdaptSensitivity, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
42 | {
43 | m_VAjbPt = p_VAjbPt.m_Val;
44 | return 0;
45 | }
46 | else
47 | {
48 | return -1;
49 | }
50 | }
51 | else
52 | {
53 | return 0;
54 | }
55 | }
56 |
57 | //放入字节型帧到视频自适应抖动缓冲器。
58 | public int PutByteFrm( long CurTime, int TimeStamp, byte ByteFrmPt[], long FrmStart, long FrmLen, int IsAutoLock, Vstr ErrInfoVstrPt )
59 | {
60 | return VAjbPutByteFrm( m_VAjbPt, CurTime, TimeStamp, ByteFrmPt, FrmStart, FrmLen, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
61 | }
62 |
63 | //放入短整型帧到视频自适应抖动缓冲器。
64 | public int PutShortFrm( long CurTime, int TimeStamp, short ShortFrmPt[], long FrmStart, long FrmLen, int IsAutoLock, Vstr ErrInfoVstrPt )
65 | {
66 | return VAjbPutShortFrm( m_VAjbPt, CurTime, TimeStamp, ShortFrmPt, FrmStart, FrmLen, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
67 | }
68 |
69 | //从视频自适应抖动缓冲器取出字节型帧。
70 | public int GetByteFrm( long CurTime, HTInt TimeStampPt, byte ByteFrmPt[], long FrmStart, long FrmStartSzByt, HTLong FrmLenBytPt, int IsAutoLock, Vstr ErrInfoVstrPt )
71 | {
72 | return VAjbGetByteFrm( m_VAjbPt, CurTime, TimeStampPt, ByteFrmPt, FrmStart, FrmStartSzByt, FrmLenBytPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
73 | }
74 |
75 | //从视频自适应抖动缓冲器取出短整型帧。
76 | public int GetShortFrm( long CurTime, HTInt TimeStampPt, short ShortFrmPt[], long FrmStart, long FrmStartSzTwoByt, HTLong FrmLenTwoBytPt, int IsAutoLock, Vstr ErrInfoVstrPt )
77 | {
78 | return VAjbGetShortFrm( m_VAjbPt, CurTime, TimeStampPt, ShortFrmPt, FrmStart, FrmStartSzTwoByt, FrmLenTwoBytPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
79 | }
80 |
81 | //获取缓冲帧的数量。
82 | public int GetBufFrmCnt( HTInt CurHaveBufFrmCntPt, HTInt MinNeedBufFrmCntPt, HTInt MaxNeedBufFrmCntPt, HTInt CurNeedBufFrmCntPt, int IsAutoLock, Vstr ErrInfoVstrPt )
83 | {
84 | return VAjbGetBufFrmCnt( m_VAjbPt, CurHaveBufFrmCntPt, MinNeedBufFrmCntPt, MaxNeedBufFrmCntPt, CurNeedBufFrmCntPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
85 | }
86 |
87 | //清空视频自适应抖动缓冲器。
88 | public int Clear( int IsAutoLock, Vstr ErrInfoVstrPt)
89 | {
90 | return VAjbClear( m_VAjbPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
91 | }
92 |
93 | //清空并重置视频自适应抖动缓冲器。
94 | public int Reset( int IsAutoLock, Vstr ErrInfoVstrPt)
95 | {
96 | return VAjbReset( m_VAjbPt, IsAutoLock, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 );
97 | }
98 |
99 | //销毁视频自适应抖动缓冲器。
100 | public int Dstoy( Vstr ErrInfoVstrPt)
101 | {
102 | if( m_VAjbPt != 0 )
103 | {
104 | if( VAjbDstoy( m_VAjbPt, ( ErrInfoVstrPt != null ) ? ErrInfoVstrPt.m_VstrPt : 0 ) == 0 )
105 | {
106 | m_VAjbPt = 0;
107 | return 0;
108 | }
109 | else
110 | {
111 | return -1;
112 | }
113 | }
114 | else
115 | {
116 | return 0;
117 | }
118 | }
119 |
120 | //视频自适应抖动缓冲器获取应用程序限制信息。
121 | private static native int VAjbGetAppLmtInfo( byte LicnCodePt[], HTLong LmtTimeSecPt, HTLong RmnTimeSecPt, long ErrInfoVstrPt );
122 |
123 | //创建并初始化视频自适应抖动缓冲器。
124 | private native int VAjbInit( byte LicnCodePt[], HTLong VAjbPt, int IsHaveTimeStamp, int MinNeedBufFrmCnt, int MaxNeedBufFrmCnt, float AdaptSensitivity, long ErrInfoVstrPt );
125 |
126 | //放入字节型帧到视频自适应抖动缓冲器。
127 | private native int VAjbPutByteFrm( long VAjbPt, long CurTime, int TimeStamp, byte ByteFrmPt[], long FrmStart, long FrmLenByt, int IsAutoLock, long ErrInfoVstrPt );
128 |
129 | //放入短整型帧到视频自适应抖动缓冲器。
130 | private native int VAjbPutShortFrm( long VAjbPt, long CurTime, int TimeStamp, short ShortFrmPt[], long FrmStart, long FrmLenTwoByt, int IsAutoLock, long ErrInfoVstrPt );
131 |
132 | //从视频自适应抖动缓冲器取出字节型帧。
133 | private native int VAjbGetByteFrm( long VAjbPt, long CurTime, HTInt TimeStampPt, byte ByteFrmPt[], long FrmStart, long FrmStartBytSz, HTLong FrmLenBytPt, int IsAutoLock, long ErrInfoVstrPt );
134 |
135 | //从视频自适应抖动缓冲器取出短整型帧。
136 | private native int VAjbGetShortFrm( long VAjbPt, long CurTime, HTInt TimeStampPt, short ShortFrmPt[], long FrmStart, long FrmStartTwoBytSz, HTLong FrmLenTwoBytPt, int IsAutoLock, long ErrInfoVstrPt );
137 |
138 | //获取缓冲帧的数量。
139 | private native int VAjbGetBufFrmCnt( long VAjbPt, HTInt CurHaveBufFrmCntPt, HTInt MinNeedBufFrmCntPt, HTInt MaxNeedBufFrmCntPt, HTInt CurNeedBufFrmCntPt, int IsAutoLock, long ErrInfoVstrPt );
140 |
141 | //清空视频自适应抖动缓冲器。
142 | private native int VAjbClear( long VAjbPt, int IsAutoLock, long ErrInfoVstrPt );
143 |
144 | //清空并重置视频自适应抖动缓冲器。
145 | private native int VAjbReset( long VAjbPt, int IsAutoLock, long ErrInfoVstrPt );
146 |
147 | //销毁视频自适应抖动缓冲器。
148 | private native int VAjbDstoy( long VAjbPt, long ErrInfoVstrPt );
149 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/andrd_ado_vdo_tkbk_demo/FrgndSrvc.java:
--------------------------------------------------------------------------------
1 | package com.example.andrd_ado_vdo_tkbk_demo;
2 |
3 | import android.app.Notification;
4 | import android.app.NotificationChannel;
5 | import android.app.NotificationManager;
6 | import android.app.PendingIntent;
7 | import android.app.Service;
8 | import android.content.Intent;
9 | import android.os.Binder;
10 | import android.os.Build;
11 | import android.os.IBinder;
12 | import android.support.annotation.Nullable;
13 | import android.support.v4.app.NotificationCompat;
14 |
15 | //前台服务。
16 | public class FrgndSrvc extends Service
17 | {
18 | MainAct m_MainActPt; //存放主界面的指针。
19 |
20 | public class FrgndSrvcBinder extends Binder
21 | {
22 | public void SetForeground( MainAct MainActPt )
23 | {
24 | m_MainActPt = MainActPt;
25 |
26 | NotificationManager p_NotificationManagerPt = (NotificationManager) getSystemService( NOTIFICATION_SERVICE ); //存放通知管理器对象的指针。
27 |
28 | if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ) //如果当前系统为Andoird 8.0及以上。
29 | {
30 | //创建状态通知的通知渠道,并设置为静音。
31 | NotificationChannel p_NotificationChannel = new NotificationChannel( "前台服务通知", "前台服务通知", NotificationManager.IMPORTANCE_HIGH );
32 | p_NotificationChannel.setSound( null, null );
33 | p_NotificationManagerPt.createNotificationChannel( p_NotificationChannel );
34 | }
35 |
36 | //创建通知。
37 | PendingIntent pendingIntent = PendingIntent.getActivity( m_MainActPt, 0, new Intent( m_MainActPt, MainAct.class ), PendingIntent.FLAG_IMMUTABLE );
38 | Notification notification =
39 | new NotificationCompat
40 | .Builder( m_MainActPt, "前台服务通知" ) //Android API 14及以上版本使用。
41 | //new NotificationCompat.Builder( m_MainActPt ) //Android API 9~25版本使用。
42 | .setSmallIcon( R.mipmap.tkbk_icon )
43 | .setContentTitle( m_MainActPt.getString( R.string.app_name ) )
44 | .setContentText( "前台服务" )
45 | .setOngoing( true )
46 | .setSound( null )
47 | .setContentIntent( pendingIntent )
48 | .build();
49 |
50 | //发送通知,并变成前台服务。
51 | startForeground( 1, notification );
52 | }
53 | }
54 |
55 | @Nullable @Override public IBinder onBind( Intent intent ) //本服务被绑定。
56 | {
57 | return new FrgndSrvcBinder();
58 | }
59 |
60 | @Override public boolean onUnbind( Intent intent ) //本服务被解除绑定。
61 | {
62 | stopForeground( true ); //退出前台服务,并变成普通服务。
63 |
64 | return super.onUnbind( intent );
65 | }
66 |
67 | @Override public void onDestroy() //本服务被销毁。
68 | {
69 | super.onDestroy();
70 | }
71 | }
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libAdoWavfm.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libAdoWavfm.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libAjb.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libAjb.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libDataStruct.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libDataStruct.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libFunc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libFunc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libLibYUV.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libLibYUV.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libMediaFile.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libMediaFile.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libOpenH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libOpenH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libRNNoise.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libRNNoise.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libSokt.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libSokt.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libSpeex.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libSpeex.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libSpeexDsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libSpeexDsp.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libSpeexWebRtcAec.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libSpeexWebRtcAec.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libSystemH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libSystemH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libWebRtc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libWebRtc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libWebRtc3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libWebRtc3.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/arm64-v8a/libc++_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/arm64-v8a/libc++_shared.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libAdoWavfm.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libAdoWavfm.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libAjb.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libAjb.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libDataStruct.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libDataStruct.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libFunc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libFunc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libLibYUV.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libLibYUV.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libMediaFile.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libMediaFile.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libOpenH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libOpenH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libRNNoise.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libRNNoise.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libSokt.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libSokt.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libSpeex.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libSpeex.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libSpeexDsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libSpeexDsp.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libSpeexWebRtcAec.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libSpeexWebRtcAec.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libSystemH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libSystemH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libWebRtc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libWebRtc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libWebRtc3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libWebRtc3.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libAdoWavfm.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libAdoWavfm.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libAjb.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libAjb.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libDataStruct.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libDataStruct.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libFunc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libFunc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libLibYUV.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libLibYUV.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libMediaFile.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libMediaFile.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libOpenH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libOpenH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libRNNoise.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libRNNoise.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libSokt.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libSokt.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libSpeex.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libSpeex.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libSpeexDsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libSpeexDsp.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libSpeexWebRtcAec.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libSpeexWebRtcAec.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libSystemH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libSystemH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libWebRtc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libWebRtc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libWebRtc3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libWebRtc3.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libc++_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86/libc++_shared.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libAdoWavfm.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libAdoWavfm.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libAjb.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libAjb.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libDataStruct.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libDataStruct.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libFunc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libFunc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libLibYUV.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libLibYUV.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libMediaFile.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libMediaFile.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libOpenH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libOpenH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libRNNoise.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libRNNoise.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libSokt.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libSokt.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libSpeex.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libSpeex.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libSpeexDsp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libSpeexDsp.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libSpeexWebRtcAec.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libSpeexWebRtcAec.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libSystemH264.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libSystemH264.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libWebRtc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libWebRtc.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libWebRtc3.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libWebRtc3.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86_64/libc++_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/jniLibs/x86_64/libc++_shared.so
--------------------------------------------------------------------------------
/app/src/main/res/layout/ajb_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
52 |
53 |
59 |
60 |
66 |
67 |
68 |
69 |
73 |
74 |
80 |
81 |
87 |
88 |
89 |
90 |
94 |
95 |
101 |
102 |
108 |
109 |
110 |
111 |
115 |
116 |
122 |
123 |
129 |
130 |
131 |
132 |
136 |
137 |
143 |
144 |
150 |
151 |
152 |
153 |
157 |
158 |
164 |
165 |
171 |
172 |
173 |
174 |
180 |
181 |
182 |
183 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/clnt_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
44 |
45 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
67 |
68 |
74 |
75 |
81 |
82 |
83 |
84 |
89 |
90 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/cnct_and_clnt_lst_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
26 |
27 |
36 |
37 |
46 |
47 |
56 |
57 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/openh264_codec_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
52 |
53 |
59 |
60 |
66 |
67 |
68 |
69 |
73 |
74 |
80 |
81 |
87 |
88 |
89 |
90 |
94 |
95 |
101 |
102 |
108 |
109 |
110 |
111 |
115 |
116 |
122 |
123 |
129 |
130 |
131 |
132 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/save_ado_inpt_otpt_to_wave_file_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
32 |
33 |
37 |
38 |
44 |
45 |
51 |
52 |
53 |
54 |
58 |
59 |
65 |
66 |
72 |
73 |
74 |
75 |
80 |
81 |
85 |
86 |
92 |
93 |
99 |
100 |
101 |
102 |
106 |
107 |
113 |
114 |
120 |
121 |
122 |
123 |
129 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/save_ado_vdo_inpt_otpt_to_avi_file_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
52 |
53 |
59 |
60 |
66 |
67 |
68 |
69 |
73 |
74 |
80 |
81 |
87 |
88 |
89 |
90 |
95 |
96 |
101 |
102 |
107 |
108 |
113 |
114 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/save_sts_to_txt_file_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/speex_aec_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
53 |
54 |
58 |
59 |
65 |
66 |
72 |
73 |
74 |
75 |
79 |
80 |
86 |
87 |
93 |
94 |
95 |
96 |
100 |
101 |
107 |
108 |
114 |
115 |
116 |
117 |
121 |
122 |
128 |
129 |
135 |
136 |
137 |
138 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/speex_codec_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
44 |
45 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
67 |
68 |
74 |
75 |
81 |
82 |
83 |
84 |
88 |
89 |
95 |
96 |
102 |
103 |
104 |
105 |
109 |
110 |
116 |
117 |
123 |
124 |
125 |
126 |
131 |
132 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/speex_prpocs_ns_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
33 |
34 |
38 |
39 |
45 |
46 |
52 |
53 |
54 |
55 |
61 |
62 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/speex_prpocs_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
33 |
34 |
38 |
39 |
45 |
46 |
52 |
53 |
54 |
55 |
59 |
60 |
66 |
67 |
73 |
74 |
75 |
76 |
81 |
82 |
86 |
87 |
93 |
94 |
100 |
101 |
102 |
103 |
107 |
108 |
114 |
115 |
121 |
122 |
123 |
124 |
128 |
129 |
135 |
136 |
142 |
143 |
144 |
145 |
149 |
150 |
156 |
157 |
163 |
164 |
165 |
166 |
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/srvr_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/systemh264_codec_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
52 |
53 |
59 |
60 |
66 |
67 |
68 |
69 |
73 |
74 |
80 |
81 |
87 |
88 |
89 |
90 |
94 |
95 |
101 |
102 |
108 |
109 |
110 |
111 |
117 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/webrtc_aec3_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/webrtc_aec_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
52 |
53 |
59 |
60 |
66 |
67 |
68 |
69 |
75 |
76 |
82 |
83 |
89 |
90 |
96 |
97 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/webrtc_aecm_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
33 |
34 |
38 |
39 |
45 |
46 |
52 |
53 |
54 |
55 |
59 |
60 |
66 |
67 |
73 |
74 |
75 |
76 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/webrtc_ns_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/webrtc_nsx_stng_lyot.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
26 |
27 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/tkbk_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-hdpi/tkbk_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/tkbk_round_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-hdpi/tkbk_round_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimen.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 3dp
5 | 3dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Android下音视频对讲演示程序
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:8.9.1'
11 |
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | android.nonFinalResIds=false
10 | android.nonTransitiveRClass=false
11 | org.gradle.jvmargs=-Xmx4096m
12 | # When configured, Gradle will run in incubating parallel mode.
13 | # This option should only be used with decoupled projects. More details, visit
14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
15 | # org.gradle.parallel=true
16 |
17 |
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cyz7758520/Android_audio_talkback_demo_program/4e394b43af99487693f464c3fc63103a45dacf21/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Sep 02 15:16:36 CST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------