?? hust_rtpclose.c
字號:
/*------------------------------------------------------------------------- * rtpclose.c - rtpclose *------------------------------------------------------------------------- */#include "hust_rtp.h"#include "hust_rtcp.h"#include "hust_event.h"#include "hust_hash.h"///#include <unistd.h>///#include <stdlib.h>///#include <hash.h>///#include <stdio.h>///#include <arpa/inet.h>/*------------------------------------------------------------------------ * rtpclose - close the rtp session pointed to by psn *------------------------------------------------------------------------ */intrtpclose(struct session *psn){ bool false = FALSE; /* * Stop threads cleanly. */ ///rtpctl(psn, RTP_CTL_RTCPRECVTHREAD, (char *) &false, 0, 0); ///rtpctl(psn, RTP_CTL_RTPRECVTHREAD, (char *) &false, 0, 0); ///rtpctl(psn, RTP_CTL_RTCPCYCLETHREAD, (char *) &false, 0, 0); /* * Send RTCP bye message to group. */ rtcpsendbye(psn, "Leaving"); /* * Release all resources. */ ///close(psn->sn_rtpfd); ///close(psn->sn_rtcpfd); htdestroy(psn->sn_cnames); htdestroy(psn->sn_ssrcs); ///bufpooldestroy(&psn->sn_bpool); heap_free(psn->sn_cyclesources); heap_free(psn->sn_cyclebuf); /* assume no mutexes held at this point */ /*pthread_cond_destroy(&psn->sn_cond); pthread_mutex_destroy(&psn->sn_mutex); pthread_mutex_destroy(&psn->sn_rtpthrmutex); pthread_mutex_destroy(&psn->sn_rtcpthrmutex); pthread_mutex_destroy(&psn->sn_rtcpcyclethrmutex); pthread_mutex_destroy(&psn->sn_getstreammutex); pthread_mutex_destroy(&psn->sn_cnamemutex);*/ heap_free(psn); /////要重新實(shí)現(xiàn)free return OK;}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -