用来测试JMF的,使用JMF流化本地文件,然后发送出去,接受后播放
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 524 2012-07-10 16:59 JMFTest.classpath
文件 383 2012-07-10 16:58 JMFTest.project
文件 598 2012-07-10 16:58 JMFTest.settingsorg.eclipse.jdt.core.prefs
文件 1405 2012-07-11 10:12 JMFTestinAVReceive2$PlayerPanel.class
文件 1165 2012-07-11 10:12 JMFTestinAVReceive2$PlayerWindow.class
文件 1753 2012-07-11 10:12 JMFTestinAVReceive2$SessionLabel.class
文件 9558 2012-07-11 10:12 JMFTestinAVReceive2.class
文件 962 2012-07-11 10:12 JMFTestinAVTransmit2$StateListener.class
文件 10617 2012-07-11 10:12 JMFTestinAVTransmit2.class
文件 71644 2012-07-10 16:58 JMFTestlibcustomizer.jar
文件 1904171 2012-07-10 16:58 JMFTestlibjmf.jar
文件 39078 2012-07-10 16:58 JMFTestlibmediaplayer.jar
文件 63515 2012-07-10 16:58 JMFTestlibmultiplayer.jar
文件 14883 2012-07-11 10:12 JMFTestsrcAVReceive2.java
文件 16209 2012-07-11 10:12 JMFTestsrcAVTransmit2.java
目录 0 2012-07-11 11:21 JMFTest.settings
目录 0 2012-07-11 11:21 JMFTestin
目录 0 2012-07-11 11:21 JMFTestlib
目录 0 2012-07-11 11:21 JMFTestsrc
目录 0 2012-07-11 11:21 JMFTest
----------- --------- ---------- ----- ----
2136465 20
/*
* @(#)AVReceive2.java 1.3 01/03/13
*
* Copyright (c) 1999-2001 Sun Microsystems Inc. All Rights Reserved.
*
* Sun grants you (“Licensee“) a non-exclusive royalty free license to use
* modify and redistribute this software in source and binary code form
* provided that i) this copyright notice and license appear on all copies of
* the software; and ii) Licensee does not utilize the software in a manner
* which is disparaging to Sun.
*
* This software is provided “AS IS“ without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS REPRESENTATIONS AND WARRANTIES INCLUDING ANY
* IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR
* NON-INFRINGEMENT ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
* LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING MODIFYING
* OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
* LICENSORS BE LIABLE FOR ANY LOST REVENUE PROFIT OR DATA OR FOR DIRECT
* INDIRECT SPECIAL CONSEQUENTIAL INCIDENTAL OR PUNITIVE DAMAGES HOWEVER
* CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY ARISING OUT OF THE USE OF
* OR INABILITY TO USE SOFTWARE EVEN IF SUN HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* This software is not designed or intended for use in on-line control of
* aircraft air traffic aircraft navigation or aircraft communications; or in
* the design construction operation or maintenance of any nuclear
* facility. Licensee represents and warrants that it will not use or
* redistribute the Software for such purposes.
*/
import java.io.*;
import java.awt.*;
import java.net.*;
import java.awt.event.*;
import java.util.Vector;
import javax.media.*;
import javax.media.rtp.*;
import javax.media.rtp.event.*;
import javax.media.rtp.rtcp.*;
import javax.media.protocol.*;
import javax.media.protocol.DataSource;
import javax.media.format.AudioFormat;
import javax.media.format.VideoFormat;
import javax.media.Format;
import javax.media.format.FormatChangeEvent;
import javax.media.control.BufferControl;
/**
* AVReceive2 to receive RTP transmission using the new RTP API.
*/
public class AVReceive2 implements ReceiveStreamListener SessionListener
ControllerListener
{
String sessions[] = null;
RTPManager mgrs[] = null;
Vector playerWindows = null;
boolean dataReceived = false;
object dataSync = new object();
public AVReceive2(String sessions[]) {
this.sessions = sessions;
}
protected boolean initialize() {
try {
InetAddress ipAddr;
SessionAddress localAddr = new SessionAddress();
SessionAddress destAddr;
mgrs = new RTPManager[sessions.length];
playerWindows = new Vector();
SessionLabel session;
// Open the RTP sessions.
for (int i = 0; i < sessions.length; i++) {
// Parse the session a
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 524 2012-07-10 16:59 JMFTest.classpath
文件 383 2012-07-10 16:58 JMFTest.project
文件 598 2012-07-10 16:58 JMFTest.settingsorg.eclipse.jdt.core.prefs
文件 1405 2012-07-11 10:12 JMFTestinAVReceive2$Pla
文件 1165 2012-07-11 10:12 JMFTestinAVReceive2$Pla
文件 1753 2012-07-11 10:12 JMFTestinAVReceive2$SessionLabel.class
文件 9558 2012-07-11 10:12 JMFTestinAVReceive2.class
文件 962 2012-07-11 10:12 JMFTestinAVTransmit2$StateListener.class
文件 10617 2012-07-11 10:12 JMFTestinAVTransmit2.class
文件 71644 2012-07-10 16:58 JMFTestlibcustomizer.jar
文件 1904171 2012-07-10 16:58 JMFTestlibjmf.jar
文件 39078 2012-07-10 16:58 JMFTestlibmediapla
文件 63515 2012-07-10 16:58 JMFTestlibmultipla
文件 14883 2012-07-11 10:12 JMFTestsrcAVReceive2.java
文件 16209 2012-07-11 10:12 JMFTestsrcAVTransmit2.java
目录 0 2012-07-11 11:21 JMFTest.settings
目录 0 2012-07-11 11:21 JMFTestin
目录 0 2012-07-11 11:21 JMFTestlib
目录 0 2012-07-11 11:21 JMFTestsrc
目录 0 2012-07-11 11:21 JMFTest
----------- --------- ---------- ----- ----
2136465 20
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)