資源簡(jiǎn)介

代碼片段和文件信息
package?com.weedong.net.rtmp;
/**
?*?Copyright?(c)?2006?-?2008?Smaxe?Ltd?(www.smaxe.com).
?*?All?rights?reserved.
?*/
import?java.util.Map;
import?com.smaxe.uv.client.INetConnection;
import?com.smaxe.uv.client.INetStream;
import?com.smaxe.uv.client.License;
import?com.smaxe.uv.client.NetStream;
import?com.smaxe.uv.client.NetConnection;
import?com.weedong.net.rtmp.UltraNetConnection;
import?com.weedong.net.rtmp.UltraNetStream;
/**
?*?ExPlayStream
?-?{@link?UltraNetConnection}?usage?example.
?*??Note:?The?example?shows?how?to?‘play‘?server?stream.?The?played?stream
?*?is?saved?to?the?local?flv?file.
?*?
?*?@author?Andrei?Sochirca
?*/
public?final?class?Example?extends?object
{
????/**
?????*?Entry?point.
?????*?
?????*?@param?args
?????*/
????public?static?void?main(final?String[]?args)
????{
????????//?NOTE:
????????//?you?can?get?Evaluation?Key?at:
????????//?http://www.smaxe.com/order.jsf#request_evaluation_key
????????//?or?buy?at:
????????//?http://www.smaxe.com/order.jsf
//????????License.setKey(“24F11-06023-BE741-00D3A-798B8“);
????????
????????Example?app?=?new?Example();
????????
????????app.start();
????}
????
????/**
?????*?NetConnectionListener
?-?{@link?UltraNetConnection}?listener?implementation.
?????*/
????public?class?NetConnectionListener?extends?NetConnection.ListenerAdapter
????{
????????/**
?????????*?Constructor.
?????????*/
????????public?NetConnectionListener()
????????{
????????}
????????
????????@Override
????????public?void?onAsyncError(final?INetConnection?source?final?String?message?final?Exception?e)
????????{
????????????System.out.println(“NetConnection#onAsyncError:?“?+?message?+?“?“?+?e);
????????}
????????
????????@Override
????????public?void?onIOError(final?INetConnection?source?final?String?message)
????????{
????????????System.out.println(“NetConnection#onIOError:?“?+?message);
????????}
????????
????????@Override
????????public?void?onNetStatus(final?INetConnection?source?final?Mapject>?info)
????????{
????????????System.out.println(“NetConnection#onNetStatus:?“?+?info);
????????????
????????????final?object?code?=?info.get(“code“);
????????????
????????????if?(NetConnection.CONNECT_SUCCESS.equals(code))
????????????{
????????????}
????????????else
????????????{
????????????????disconnected?=?true;
????????????}
????????}
????}
????
????
????//?fields
????private?volatile?boolean?disconnected?=?false;
????
????/**
?????*?Constructor.
?????*/
????public?Example()
????{
????}
????
????/**
?????*?Starts?the?example.
?????*/
????public?void?start()
????{
????????final?UltraNetConnection?connection?=?new?UltraNetConnection();
????????
????????connection.addEventListener(new?NetConnectionListener());
connection.client(this);
????????
????????connection.connect(“rtmp://192.168.1.247/chatapp“?81330);
????????
????????//?wait?till?connected
????????while?(!connecti
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????10102??2012-05-11?17:14??UltraNetStream.java
?????文件?????235625??2012-05-11?17:14??juv-rtmp-client-1.5.10.jar
?????文件???????4513??2012-05-11?17:14??Example.java
?????文件???????9102??2012-05-11?17:14??UltraNetConnection.java
-----------?---------??----------?-----??----
???????????????259342????????????????????4
- 上一篇:Qrcode_swetake
- 下一篇:天氣預(yù)報(bào)JSP代碼
評(píng)論
共有 條評(píng)論