Merge "[Feature][T106][task-view-97] add interface for voice call to rtp, modification in cap, add interface in lynq qser demo" into 15.11_rtp_temp
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
index 41c5c97..c3187a8 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
@@ -29,6 +29,8 @@
{7, "qser_voice_set_test_num"},
{8, "qser_voice_fast_ecall"},
#endif
+ {9, "qser_voice_set_audio_mode"},
+ {10, "qser_voice_get_audio_mode"},
{-1, NULL}
};
@@ -51,6 +53,9 @@
int (*qser_voice_set_speech_volume)(const int volume);
int (*qser_voice_get_speech_volume)(int *volume);
int (*qser_voice_set_dtmf)(const char callnum);
+int (*qser_voice_set_audio_mode)(const int audio_mode);
+int (*qser_voice_get_audio_mode)(int* audio_mode);
+
#ifdef ECALL_SUPPORT
int (*qser_voice_set_test_num)(voice_client_handle_type* h_voice,E_QSER_VOICE_ECALL_SET_TYPE_T type, const char *test_num, int test_num_length);
@@ -119,6 +124,7 @@
int ret = 0;
int voice_call_id = 0;
voice_client_handle_type h_voice = 0;
+ int audio_mode = 0;
const char *lynqLibPath_Call = "/lib/liblynq-qser-voice.so";
dlHandle_call = dlopen(lynqLibPath_Call, RTLD_NOW);
@@ -230,7 +236,23 @@
printf("qser_voice_add_ecall_indhandler not defined or exported in %s\n", lynqLibPath_Call);
return -1;
}
-#endif
+#endif
+
+ qser_voice_set_audio_mode = (int(*)(const int audio_mode))dlsym(dlHandle_call, "qser_voice_set_audio_mode");
+ if(qser_voice_set_audio_mode == NULL)
+ {
+ printf("qser_voice_set_audio_mode not defined or exported in %s\n", lynqLibPath_Call);
+ return -1;
+ }
+
+
+ qser_voice_get_audio_mode = (int(*)(int* audio_mode))dlsym(dlHandle_call, "qser_voice_get_audio_mode");
+ if(qser_voice_get_audio_mode == NULL)
+ {
+ printf("qser_voice_get_audio_mode not defined or exported in %s\n", lynqLibPath_Call);
+ return -1;
+ }
+
ret = qser_voice_call_client_init(&h_voice);
if(ret != 0 )
@@ -378,6 +400,22 @@
break;
}
#endif
+ case 9:
+ {
+
+ printf("please input voice audio mode: 0 codec, 1 rtp\n");
+ scanf("%d", &audio_mode);
+ ret = qser_voice_set_audio_mode(audio_mode);
+ printf("qser_voice_set_audio_mode ret = %d, audio_mode is %d\n", ret, audio_mode);
+ break;
+ }
+ case 10:
+ {
+ ret = qser_voice_get_audio_mode(&audio_mode);
+ printf("qser_voice_get_audio_mode ret = %d, audio_mode is %d\n", ret, audio_mode);
+ break;
+ }
+
default:
print_help();
break;