From a780f0b8d0ccec90d359c0c554f07d5afde9554c Mon Sep 17 00:00:00 2001 From: 562935844@qq.com Date: 星期二, 28 六月 2022 17:05:31 +0800 Subject: [PATCH] 代码同步 --- HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java b/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java index c431fa1..2e4a99b 100644 --- a/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java +++ b/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java @@ -144,6 +144,7 @@ @Override public void incomingCall(Call linphoneCall) { super.incomingCall(linphoneCall); + Log.d("HDLLinphoneKit","------incomingCall------"); if (linphoneCall != null) { String callUsername = linphoneCall.getRemoteAddress().getUsername(); HDLLog.I("鏉ョ數鍙风爜锛�" + callUsername); @@ -162,18 +163,29 @@ @Override public void outgoingInit() { super.outgoingInit(); +<<<<<<< HEAD + Log.d("HDLLinphoneKit","------outgoingInit------"); +======= +>>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 } @Override public void callConnected() { super.callConnected(); // 瑙嗛閫氳瘽榛樿鍏嶆彁锛岃闊抽�氳瘽榛樿闈炲厤鎻� + Log.d("HDLLinphoneKit","------callConnected------"); toggleSpeaker(true); } @Override public void callEnd() { super.callEnd(); +<<<<<<< HEAD + Log.d("HDLLinphoneKit","------callEnd------"); +// context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY)); + +======= +>>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 } }); } @@ -480,8 +492,11 @@ Call currentCall = HDLLinphoneService.getCore().getCurrentCall(); CallParams params = HDLLinphoneService.getCore().createCallParams(currentCall); params.enableVideo(true); + params.enableLowBandwidth(false); params.setAudioBandwidthLimit(0); // disable limitation currentCall.acceptWithParams(params); + Log.d("HDLLinphoneKit","---acceptCall= "); + } catch (Exception e) { e.printStackTrace(); } @@ -544,7 +559,7 @@ * 璁剧疆澶栨斁璁惧 */ private void routeAudioToSpeakerHelper(boolean speakerOn) { - org.linphone.core.tools.Log.w("[Audio Manager] Routing audio to " + (speakerOn ? "speaker" : "earpiece")); + Log.d("HDLLinphoneKit","璁剧疆澶栨斁璁惧[Audio Manager] Routing audio to " + (speakerOn ? "speaker" : "earpiece")); try { if (HDLLinphoneService.getCore() == null) return; if (HDLLinphoneService.getCore().getCallsNb() == 0) return; @@ -553,8 +568,14 @@ if (currentCall == null) return; for (AudioDevice audioDevice : HDLLinphoneService.getCore().getAudioDevices()) { + Log.d("HDLLinphoneKit","audioDevice.getType()= " + audioDevice.getType()); + } + + for (AudioDevice audioDevice : HDLLinphoneService.getCore().getAudioDevices()) { + Log.d("HDLLinphoneKit","璁剧疆澶栨斁璁惧speakerOn=" + speakerOn + " audioDevice.getType()=" + audioDevice.getType()); if (speakerOn && audioDevice.getType() == AudioDevice.Type.Speaker) { currentCall.setOutputAudioDevice(audioDevice); + Log.d("HDLLinphoneKit","AudioDevice.Type.Speaker"); return; } else if (!speakerOn && audioDevice.getType() == AudioDevice.Type.Earpiece) { currentCall.setOutputAudioDevice(audioDevice); -- Gitblit v1.8.0