亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tutorial.txt

?? 利用rtp庫實現(xiàn)實時語音傳送
?? TXT
字號:
--------------------------------------------------------------------------------                                                                6th January 2004                           JRTPLIB (v2.8) -  TUTORIAL1.    Getting started1.1   Creating a sessionTo be able to do anything useful with the library, you'll have to create a RTPsession. To do this, you have to create a variable of type RTPSession and callits Create member. The function 'Create' takes one parameter which specifiesthe portbase for the session. So a simple (and totally useless) program wouldlook something like this:		#include "rtpsession.h"				int main(void)		{			RTPSession sess;						sess.Create(5000);			return 0;		}1.2   ErrorsWhat if something goes wrong and the session can't be created ? Well, in thelibrary, all functions returning an 'int' return a negative value if an erroroccurred, so you can detect if a function was successfull or not. Now, an'int' is probably not the most understandable error message and that's why thelibrary has the function RTPGetErrorString. This takes the return value of afunction as an argument and returns a pointer to a string which describes theerror. We could change the previous program to write out what happened:		#include <stdio.h>		#include "rtpsession.h"				int main(void)		{			RTPSession sess;			int status;			char *msg;						status = sess.Create(5000);			msg = RTPGetErrorString(status);			printf("%s\n",msg);			return 0;		}1.3   Other initializationOne thing you'll probably need to initialize is the timestamp unit, since thisvalue is needed for various calculations. The timestamp unit can be set throughthe use of the RTPSession member function SetTimestampUnit. This function takesone argument: the timestamp unit in seconds.	For example, if you're using the session to send 8000Hz sampled audio,you'd normally use the number of samples as RTP timestamp. Since the timestampwould then increment by 8000 each second, the timestamp unit would be 1/8000seconds. This is the default value which is used in the library. For 44100Hzsampling, the code would look something like this:			sess.SetTimestampUnit(1.0/44100.0);		2.    Sending and receiving data2.1   Specifying destinationsBefore you can send data, you must specify to which destinations each packetshould be sent. You can specify this using the RTPSession member functionsAddDestination, DeleteDestination and ClearDestinations. For example:			unsigned long addr = ntohl(inet_addr("127.0.0.1"));			sess.AddDestination(addr,5000);would prepare the session to send data to the local host, to port 5000. Notethat the 'ntohl' function had to be used because 'inet_addr' returns anaddress in network byte order and the parameters functions has to be in hostbyte order.2.2   Sending RTP packetsWhen you have entered the destinations for the RTP packets, you can start tosend data to all destinations by using the SendPacket member function ofRTPSession. This is an overloaded member function. In one version you haveto pass the RTP payload type, the 'mark' flag, and the timestamp incrementas parameters. Here's an example:			sess.SendPacket("1234567890",10,0,false,10);			The first parameter is the data which has to be sent, the second is the lengthof the data. Next come the payload type and the 'mark' flag. Finally, the lastargument specifies the amount by which the timestamp should be incremented.If you often need the same payload type, 'mark' flag and timestamp increment,you can use the second version of the function. To use it, you must firstspecify default values for those parameters. This can be done with theRTPSession member functions SetDefaultPayloadType, SetDefaultMark andSetDefaultTimeStampIncrement. Then, you can use the SendPacket function withoutthe last three arguments. For example, once you've entered the default values			sess.SetDefaultPayloadType(0);			sess.SetDefaultMark(false);			sess.SetDefaultTimeStampIncrement(10);			you can do exactly what the previous example of SendPacket did, by simply doingthis:			sess.SendPacket("1234567890",10);2.3   Receiving RTP packetsFirst of all, you should call the RTPSession member function PollData on aregular basis. This function processes incoming RTP and RTCP packets. Toaccess the received RTP packets, you'll typically iterate over the differentparticipants in the session and get each one's RTP packets. You can iterateover the participants using the functions GotoFirstSource and GotoNextSource.If you're only interested in the participants which have data you didn't getyet, you can use GotoFirstSourceWithData and GotoNextSourceWithData. All ofthese functions return true if there's a source available and false if not.When a source is available, you can use the function GetNextPacket to get aRTP packet from this source. When you don't need the RTP packet anymore, makesure you delete it. Here's some example code:			if (sess.GotoFirstSourceWithData())			{				do				{					RTPPacket *pack;										pack = sess.GetNextPacket();										// process packet										delete pack;									} while (sess.GotoNextSourceWithData());			}For a description about the RTPPacket class, you should take a look at thereference manual (manual.txt).2.4   Receive modesThere are three receive modes. A receive mode determines which incomingpackets are accepted and which are ignored. You can set the receive mode byusing the RTPSession member function SetReceiveMode.	The first mode, RECEIVEMODE_ALL, is the default. When you've enabledthis mode simply all incoming packets are accepted.	The second mode, RECEIVEMODE_IGNORESOME, accepts all incoming packetsexcept the ones which are coming from certain senders. You can determine whichpackets are ignored by using AddToIgnoreList, DeleteFromIgnoreList andClearIgnoreList.	The last mode, RECEIVEMODE_ACCEPTSOME, ignores all incoming packetsexcept the ones which are coming from certain senders. You can specify whichpackets are accepted by using AddToAcceptList, DeleteFromAcceptList andClearAcceptList.The AddTo... and DeleteFrom... functions take three arguments. The first oneis the IP address of the involved sender. The second one is a flag. If set totrue, all packets originating from the previous IP address are ignored oraccepted and the third parameter is ignored. If set to false, the thirdparameter specifies a port number. When this is the case, only packets withthe specified IP-port combination are ignored or accepted.	An important note is that the port which has to be specified is theport from which the RTP packets originate and this does not have to be the RTPportbase. More important, in this library those ports are not the same ! Theport from which packets are sent can be retrieved by the function GetSendPort.2.5   Multicasting2.5.1 Sending to a multicast groupTo be able to send to a multicast group you don't have to do anything special.You can simply add the multicast address for that group to the list ofdestinations and RTP and RTCP data will automatically be sent to it.	The only thing that probably needs to be set is the Time To Live (TTL)field for multicast packets. This is a field in the IP header which controlshow far (how many hops) a packet can travel. The value is initialized to oneso normally a multicast packet will not leave the local network. If you dorequire this, you can alter the value by using the RTPSession member functionSetMulticastTTL.2.5.2 Receicing from a multicast groupYou must first join a multicast group to be able to receive packets which aresent to it. You can control from which multicast groups you want to receivedata by using the functions JoinMulticastGroup, LeaveMulticastGroup andLeaveAllMulticastGroups. The first two of these functions take a multicastIP address as an argument.2.6   About sending and receiving RTCP packetsYou don't have to worry about sending and receiving RTCP packets. The librarytakes care of this. The only thing you have to make sure is that the PollDatais called on a regular basis. During a poll, the library reads incoming RTCPpackets and processes the information. It also checks if it's time to sendRTCP packets and if so, it sends them. This check is also performed when youcall the SendPacket function.3.    Control information3.1   Own informationYou can set your local information by using the following member functions ofRTPSession: SetLocalName, SetLocalEMail, SetLocalLocation, SetLocalPhone,SetLocalTool and SetLocalNote. All of these functions take two parameters: thefirst one is a 'char *' to the data, the second one specifies how many bytesof the data should be used. For example,						rtpsess.SetLocalEMail("user@myhost.org",15);			could be used to set the local E-mail address.You can specify which information should be sent by using the followingRTPSession member functions: EnableSendName, EnableSendEMail,EnableSendLocation, EnableSendPhone, EnableSendTool and EnableSendNote. All ofthese functions take a boolean as argument. This argument specifies whether ornot to send certain information about the current session.3.2   Other sessions' informationTo retrieve the information about other participating RTP sessions, you haveto specify which source's information you want. You can do this by iteratingover the sources using the GotoFirst... and GotoNext... functions, as wasdescribed in section 2.3. Then, you can do a call to the RTPSession memberfunction GetCurrentSourceInfo. This function returns a data structure of typeRTPSourceData. You can use this to look at the available information aboutthe source.	There is another way to retrieve information about a source. To beable to use it, you already have to know the sychronization source identifier(SSRC) of the source. You can then call the RTPSession member functionGetSourceInfo. This function takes a SSRC as argument and returns a datastructure of type RTPSourceData.	For more information about the RTPSourceData class and all of itsmember functions, you should take a look at the reference manual, whichcan be found in the file 'manual.txt'.4.    HandlersYou can specify handlers for certain types of events. For example: when asource joins the session, when a source times out, when SSRC identifierscollide, ...	For more information about the use of handlers you should take a lookat the reference manual (manual.txt).--------------------------------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩激情一二三区| 91丨porny丨首页| 丁香婷婷综合激情五月色| 91国产精品成人| 日韩视频一区二区三区在线播放| 中文字幕精品一区二区精品绿巨人 | 国产综合久久久久久鬼色 | 国产在线视频精品一区| 欧美亚洲综合在线| 国产精品乱码妇女bbbb| 秋霞午夜鲁丝一区二区老狼| 91久久精品国产91性色tv| 国产精品天干天干在观线| 久久国产三级精品| 日韩一区二区不卡| 亚洲成人免费av| 色香色香欲天天天影视综合网| 久久久噜噜噜久久人人看| 美女mm1313爽爽久久久蜜臀| 欧美视频日韩视频| 一卡二卡三卡日韩欧美| 成人午夜电影小说| 国产丝袜美腿一区二区三区| 久88久久88久久久| 精品女同一区二区| 蜜桃视频一区二区| 日韩一区二区中文字幕| 三级欧美在线一区| 91麻豆精品国产91| 天天综合网 天天综合色| 欧美日韩综合色| 亚洲小说春色综合另类电影| 一本久久a久久精品亚洲| 中文成人av在线| www.日本不卡| 亚洲免费av高清| 在线观看av不卡| 日韩国产在线观看| 日韩一级免费观看| 国内精品视频666| 久久精品在线观看| 99国产精品久久久久| 亚洲欧美综合网| 91麻豆精品秘密| 亚洲午夜视频在线| 制服丝袜国产精品| 激情综合一区二区三区| 国产欧美中文在线| 99精品久久只有精品| 亚洲精品videosex极品| 欧美日韩一区二区三区四区 | 成人午夜激情片| 亚洲男人的天堂av| 欧美男人的天堂一二区| 久久精品久久99精品久久| 国产亚洲精品资源在线26u| 成人免费的视频| 亚洲午夜在线视频| 欧美精品一区二区三区高清aⅴ| 丰满亚洲少妇av| 亚洲国产精品久久艾草纯爱| 精品电影一区二区| 91同城在线观看| 蜜桃一区二区三区在线| 亚洲国产精品99久久久久久久久| 一本久久精品一区二区| 久久精品国产成人一区二区三区| 国产精品私房写真福利视频| 欧美视频在线观看一区| 国产精品18久久久| 亚洲午夜精品网| 国产精品女人毛片| 在线播放视频一区| 福利一区福利二区| 日韩福利电影在线| 一区二区中文字幕在线| 日韩精品专区在线影院重磅| 成人看片黄a免费看在线| 午夜精品久久久久久不卡8050| 国产亚洲成年网址在线观看| 欧美性色欧美a在线播放| 国产夫妻精品视频| 日本在线观看不卡视频| 亚洲精品免费看| 久久蜜臀中文字幕| 91精品在线一区二区| 99久久免费视频.com| 久久91精品久久久久久秒播| 一区二区三区色| 欧美高清在线精品一区| 日韩三级精品电影久久久| 91色九色蝌蚪| 成人禁用看黄a在线| 精久久久久久久久久久| 三级欧美韩日大片在线看| 91精品国产aⅴ一区二区| 色噜噜狠狠色综合中国| 风间由美一区二区三区在线观看| 久久91精品国产91久久小草| 日本中文一区二区三区| 亚洲高清不卡在线观看| 亚洲欧美日韩中文字幕一区二区三区| 精品乱人伦一区二区三区| 欧美日韩你懂的| 91久久精品午夜一区二区| 一本久道中文字幕精品亚洲嫩| 不卡欧美aaaaa| 成人午夜在线播放| 国产91精品久久久久久久网曝门| 韩国中文字幕2020精品| 精彩视频一区二区三区 | 亚洲一区二区三区爽爽爽爽爽| 亚洲欧美综合另类在线卡通| 国产精品三级视频| 国产精品不卡一区二区三区| 中文字幕国产一区| 中国av一区二区三区| 国产精品无人区| 成人欧美一区二区三区1314| 国产精品久久久久久久久动漫 | 欧美老人xxxx18| 欧美这里有精品| 欧美日韩一区二区三区四区 | 精品一二三四区| 久久国产夜色精品鲁鲁99| 精品一区二区三区在线观看| 久88久久88久久久| 国产成人av电影在线观看| 国产凹凸在线观看一区二区| 丁香另类激情小说| 在线观看免费一区| 欧美精品一级二级| 精品福利一区二区三区| 国产精品区一区二区三区| 亚洲美女免费视频| 午夜精品123| 精品中文字幕一区二区| 成人性视频免费网站| 色综合久久99| 欧美一级日韩一级| 欧美国产日韩a欧美在线观看| 国产精品国模大尺度视频| 亚洲午夜久久久久久久久久久 | 精品88久久久久88久久久| 久久久久久毛片| 136国产福利精品导航| 亚洲一卡二卡三卡四卡无卡久久| 日韩高清欧美激情| 成人一区二区视频| 欧美三级电影在线看| 国产亚洲短视频| 午夜欧美在线一二页| 国产精品一级片在线观看| 色老综合老女人久久久| 日韩欧美中文一区二区| 中文字幕在线播放不卡一区| 偷拍与自拍一区| 成人激情午夜影院| 日韩一区二区免费高清| 亚洲欧洲精品天堂一级| 久久精品国产第一区二区三区| 色综合婷婷久久| 久久久久久一级片| 日日骚欧美日韩| 99久久精品国产观看| 欧美电影免费观看完整版| 亚洲欧美经典视频| 国产一区二区在线视频| 欧美日韩精品系列| 最新日韩在线视频| 国产麻豆精品久久一二三| 欧美性生活久久| ㊣最新国产の精品bt伙计久久| 国内精品久久久久影院一蜜桃| 欧美日本高清视频在线观看| 国产精品每日更新在线播放网址 | 26uuu精品一区二区三区四区在线| 亚洲色图清纯唯美| 国产a久久麻豆| 日韩你懂的在线观看| 亚洲成a人在线观看| 91小视频在线| 国产精品情趣视频| 成人中文字幕在线| 久久久久久久久久久久久夜| 美女视频免费一区| 欧美一区二区三区视频在线观看 | 欧美不卡一区二区三区| 五月天国产精品| 欧洲一区二区三区免费视频| 日本一区二区电影| 成人深夜视频在线观看| 久久久久久久综合色一本| 国产永久精品大片wwwapp| 日韩免费观看2025年上映的电影| 婷婷国产在线综合| 欧美一级二级三级乱码| 日韩不卡一二三区| 日韩一区二区三区四区五区六区 | 精品日韩一区二区三区免费视频|