⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 synstreamoff.c

📁 linux环境下用纯c写的RTP协议的通用开发库
💻 C
字号:
/*------------------------------------------------------------------------- * synstreamoff.c - synstreamoff *------------------------------------------------------------------------- */#include <rtp.h>#include <syn.h>/*------------------------------------------------------------------------ * synstreamoff - turn off a stream at the synchronization layer and mark * it for removal. Unlike at the RTP layer, it is not necessary to hold * state for streams that the application is not interested in receiving. *------------------------------------------------------------------------ */intsynstreamoff(struct synsession *pssn, ssrc_t ssrc){  	struct synstream *psstm;	struct session   *psn;	psn = pssn->ssn_session;	psstm = syngetstream(pssn, ssrc);	if (psstm == NULL)		return ERROR;	/* 	 * Turn off the stream at the RTP layer.	 */	rtpstreamoff(psn, ssrc);	/* 	 * The following code handles the case where a thread is 	 * still in synread. The stream is marked as a zombie,	 * the reader is signaled.	 */	pthread_mutex_lock(&psstm->sstm_readmutex);	psstm->sstm_zombie = TRUE;	pthread_cond_broadcast(&psstm->sstm_readcond);	pthread_mutex_unlock(&psstm->sstm_readmutex);	synreleasestream(pssn, psstm);	return OK;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -