linphone在android中,怎么读取音频之探索过程!终于找到它是怎么读声音的!

/linphone/console/linphonec.c


int
main (int argc, char *argv[]) {
#endif
    linphonec_vtable.call_state_changed=linphonec_call_state_changed;
    linphonec_vtable.notify_presence_recv = linphonec_notify_presence_received;
    linphonec_vtable.new_subscription_request = linphonec_new_unknown_subscriber;
    linphonec_vtable.auth_info_requested = linphonec_prompt_for_auth;
    linphonec_vtable.display_status = linphonec_display_status;
    linphonec_vtable.display_message=linphonec_display_something;
    linphonec_vtable.display_warning=linphonec_display_warning;
    linphonec_vtable.display_url=linphonec_display_url;
    linphonec_vtable.text_received=linphonec_text_received;
    linphonec_vtable.dtmf_received=linphonec_dtmf_received;
    linphonec_vtable.refer_received=linphonec_display_refer;
    linphonec_vtable.notify_recv=linphonec_notify_received;
    linphonec_vtable.call_encryption_changed=linphonec_call_encryption_changed;

    if (! linphonec_init(argc, argv) ) exit(EXIT_FAILURE);

    linphonec_main_loop (linphonec);

    linphonec_finish(EXIT_SUCCESS);

    exit(EXIT_SUCCESS); /* should never reach here */
}


linphone_init:
static int
linphonec_init(int argc, char **argv)
{

    //g_mem_set_vtable(&dbgtable);

    /*
     * Set initial values for global variables
     */
    mylogfile = NULL;


#ifndef _WIN32
    snprintf(configfile_name, PATH_MAX, "%s/.linphonerc",
            getenv("HOME"));
    snprintf(zrtpsecrets, PATH_MAX, "%s/.linphone-zidcache",
            getenv("HOME"));
#elif defined(_WIN32_WCE)
    strncpy(configfile_name,PACKAGE_DIR "\\linphonerc",PATH_MAX);
    mylogfile=fopen(PACKAGE_DIR "\\" "linphonec.log","w");
    printf("Logs are redirected in" PACKAGE_DIR "\\linphonec.log");
#else
    snprintf(configfile_name, PATH_MAX, "%s/Linphone/linphonerc",
            getenv("APPDATA"));
    snprintf(zrtpsecrets, PATH_MAX, "%s/Linphone/linphone-zidcache",
            getenv("APPDATA"));
#endif
    /* Handle configuration filename changes */
    switch (handle_configfile_migration())
    {
        case -1: /* error during file copies */
            fprintf(stderr,
                "Error in configuration file migration\n");
            break;

        case 0: /* nothing done */
        case 1: /* migrated */
        default:
            break;
    }

#ifdef ENABLE_NLS
    if (NULL == bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR))
        perror ("bindtextdomain failed");
#ifndef __ARM__
    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
    textdomain (GETTEXT_PACKAGE);
#else
    printf ("NLS disabled.\n");
#endif

    linphonec_parse_cmdline(argc, argv);

    if (trace_level > 0)
    {
        if (logfile_name != NULL)
            mylogfile = fopen (logfile_name, "w+");

        if (mylogfile == NULL)
        {
            mylogfile = stdout;
            fprintf (stderr,
                 "INFO: no logfile, logging to stdout\n");
        }
        linphone_core_enable_logs(mylogfile);
    }
    else
    {
        linphone_core_disable_logs();
    }
    /*
     * Initialize auth stack
     */
    auth_stack.nitems=0;

    /*
     * Initialize linphone core
     */
    linphonec=linphone_core_new (&linphonec_vtable, configfile_name, factory_configfile_name, NULL);
    linphone_core_set_zrtp_secrets_file(linphonec,zrtpsecrets);
    linphone_core_enable_video(linphonec,vcap_enabled,display_enabled);
    if (display_enabled && window_id != 0)
    {
        printf ("Setting window_id: 0x%x\n", window_id);
        linphone_core_set_native_video_window_id(linphonec,window_id);
    }

    linphone_core_enable_video_preview(linphonec,preview_enabled);
    if (!(vcap_enabled || display_enabled)) printf("Warning: video is disa
  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值