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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? receiver.java

?? It is Java for SIP phone
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * Receiver.java * * Created on November 19, 2003, 10:38 AM */package gov.nist.applet.phone.media.receiver;import java.io.*;import java.awt.*;import java.net.*;import java.util.Vector;import javax.media.*;import javax.media.rtp.*;import javax.media.rtp.event.*;import javax.media.protocol.DataSource;import javax.media.format.AudioFormat;import javax.media.format.VideoFormat;import javax.media.Format;import javax.media.control.BufferControl;import javax.media.control.MpegAudioControl;import javax.media.control.FrameRateControl;import gov.nist.applet.phone.media.util.*;import gov.nist.applet.phone.media.transmitter.*;import gov.nist.applet.phone.media.protocol.transport.*;/** * Class to receive RTP transmission using the JMF RTP API. * @author DERUELLE Jean */public class Receiver implements ReceiveStreamListener, SessionListener, ControllerListener{    RTPManager mgrs[] = null;    Vector playerWindows = null;    private static boolean bye=false;    boolean dataReceived = false;        SessionDescription sessionDescription=null;        Transmit transmitter=null;    Socket socketRTPReceiver=null;    Socket socketRTCPReceiver=null;    /**     * Constructor for Receiver      * @param session - the concatened parameters of the session stored in a string     */    public Receiver(String session) throws IllegalArgumentException{        playerWindows = new Vector();        //the session Label containing the address, the port and the Time To Live        try {           //create a session label on the session given in argument           // and parse the session address.           sessionDescription=new SessionDescription(session);           sessionDescription.setAudioFormat("mpegaudio/rtp, 48000.0 hz, 16-bit, mono");           sessionDescription.setVideoFormat("h263/rtp");           sessionDescription.setTransportProtocol("tcp");           if(sessionDescription.getVideoFormat()!=null &&                 sessionDescription.getAudioFormat()!=null)               mgrs=new RTPManager[2];           else if (sessionDescription.getVideoFormat()!=null ||                sessionDescription.getAudioFormat()!=null)               mgrs=new RTPManager[1];                   } catch (IllegalArgumentException e) {            System.err.println("Failed to parse the session address given: " + session);            throw e;        }    }    /**     * Constructor for Receiver     * @param session - the session Description containing the address, the port, the Time To Live     * the video format, the audio format and the transport protocol     */    public Receiver(SessionDescription session,Transmit transmitter) throws IllegalArgumentException{        this.sessionDescription=session;        if(sessionDescription.getVideoFormat()!=null &&             sessionDescription.getAudioFormat()!=null)           mgrs=new RTPManager[2];       else if (sessionDescription.getVideoFormat()!=null ||            sessionDescription.getAudioFormat()!=null)           mgrs=new RTPManager[1];        playerWindows = new Vector();        this.transmitter=transmitter;    }        /**     * Initialize the RTP Mamagers an wait for the data     * There is one by stream     * @return false if the rtpmanagers can't be initialized or if no data was received     */    protected boolean initialize(String localIpAddress) {		if(mgrs==null)			return false;        try {            for(int i=0;i<mgrs.length;i++){                if(i==0){                //Creates a new instance of RTPManager                //which will allow us to create, maintain and close an RTP session.                mgrs[i] = (RTPManager) RTPManager.newInstance();                // create the local endpoint for the local interface on the port given in parameter                int localPort=sessionDescription.getLocalPort()+2*i;                // specify the remote endpoint of this unicast session on the port given in parameter                int destPort=sessionDescription.getDestinationPort()+2*i;                SessionAddress localAddr = new SessionAddress(                	InetAddress.getByName(localIpAddress),                	localPort);				mgrs[i].addSessionListener(this);				// add the ReceiveStreamListener to receive data				mgrs[i].addReceiveStreamListener(this);                // initialize the RTPManager, so the session                if(sessionDescription.getTransportProtocol().toLowerCase().equals("tcp")){                    if(transmitter==null){                        TCPConnectionListener listener;                        TCPConnectionListener ctrlListener;                                                int rtcpLocalPort=localPort+1;                            try {	                                //Start the serverSocket for the RTP                             ServerSocket serverSocket = new ServerSocket(localPort);                            System.out.println("TCP Listening Point created on port: "+localPort);                            listener=new TCPConnectionListener(serverSocket,  false);                            listener.start();                        } catch(SocketException e) {                            System.out.println(localPort+","+destPort);                            throw new IOException(e.getMessage());                        }                                try{                                                        //Start the serverSocket for the RTCP                             ServerSocket ctrlServerSocket = new ServerSocket(rtcpLocalPort);                            System.out.println("TCP Control Listening Point created on port: "+rtcpLocalPort);                            ctrlListener=new TCPConnectionListener(ctrlServerSocket,  true);                            ctrlListener.start();                        } catch(SocketException e) {                            System.out.println(rtcpLocalPort+","+destPort);                            throw new IOException(e.getMessage());                        }                                //Wait for connections                        socketRTPReceiver=listener.waitForConnections();                        socketRTCPReceiver=ctrlListener.waitForConnections();                                                                 }                    else{                        socketRTPReceiver=transmitter.getSocketRTPTransmit();                        socketRTCPReceiver=transmitter.getSocketRTCPTransmit();                    }                    mgrs[i].initialize(new TCPReceiveAdapter(socketRTPReceiver,socketRTCPReceiver));                }                else{					System.out.println("Init UDP Transmitter");           										mgrs[i].initialize(localAddr);					                    }                                                  			    InetAddress remoteIPAddress = InetAddress.getByName(sessionDescription.getAddress());                SessionAddress remoteDestinationAddressAndPort = new SessionAddress(remoteIPAddress, destPort);                // You can try out some other buffer size to see                // if you can get better smoothness.                BufferControl bc = (BufferControl) mgrs[i].getControl(                        "javax.media.control.BufferControl");                if (bc != null){                        if(i==0){                                bc.setBufferLength(0);                                //bc.setMinimumThreshold(0);                                System.out.println("Threshold enabled : "+bc.getEnabledThreshold());                                System.out.println("buf length : "+bc.getBufferLength());                                System.out.println("minimum Threshold : "+bc.getMinimumThreshold());                        }                        else{                                bc.setBufferLength(BufferControl.MAX_VALUE);                                //bc.setMinimumThreshold(BufferControl.MAX_VALUE);                                System.out.println("buf length : "+bc.getBufferLength());                                System.out.println("minimum Threshold : "+bc.getMinimumThreshold());                        }                }				if(sessionDescription.getTransportProtocol().toLowerCase().equals("udp")){										SessionAddress destAddr = new SessionAddress(							InetAddress.getByName(sessionDescription.getAddress()),							 destPort);                					mgrs[i].addTarget(destAddr);				}                System.out.println("  - Open RTP session for: Address: " + sessionDescription.getAddress() +                                                   " localPort: " + localPort +                                                    " destPort : " + destPort +                                                                                                     " Time To Live: " + sessionDescription.getTimeToLive());                }            }        } catch (Exception e){            System.err.println("Cannot create the RTP Session: ");			e.printStackTrace();            return false;        }        // Wait for data to arrive before moving on.        /*long then = System.currentTimeMillis();        long waitingPeriod = 30000;  // wait for a maximum of 30 secs.        try{            synchronized (dataSync) {                while (!dataReceived && System.currentTimeMillis() - then < waitingPeriod) {                    if (!dataReceived)                        System.err.println("  - Waiting for RTP data to arrive...");                    dataSync.wait(1000);                }            }        } catch (Exception e) {}        if (!dataReceived) {            System.err.println("No RTP data was received.");            close();            return false;        }*/        System.err.println("  - Waiting for RTP data to arrive...");        return true;    }    /**     * Close the players and the session managers.     */    protected void close() {        for (int i = 0; i < playerWindows.size(); i++) {            try {                ((PlayerWindow)playerWindows.elementAt(i)).close();            } catch (Exception e) {}        }        playerWindows.removeAllElements();        //close the RTP session.        for(int i=0;i<mgrs.length;i++){            if (mgrs[i] != null) {                mgrs[i].removeTargets( "Closing session from Receiver");                mgrs[i].dispose();                mgrs[i] = null;            }        }    }    PlayerWindow find(Player p) {        for (int i = 0; i < playerWindows.size(); i++) {            PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);            if (pw.player == p)                return pw;        }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产曰批免费观看久久久| 国产亚洲一区二区在线观看| 国产精品久久看| av中文字幕一区| 中文字幕在线观看不卡| 不卡的av在线| 一区二区三区.www| 欧美日韩中文字幕一区| 亚洲第一会所有码转帖| 欧美一区二区三区四区视频| 日韩精品一二三区| 久久综合色8888| a4yy欧美一区二区三区| 亚洲免费在线视频一区 二区| 在线观看免费亚洲| 裸体歌舞表演一区二区| 国产日韩欧美综合一区| 色综合久久久网| 日本视频中文字幕一区二区三区| 26uuu国产日韩综合| 成人动漫一区二区| 香蕉久久夜色精品国产使用方法 | 亚洲国产日韩精品| 日韩午夜在线观看| 丁香六月久久综合狠狠色| 亚洲伦在线观看| 91精品国产品国语在线不卡| 国产成人精品影视| 午夜一区二区三区视频| 国产欧美一区在线| 欧美日韩的一区二区| 国产精品一二三四五| 一区二区视频在线| 精品国产制服丝袜高跟| 91免费观看国产| 精品一区二区三区久久| 亚洲乱码国产乱码精品精小说| 欧美不卡一区二区三区| 一本久久a久久精品亚洲| 久久精品国产99久久6| 亚洲欧美成人一区二区三区| 日韩午夜激情免费电影| 99热99精品| 国内不卡的二区三区中文字幕| 亚洲欧美日韩久久精品| 亚洲精品一区在线观看| 欧美无砖专区一中文字| 国产成人啪午夜精品网站男同| 三级在线观看一区二区 | 精品国产凹凸成av人导航| 91亚洲国产成人精品一区二三 | 国产一区二区三区黄视频 | 久久精品一区蜜桃臀影院| 91官网在线观看| 国产成人免费视| 久久超级碰视频| 午夜影院久久久| 亚洲另类一区二区| 国产精品嫩草影院com| 精品久久久久久久人人人人传媒| 在线看国产日韩| 99国产精品久久久久久久久久久| 国产麻豆精品在线| 美女视频黄 久久| 视频在线观看一区| 亚洲尤物视频在线| 亚洲乱码国产乱码精品精98午夜| 国产精品久久久久天堂| 久久久久国产精品麻豆ai换脸 | 精品对白一区国产伦| 在线观看91精品国产麻豆| 欧洲色大大久久| 色哟哟日韩精品| 一本大道久久a久久综合| av网站免费线看精品| 成人在线综合网站| 懂色av噜噜一区二区三区av| 国精品**一区二区三区在线蜜桃| 蜜桃久久精品一区二区| 日本少妇一区二区| 裸体健美xxxx欧美裸体表演| 毛片av中文字幕一区二区| 欧美aaaaaa午夜精品| 另类小说图片综合网| 秋霞成人午夜伦在线观看| 日本不卡一区二区| 久久精品国产精品青草| 国产精品中文有码| 国产999精品久久久久久| 成人免费毛片嘿嘿连载视频| 99精品在线观看视频| 色婷婷亚洲综合| 欧美探花视频资源| 91精品国产综合久久香蕉的特点 | 午夜欧美大尺度福利影院在线看| 亚洲一区二区精品3399| 婷婷亚洲久悠悠色悠在线播放| 日日夜夜免费精品视频| 蜜臀av在线播放一区二区三区| 国内精品久久久久影院薰衣草 | 亚洲一区在线观看免费| 香蕉乱码成人久久天堂爱免费| 美女网站色91| 国产成人综合自拍| 91在线视频在线| 欧美疯狂做受xxxx富婆| 欧美mv和日韩mv国产网站| 久久九九久精品国产免费直播| 国产精品久久久久毛片软件| 一区二区三区四区精品在线视频| 水蜜桃久久夜色精品一区的特点| 国内精品视频666| 91国偷自产一区二区三区成为亚洲经典| 欧美老肥妇做.爰bbww| 久久综合九色综合欧美就去吻| 国产精品久久综合| 五月激情综合网| 懂色一区二区三区免费观看| 欧美伊人久久久久久久久影院 | 成人免费视频caoporn| 欧美三级一区二区| 亚洲精品在线观看网站| 亚洲欧美乱综合| 韩国视频一区二区| 色女孩综合影院| 精品处破学生在线二十三| 亚洲欧美日韩电影| 激情av综合网| 在线观看成人小视频| 久久理论电影网| 日韩精品乱码av一区二区| 国产·精品毛片| 欧美精品久久天天躁| 国产女人水真多18毛片18精品视频| 亚洲在线观看免费视频| 国产成人午夜视频| 日韩欧美国产综合在线一区二区三区| 国产精品欧美极品| 九色|91porny| 欧美视频日韩视频| 综合中文字幕亚洲| 精品一区二区日韩| 欧美日韩国产色站一区二区三区| 国产亚洲短视频| 麻豆精品一区二区| 在线精品视频一区二区| 国产精品视频免费| 另类小说色综合网站| 欧美日韩成人激情| 亚洲女子a中天字幕| 国产精品亚洲午夜一区二区三区 | 亚洲精品一区二区三区蜜桃下载| 夜夜亚洲天天久久| 99久久99久久久精品齐齐| 久久久国产精品午夜一区ai换脸| 日本中文字幕不卡| 欧美视频在线一区| 一区二区三区精品在线| 波多野结衣亚洲| 国产欧美日韩在线看| 国产真实乱对白精彩久久| 91精品国产综合久久久蜜臀粉嫩 | 波波电影院一区二区三区| 久久这里只有精品视频网| 免费av成人在线| 欧美一区二区三区在| 肉丝袜脚交视频一区二区| 欧美日韩国产另类不卡| 亚洲一区二区三区四区五区黄| 91免费精品国自产拍在线不卡| 中文字幕中文字幕中文字幕亚洲无线| 国产在线不卡视频| 久久婷婷成人综合色| 国内成人免费视频| 国产欧美一区二区精品性| 国产成人a级片| 国产精品你懂的| 97超碰欧美中文字幕| 亚洲区小说区图片区qvod| 色偷偷88欧美精品久久久| 亚洲精品亚洲人成人网在线播放| 色呦呦一区二区三区| 一区二区三区四区蜜桃| 欧美日韩午夜精品| 日韩电影在线一区| 欧美mv日韩mv亚洲| 成人免费视频免费观看| 亚洲裸体在线观看| 欧美日韩三级视频| 奇米影视一区二区三区| 337p粉嫩大胆色噜噜噜噜亚洲 | 99久久精品国产麻豆演员表| 自拍偷拍欧美激情| 欧美日韩专区在线| 麻豆91小视频| 国产欧美精品在线观看| 色综合久久88色综合天天免费| 亚洲愉拍自拍另类高清精品| 日韩一级免费一区| 懂色av一区二区三区蜜臀|