经过近3个月的迭代开发,新版本的国标GB28181设备端EasyGBD安卓Android版终于在昨天发布到Github了,最新的EasyGBD支持了国标GB28181-2022版,还支持了语音对讲、位置上报、本地录像等功能,比原有GB28181-2016版的EasyGBD更加高效、可靠!
EasyGBD" height="600" />
安卓版本EasyGBD的发布,为更多做国标GB28181开发的厂家带来了福利,不论是从产品集成的角度,还是从国标GB28181验证的角度,都给大家带来了一门利器!
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>#ifndef _Included_com_easygbs_Device
#define _Included_com_easygbs_Device
#ifdef __cplusplus
extern "C" {
#endif#define F(x,y,z) ((x & y) | (~x & z))
#define G(x,y,z) ((x & z) | (y & ~z))
#define H(x,y,z) (x^y^z)
#define I(x,y,z) (y ^ (x | ~z))
#define ROTATE_LEFT(x,n) ((x << n) | (x >> (32-n)))
#define FF(a,b,c,d,x,s,ac) \{ \a += F(b, c, d) + x + ac; \a = ROTATE_LEFT(a, s); \a += b; \}
#define GG(a,b,c,d,x,s,ac) \{ \a += G(b, c, d) + x + ac; \a = ROTATE_LEFT(a, s); \a += b; \}
#define HH(a,b,c,d,x,s,ac) \{ \a += H(b, c, d) + x + ac; \a = ROTATE_LEFT(a, s); \a += b; \}
#define II(a,b,c,d,x,s,ac) \{ \a += I(b, c, d) + x + ac; \a = ROTATE_LEFT(a, s); \a += b; \}typedef struct{unsigned int count[2];unsigned int state[4];unsigned char buffer[64];}MD5_CTX;void MD5Init(MD5_CTX *context);void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputlen);void MD5Final(MD5_CTX *context, unsigned char digest[16]);void MD5Transform(unsigned int state[4], unsigned char block[64]);void MD5Encode(unsigned char *output, unsigned int *input, unsigned int len);void MD5Decode(unsigned int *output, unsigned char *input, unsigned int len);extern JavaVM *g_vm;JNIEXPORT jint JNICALL Java_com_easygbs_Device_create(JNIEnv *pEnv, jobject obj, jint version, jstring jstrServerIP, jint serverPort, jstring jstServerID, jstring jstServerDomain,jstring jstrDeviceId, jstring jstrDeviceName, jint localSipPort, jint channelNum, jstring jstPassword, jint protocol, jint mediaProtocol,jint regExpires, jint heartbeatInterval, jint heartbeatCount);JNIEXPORT jint JNICALL Java_com_easygbs_Device_addChannelInfo(JNIEnv *pEnv, jobject obj, jint channelId, jstring jstrIndexCode, jstring jstrName, jstring jstrManufacturer, jstring jstrModel,jstring jstrParentIndexCode, jstring jstrOwner, jstring jstrCivilCode, jstring jstrAddress,jdouble longitude, jdouble latitude);JNIEXPORT jint JNICALL Java_com_easygbs_Device_setVideoFormat(JNIEnv *env, jobject obj, jint channelId, jint codec, jint width, jint height, jint framerate);JNIEXPORT jint JNICALL Java_com_easygbs_Device_setAudioFormat(JNIEnv *env, jobject obj, jint channelId, jint codec, jint samplerate, jint channels, jint bitPerSamples);JNIEXPORT jint JNICALL Java_com_easygbs_Device_setLotLat(JNIEnv *env, jobject obj, jint channelId, jdouble longitude, jdouble latitude);JNIEXPORT jint JNICALL Java_com_easygbs_Device_pushVideo(JNIEnv *pEnv, jobject obj, jint channelId, jbyteArray framedata, jint framesize, jint keyframe);JNIEXPORT jint JNICALL Java_com_easygbs_Device_pushAudio(JNIEnv *env, jobject obj, jint channelId, jint srcFormat, jbyteArray framedata, jint framesize, jint nbSamples);JNIEXPORT jint JNICALL Java_com_easygbs_Device_release(JNIEnv *, jobject);#ifdef __cplusplus
}
#endif
#endif
从接口代码看,简单的几个接口就搞定了直播、对讲、位置上报等功能,国标GB28181的开发变得特别简单!
可以直接下载测试看看:http://app.tsingsee.com/easygbd
Github地址:https://github.com/EasyDarwin/EasyGBD/tree/GB28181-2022(Android)
下一期带来EasyGBD-Android的使用方法~