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

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

?? tutorial.tex

?? 利用rtp庫實現實時語音傳送
?? TEX
字號:
\documentstyle[12pt,a4]{article}\begin{document}\author{Jori Liesenborgs (jori@lumumba.luc.ac.be)}\title{JRTPLIB (v2.8) - TUTORIAL}\date{6th January 2004}\maketitle\section{Getting started}\subsection{Creating a session}To 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:    \begin{verbatim}    #include "rtpsession.h"            int main(void)    {            RTPSession sess;                sess.Create(5000);        return 0;    }    \end{verbatim}\subsection{Errors}What 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:    \begin{verbatim}    #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;    }    \end{verbatim}\subsection{Other initialization}One 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:        \begin{verbatim}        sess.SetTimestampUnit(1.0/44100.0);        \end{verbatim}        \section{Sending and receiving data}\subsection{Specifying destinations}Before 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:        \begin{verbatim}        unsigned long addr = ntohl(inet\_addr("127.0.0.1"));        sess.AddDestination(addr,5000);        \end{verbatim}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.\subsection{Sending RTP packets}When 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:        \begin{verbatim}        sess.SendPacket("1234567890",10,0,false,10);        \end{verbatim}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        \begin{verbatim}        sess.SetDefaultPayloadType(0);        sess.SetDefaultMark(false);        sess.SetDefaultTimeStampIncrement(10);        \end{verbatim}you can do exactly what the previous example of SendPacket did, by simply doingthis:        \begin{verbatim}        sess.SendPacket("1234567890",10);        \end{verbatim}\subsection{Receiving RTP packets}First 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:        \begin{verbatim}        if (sess.GotoFirstSourceWithData())        {            do            {                RTPPacket *pack;                                pack = sess.GetNextPacket();                                // process packet                                delete pack;                            } while (sess.GotoNextSourceWithData());        }        \end{verbatim}For a description about the RTPPacket class, you should take a look at thereference manual (manual.txt).\subsection{Receive modes}There 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.\subsection{Multicasting}\subsubsection{Sending to a multicast group}To 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.\subsubsection{Receicing from a multicast group}You 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.\subsection{About sending and receiving RTCP packets}You 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.\section{Control information}\subsection{Own information}You 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,        \begin{verbatim}        rtpsess.SetLocalEMail("user@myhost.org",15);        \end{verbatim}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.\subsection{Other sessions' information}To 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'.\section{Handlers}You 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).\end{document}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人h版在线观看| 久久久一区二区| 亚洲午夜久久久久| 欧美午夜电影网| 日日夜夜精品视频免费| 在线观看亚洲成人| 一区二区高清视频在线观看| 99天天综合性| 亚洲在线免费播放| 精品视频1区2区| 日韩成人dvd| 精品电影一区二区三区| 蜜桃视频一区二区三区在线观看| 欧美一区二区三区小说| 韩日av一区二区| 欧美色爱综合网| 国精产品一区一区三区mba视频 | 婷婷夜色潮精品综合在线| 欧美日韩视频在线第一区| 黄色成人免费在线| 亚洲色图.com| 日韩一级高清毛片| 色综合欧美在线| 另类调教123区| 亚洲综合色婷婷| 久久男人中文字幕资源站| 91在线观看美女| 国产精品影视在线观看| 亚洲午夜精品在线| 国产精品成人免费精品自在线观看| 在线播放欧美女士性生活| 成人午夜视频免费看| 日韩高清一级片| 亚洲免费在线电影| 亚洲国产电影在线观看| 91麻豆精品国产综合久久久久久| 91伊人久久大香线蕉| 国产成人激情av| 久久精品国产免费| 美国毛片一区二区| 日韩电影免费在线看| 夜夜嗨av一区二区三区网页| 中文字幕在线观看不卡视频| 久久久午夜电影| 久久久蜜桃精品| 久久久噜噜噜久噜久久综合| 久久婷婷国产综合国色天香| 日韩欧美亚洲国产另类| 欧美一区二区三区四区视频| 欧美日韩免费一区二区三区视频| 一本在线高清不卡dvd| 91亚洲精品久久久蜜桃网站 | 亚洲午夜一区二区| 亚洲国产日日夜夜| 午夜精品久久久久久久久| 亚洲人成7777| 免费观看久久久4p| 国产一区不卡在线| 成人av第一页| 欧美色图第一页| 日韩欧美成人激情| 国产精品久久久久久户外露出 | 国产精品视频免费| 亚洲视频免费在线| 爽爽淫人综合网网站| 国产精品一区三区| 91在线小视频| 欧美成人性福生活免费看| 国产目拍亚洲精品99久久精品| 亚洲欧美日韩国产另类专区| 亚洲一卡二卡三卡四卡| 国产在线观看一区二区| 91蝌蚪porny成人天涯| 欧美二区在线观看| 中文字幕亚洲成人| 久久狠狠亚洲综合| 97久久精品人人做人人爽50路| 91精品国产高清一区二区三区 | 亚洲精品高清在线观看| 久久99精品国产91久久来源| 91丝袜美女网| 国产亚洲自拍一区| 美腿丝袜一区二区三区| 日本道免费精品一区二区三区| 国产亚洲精品福利| 久久精品国产第一区二区三区| 欧美午夜精品电影| 一区二区三区色| 91丨九色porny丨蝌蚪| 久久久精品黄色| 盗摄精品av一区二区三区| 久久先锋资源网| 国产在线精品一区二区三区不卡| 91精品国产高清一区二区三区蜜臀| 一区二区三区国产精品| 91性感美女视频| 一区二区日韩av| 色一情一乱一乱一91av| 一区二区三区成人| 91麻豆精品视频| 亚洲激情第一区| 欧美精品 国产精品| 日韩电影在线免费| 久久综合中文字幕| 国产精品一区在线观看你懂的| 日本一区二区视频在线| 99久久久国产精品| 亚洲国产一区在线观看| 7777精品久久久大香线蕉| 激情文学综合插| 中文字幕av一区二区三区免费看 | 99视频一区二区| 亚洲成人精品一区| 久久久久久久综合色一本| 97精品国产露脸对白| 亚洲国产cao| 精品国产髙清在线看国产毛片| 成人精品国产免费网站| 国产一区二区三区精品欧美日韩一区二区三区| 欧美日韩大陆一区二区| 狠狠色狠狠色综合| 18欧美亚洲精品| 久久综合色之久久综合| 色狠狠av一区二区三区| 国内精品视频一区二区三区八戒| 国产精品色婷婷久久58| 亚洲乱码日产精品bd| 欧美性感一类影片在线播放| 国产综合久久久久久久久久久久| 伊人夜夜躁av伊人久久| 久久精品在这里| 91精品国产手机| 欧美日韩精品免费观看视频 | 国产一区999| 美女性感视频久久| 亚洲精品国产精华液| 国产精品久久久久久久久免费桃花| 欧美大尺度电影在线| 欧美美女一区二区| 欧美日韩久久久一区| 在线观看成人小视频| 91在线无精精品入口| 成人高清在线视频| 成人va在线观看| 狠狠色狠狠色合久久伊人| 国产精品国产三级国产aⅴ原创| 精品国产污网站| 久久免费精品国产久精品久久久久| 这里只有精品视频在线观看| 欧美美女bb生活片| 2021中文字幕一区亚洲| 精品对白一区国产伦| 中文字幕不卡在线观看| 欧美国产丝袜视频| 最新成人av在线| 亚洲一区二区三区四区在线观看 | 一区二区三区日韩在线观看| 一区二区三区高清| 欧美一区二区三区免费| 视频一区免费在线观看| 色婷婷亚洲综合| 日韩在线播放一区二区| 亚洲国产精品久久久男人的天堂 | 99精品视频一区| 国产美女在线精品| 国产精品99久久久| 国产一区二区三区黄视频 | 成人免费看片app下载| 91精品国产综合久久福利| 精品国产免费一区二区三区四区| 久久久久久久久久久久久女国产乱 | 欧美精品一区二区三区蜜臀| 国产婷婷色一区二区三区| 亚洲视频中文字幕| 日本视频一区二区| 99re视频精品| 久久久久亚洲综合| 免费日韩伦理电影| 99国产精品久| 国产三级欧美三级日产三级99| 自拍偷自拍亚洲精品播放| 亚洲激情自拍偷拍| 国产91丝袜在线播放0| 欧美区在线观看| 亚洲综合免费观看高清在线观看| 精品一区二区三区欧美| 欧美在线短视频| 亚洲伦在线观看| 成人精品免费看| 久久精品视频一区二区| 国产一区二区三区最好精华液| 欧美疯狂做受xxxx富婆| 亚洲精品国产高清久久伦理二区| 成人动漫中文字幕| 国产欧美一区二区精品秋霞影院| 日本伊人精品一区二区三区观看方式 | 在线不卡中文字幕播放| 一区二区三区在线观看动漫| 91在线一区二区| 亚洲精品国产第一综合99久久|