提交 76ca6a1d 编写于 作者: jinlong0603's avatar jinlong0603

增加arm64-v8a 及 双通道支持

上级 22ab5a8c
......@@ -8,8 +8,8 @@ android {
applicationId "org.easydarwin.easyipcamera"
minSdkVersion 16
targetSdkVersion 21
versionCode 7
versionName "1.2.17.1213"
versionCode 8
versionName "1.2.18.0108"
}
buildTypes {
release {
......
......@@ -47,13 +47,6 @@
<service
android:name=".activity.RecordService"
android:enabled="true" />
<receiver android:name=".updatemgr.CompleteReceiver" >
<intent-filter>
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
<action android:name="android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED" />
</intent-filter>
</receiver>
</application>
</manifest>
\ No newline at end of file
......@@ -302,7 +302,7 @@ public class RecordService extends Service implements EasyIPCamera.IPCameraCallB
public void run() {
int result = -1;
while(mIsRunning && result < 0) {
result = mEasyIPCamera.startup(iport, EasyIPCamera.AuthType.AUTHENTICATION_TYPE_BASIC, "", "", "", 0, mChannelId, strId.getBytes());
result = mEasyIPCamera.startup(iport, EasyIPCamera.AuthType.AUTHENTICATION_TYPE_BASIC, "", "", "", 0, mChannelId, strId.getBytes(), -1, null);
if(result < 0){
try {
Thread.sleep(100);
......
......@@ -77,7 +77,7 @@ public class EasyIPCamera {
/* 回调函数定义 userptr表示用户自定义数据 */
public static void onIPCameraCallBack(int channelId, int channelState, byte[] mediaInfo, int userPtr){
Log.d(TAG, "kim onIPCameraCallBack channelId="+channelId+", channelState="+channelState);
Log.d(TAG, "onIPCameraCallBack channelId="+channelId+", channelState="+channelState);
//TODO::
synchronized (sCallbacks) {
......@@ -92,9 +92,14 @@ public class EasyIPCamera {
public native int active(String key, Context context);
/* 启动 Rtsp Server */
/*设置监听端口, 回调函数及自定义数据 */
public native int startup(int listenport, int authType, String realm, String username, String password, int userptr,int channelid, byte[] channelinfo);
/* 启动 Rtsp Server
*设置监听端口, 回调函数及自定义数据
* channelid1 通道1的id
* channelinfo1 通道1的地址
* channelid2 通道2的id,如果没有通道2设置为-1
* channelinfo2 通道2的地址, 如果没有通道2设置为null
*/
public native int startup(int listenport, int authType, String realm, String username, String password, int userptr,int channelid1, byte[] channelinfo1, int channelid2, byte[] channelinfo2);
/* 终止 Rtsp Server */
public native int shutdown();
......
......@@ -527,7 +527,13 @@ public class MediaStream implements EasyIPCamera.IPCameraCallBack {
*/
private void initMediaCodec() {
framerate = 25;
bitrate = 2 * width * height * framerate / 20;
//bitrate = 2 * width * height * framerate / 20;
bitrate = (int) (width * height * 20 * 2 * 0.05f);
if (width >= 1920 || height >= 1920) bitrate *= 0.3;
else if (width >= 1280 || height >= 1280) bitrate *= 0.4;
else if (width >= 720 || height >= 720) bitrate *= 0.6;
EncoderDebugger debugger;
if(mPortraitScreen)
debugger = EncoderDebugger.debug(mApplicationContext, width, height);//width, height
......@@ -629,7 +635,7 @@ public class MediaStream implements EasyIPCamera.IPCameraCallBack {
// audioStream.setChannelId(mChannelId);
//int result = mEasyIPCamera.startup(iport, EasyIPCamera.AuthType.AUTHENTICATION_TYPE_BASIC,"", "admin", "admin", 0, mChannelId, id.getBytes());
int result = mEasyIPCamera.startup(iport, EasyIPCamera.AuthType.AUTHENTICATION_TYPE_BASIC,"", "", "", 0, mChannelId, id.getBytes());
int result = mEasyIPCamera.startup(iport, EasyIPCamera.AuthType.AUTHENTICATION_TYPE_BASIC,"", "", "", 0, mChannelId, id.getBytes(), -1, null);
Log.d(TAG, "startup result="+result);
//mEasyIPCamera.configUser("admin", "admin");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册