LinphoneCore分析

struct _LinphoneCore
{
    MSList* vtable_refs;
    Sal *sal;
//指针sal 指向sal 数据结构图,通过该指针,就可以找到sal 模块用到的所有数据结构体。

    LinphoneGlobalState state;
    struct _LpConfig *config;
//Config 部分指向linphone 的配置信息,包括网络,sip 协议,rtp 传输,音视频参数以及编解码器信息。

    MSList *default_audio_codecs;
    MSList *default_video_codecs;
    net_config_t net_conf;
    sip_config_t sip_conf;
    rtp_config_t rtp_conf;
    sound_config_t sound_conf;
    video_config_t video_conf;
    codecs_config_t codecs_conf;
    ui_config_t ui_conf;
    autoreplier_config_t autoreplier_conf;
    beauty_config_t beauty_conf;
    LinphoneProxyConfig *default_proxy;
    MSList *friends;
    MSList *auth_info;
    struct _RingStream *ringstream;
    time_t dmfs_playing_start_time;
    LCCallbackObj preview_finished_cb;
    LinphoneCall *current_call;   /* the current call */
    MSList *calls;              /* all the processed calls */

//call 指针挂载了所有的通话,每一路通话都由linphonecall 结构体表示。
//Audiostream 和videostream 保存了媒体信息,a_rtp 和a_rtcp 保存了RTP 相关的信息。

    MSList *queued_calls;   /* used by the autoreplier */
    MSList *call_logs;
    MSList *chatrooms;
    int max_call_logs;
    int missed_calls;
    VideoPreview *previewstream;
    struct _MSEventQueue *msevq;
    LinphoneRtpTransportFactories *rtptf;
    MSList *bl_reqs;
    MSList *subscribers;    /* unknown subscribers */
    int minutes_away;
    LinphonePresenceModel *presence_model;
    void *data;
    char *play_file;
    char *rec_file;
    time_t prevtime;
    int audio_bw; /*IP bw consumed by audio codec, set as soon as used codec is known, its purpose is to know the remaining bw for video*/
    LinphoneCoreWaitingCallback wait_cb;
    void *wait_ctx;
    void *video_window_id;
    void *preview_window_id;
    time_t netup_time; /*time when network went reachable */
    struct _EcCalibrator *ecc;
    MSList *hooks;
    LinphoneConference conf_ctx;
    char* zrtp_secrets_cache;
    char* user_certificates_path;
    LinphoneVideoPolicy video_policy;
    time_t network_last_check;
    time_t register_last_check;

    bool_t use_files;
    bool_t apply_nat_settings;
    bool_t initial_subscribes_sent;
    bool_t bl_refresh;

    bool_t preview_finished;
    bool_t auto_net_state_mon;
    bool_t network_reachable;
    bool_t network_reachable_to_be_notified; /*set to true when state must be notified in next iterate*/

    bool_t use_preview_window;
    bool_t network_last_status;
    bool_t ringstream_autorelease;
    bool_t vtables_running;
    char localip[LINPHONE_IPADDR_SIZE];
    int device_rotation;
    int max_calls;
    LinphoneTunnel *tunnel;
    char* device_id;
    MSList *last_recv_msg_ids;
    char *chat_db_file;
    void * beauty_window_id;
#ifdef MSG_STORAGE_ENABLED
    sqlite3 *db;
    bool_t debug_storage;
#endif
#ifdef BUILD_UPNP
    UpnpContext *upnp;
#endif //BUILD_UPNP
    belle_http_provider_t *http_provider;
    belle_tls_verify_policy_t *http_verify_policy;
    MSList *tones;
    LinphoneReason chat_deny_code;
    char *file_transfer_server;
    const char **supported_formats;
    LinphoneContent *log_collection_upload_information;
    LinphoneCoreVTable *current_vtable; // the latest vtable to call a callback, see linphone_core_get_current_vtable
#ifdef ANDROID
    jobject wifi_lock;
    jclass wifi_lock_class;
    jmethodID wifi_lock_acquire_id;
    jmethodID wifi_lock_release_id;
    jobject multicast_lock;
    jclass multicast_lock_class;
    jmethodID multicast_lock_acquire_id;
    jmethodID multicast_lock_release_id;
#endif
};

你可能感兴趣的:(LinphoneCore分析)