zoukankan      html  css  js  c++  java
  • ortp代码简析

    ortp初始化

    /**
     *    Initialize the oRTP library. You should call this function first before using
     *    oRTP API.
    **/
    void
    ortp_init() { if (ortp_initialized++) return;  //全局初始化标志 #ifdef _WIN32 win32_init_sockets();   //初始化socket #endif av_profile_init(&av_profile);    //注册所需的payload类型 ortp_global_stats_reset();     init_random_number_generator(); ortp_message("oRTP-" ORTP_VERSION " initialized."); }

    ortp退出

    /**
     * Gracefully uninitialize the library, including shutdowning the scheduler if it was started.
     *
    **/
    void ortp_exit()
    {
        if (ortp_initialized==0) {
            ortp_warning("ortp_exit() called without prior call to ortp_init(), ignored.");
            return;
        }
        ortp_initialized--;
        if (ortp_initialized==0){
            if (__ortp_scheduler!=NULL)
            {
                rtp_scheduler_destroy(__ortp_scheduler);
                __ortp_scheduler=NULL;
            }
        }
    }

    外部调用ortp初始化

    int init_rtpservice()
    {
        ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
        ortp_set_log_handler(__logv_out);        //orpt LOG, 设置orpt日志
        ortp_init();
        return RESULT_SUCCESS;
    }

    外部调用ortp反初始化

    int uninit_rtpservice()
    {
        rtp_profile_clear_all(p_RtpProfile);
        rtp_profile_destroy(p_RtpProfile);
        ortp_exit();
    return RESULT_SUCCESS; }
  • 相关阅读:
    jquery 遮罩层显示img
    redis 模糊查找keys
    consul windows安装
    redis cluster以及master-slave在windows下环境搭建
    c# 设置和取消文件夹共享及执行Dos命令
    svg教程
    mybatis高级查询
    css常用技巧1
    ssm搭建,maven,javaConfig
    MyBatis整体架构
  • 原文地址:https://www.cnblogs.com/samaritan/p/5025506.html
Copyright © 2011-2022 走看看