91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 277KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-14
  • 語言: 其他
  • 標簽: rtp/rtcp??

資源簡介

針對流媒體傳輸開發的rtp/rtcp協議源代碼,底層通過UDP協議傳輸,上層封裝rtp/rtcp控制,優化視頻傳輸效果,可應用于視頻聊天工具,視頻會議軟件,監控系統等的開發。

資源截圖

代碼片段和文件信息

/*?
?*?rtpdemo:?A?simple?rtp?application?that?sends?and?receives?data.
?*
?*?(C)?2000-2001?University?College?London.
?*/

#include?

#include?
#include?
#include?
#include?
#include?
#include?

#include?“uclconf.h“
#include?“config_unix.h“
#include?“config_win32.h“
#include?“debug.h“
#include?“memory.h“
#include?“rtp.h“

static?void?
usage()?
{
printf(“Usage:?rtpdemo?[switches]?address?port\n“);
printf(“Valid?switches?are:\n“);
printf(“??-f\t\tFilter?local?packets?out?of?receive?stream.\n“);
printf(“??-l\t\tListen?and?do?not?transmit?data.\n“);
exit(-1);
}

/*?-------------------------------------------------------------------------?*/
/*?RTP?callback?related?*/

static?void
sdes_print(struct?rtp?*session?uint32_t?ssrc?rtcp_sdes_type?stype)?{
const?char?*sdes_type_names[]?=?{
“end“?“cname“?“name“?“email“?“telephone“?
“location“?“tool“?“note“?“priv“
};
const?uint8_t?n?=?sizeof(sdes_type_names)?/?sizeof(sdes_type_names[0]);

if?(stype?>?n)?{
/*?Theoretically?impossible?*/
printf(“boo!?invalud?sdes?field?%d\n“?stype);
return;
}

printf(“SSRC?0x%08x?reported?SDES?type?%s?-?“?ssrc?
???????sdes_type_names[stype]);

if?(stype?==?RTCP_SDES_PRIV)?{
/*?Requires?extra-handling?not?important?for?example?*/
printf(“don‘t?know?how?to?display.\n“);
}?else?{
printf(“%s\n“?rtp_get_sdes(session?ssrc?stype));
}
}

static?void
packet_print(struct?rtp?*session?rtp_packet?*p)?
{
printf(“Received?data?(payload?%d?timestamp?%06d?size?%d)?“?p->pt?p->ts?p->data_len);

if?(p->ssrc?==?rtp_my_ssrc(session))?{
/*?Unless?filtering?is?enabled?we?are?likely?to?see
???out?packets?if?sending?to?a?multicast?group.?*/
printf(“that?I?just?sent.\n“);
}?else?{
printf(“from?SSRC?0x%08x\n“?p->ssrc);?
}?
}

static?void
rtp_event_handler(struct?rtp?*session?rtp_event?*e)?
{
rtp_packet *p;
rtcp_sdes_item *r;

switch(e->type)?{
case?RX_RTP:?
p?=?(rtp_packet*)e->data;
packet_print(session?p);
xfree(p);?/*?xfree()?is?mandatory?to?release?RTP?packet?data?*/
break;
case?RX_SDES:
r?=?(rtcp_sdes_item*)e->data;
sdes_print(session?e->ssrc?r->type);
break;
case?RX_BYE:
break;
case?SOURCE_CREATED:
printf(“New?source?created?SSRC?=?0x%08x\n“?e->ssrc);
break;
case?SOURCE_DELETED:
printf(“Source?deleted?SSRC?=?0x%08x\n“?e->ssrc);
break;
case?RX_SR:
case?RX_RR:
case?RX_RR_EMPTY:
case?RX_RTCP_START:
case?RX_RTCP_FINISH:
case?RR_TIMEOUT:
case?RX_APP:
break;
}
fflush(stdout);
}

/*?-------------------------------------------------------------------------?*/
/*?Send?and?receive?loop.??Sender?use?20ms?audio?mulaw?packets?*/

#define?MULAW_BYTES 4?*?160
#define?MULAW_PAYLOAD 0
#define?MULAW_MS 4?*?20

#define?MAX_ROUNDS 100

static?void
rxtx_loop(struct?rtp*?session?int?send_enable)?
{
struct?timeval t

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????525??2001-05-10?20:25??common-1.2.14\Makefile.in
?????文件?????????108??2001-03-10?14:54??common-1.2.14\.cvsignore
?????文件????????1966??2000-01-04?13:27??common-1.2.14\COPYRIGHT
?????文件???????20668??2003-05-23?12:43??common-1.2.14\MODS
?????文件???????27653??1999-11-18?22:49??common-1.2.14\config.guess
?????文件?????????416??2001-03-10?14:54??common-1.2.14\README
?????文件???????????8??2003-05-23?12:42??common-1.2.14\VERSION
?????文件?????????535??1998-11-14?17:46??common-1.2.14\common.dsw
?????文件???????10330??2003-04-02?12:03??common-1.2.14\configure.in
?????文件???????20769??1999-11-18?22:49??common-1.2.14\config.sub
?????文件???????85626??2003-04-02?12:16??common-1.2.14\configure
?????目錄???????????0??2003-05-23?12:49??common-1.2.14\doc\
?????目錄???????????0??2003-05-23?12:49??common-1.2.14\doc\html\
?????文件????????3492??2001-04-01?23:18??common-1.2.14\doc\html\uclmmbase.html
?????文件????????2276??2001-04-01?23:18??common-1.2.14\doc\html\book1.html
?????文件????????6138??2001-03-26?21:47??common-1.2.14\doc\html\uclmmbase-hmac.html
?????文件????????9108??2001-03-26?21:47??common-1.2.14\doc\html\uclmmbase-md5.html
?????文件???????22600??2001-03-26?21:47??common-1.2.14\doc\html\uclmmbase-net-udp.html
?????文件???????81144??2001-04-04?14:36??common-1.2.14\doc\html\uclmmbase-rtp.html
?????文件?????????703??2001-03-10?14:54??common-1.2.14\doc\Makefile.in
?????文件????????3123??2001-03-10?17:19??common-1.2.14\doc\README
?????目錄???????????0??2003-05-23?12:49??common-1.2.14\doc\tmpl\
?????文件????????1250??2001-03-10?14:54??common-1.2.14\doc\tmpl\config_unix.sgml
?????文件?????????299??2001-03-10?14:54??common-1.2.14\doc\tmpl\acconfig.sgml
?????文件????????2237??2001-03-10?14:54??common-1.2.14\doc\tmpl\addrinfo.sgml
?????文件?????????291??2001-03-10?14:54??common-1.2.14\doc\tmpl\addrsize.sgml
?????文件?????????861??2001-03-10?14:54??common-1.2.14\doc\tmpl\asarray.sgml
?????文件?????????500??2001-03-10?14:54??common-1.2.14\doc\tmpl\base64.sgml
?????文件?????????416??2001-03-10?14:54??common-1.2.14\doc\tmpl\bittypes.sgml
?????文件????????1043??2001-03-10?14:54??common-1.2.14\doc\tmpl\btree.sgml
?????文件?????????229??2001-03-10?14:54??common-1.2.14\doc\tmpl\cdecl_ext.sgml
............此處省略117個文件信息

評論

共有 條評論

相關資源