资源简介
代码片段和文件信息
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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 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
- 下一篇:天气预报JSP代码
相关资源
- Android模拟腾讯新闻客户端功能实现
- Android Studio的项目,实现拍照及相册自
- Android 手机防火墙源码
- Android USB摄像头源码
- android 小说阅读器demo
- Android应用源码安卓简单实用课程表项
- android 仿淘宝界面源代码
- android 为知 专业个人知识管理 笔记软
- android各种传感器
- adb push 中文文件
- 基于android平台的串口触摸屏软件
-
Android应用与fr
amework的socket通信 - 五子棋游戏设计毕业设计论文基于A
- 明日科技-android从入门到精通视频
- Android 后台实现录像,无页面
- petsas_rage_against_the_virtual_machine.pdf
- 酷派刷机Android_Download_客服专用_V1.1
- Androidstudio证书文件.zip
- android 自定义 模仿Launcher
- android根据经纬度获取地址
- android动态添加删除组件Layout
- android TCP server 和TCP client通信源码
- unity移动端截图后保存至相册
- android-support-multidex1.0.1.jar
- android-opencv已经编译好的JAR库
- Android读取文本文件的demo
- apkutil解析apk安装包的工具
-
音乐播发器界面 xm
l - Android声波通信改进版
- Android+SDK+2.0+与安装教程
评论
共有 条评论