hust_rtpmkssrc.c

来自「实现基于ip2022的MPEG2 TS的IP组播接收」· C语言 代码 · 共 30 行

C
30
字号
/*------------------------------------------------------------------------- * rtpmkssrc.c - rtpmkssrc *------------------------------------------------------------------------- *//*#include <stdlib.h>#include <rtp.h>#include <hash.h>*/#include "hust_rtp.h"#include "hust_hash.h"/*------------------------------------------------------------------------ * rtpmkssrc - generate a unique synchronization source identifier. * This does not use the random number generater presend in RFC 1889. *------------------------------------------------------------------------ */ssrc_trtpmkssrc(struct session *psn){	ssrc_t ssrc;	do {		ssrc = random_get32();		///要得到随机数	} while (psn != NULL ? htget(psn->sn_ssrcs, ssrc) != NULL : 0);	return ssrc;}

⌨️ 快捷键说明

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