资源简介
ts推流工具,udp推流工具,内附实用的使用说明书.....
代码片段和文件信息
package com.amlogic.switchchannel;
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MotionEvent;
import android.widget.Toast;
import android.widget.VideoView;
public class MainActivity extends Activity
{
public static String[] url = new String[3];
{
url[0] = “udp://@239.1.1.1:10001“;
url[1] = “udp://@239.1.1.1:10002“;
url[2] = “udp://@239.1.1.1:10003“;
}
private VideoView video = null;
private int chanelIndex = 0;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
video = (VideoView) findViewById(R.id.video);
video.setVideoURI(Uri.parse(url[chanelIndex]));
//String uuu = “http://221.181.100.149/3000120541.m3u8?stbId=004401FF002100701326002468C005A5&Contentid=5068253659616166748&livemode=2&starttime=20140416T160000.00Z&channel-id=wasusyt“;
//video.setVideoURI(Uri.parse(uuu));
video.start();
}
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main menu);
return true;
}
public boolean onkeydown(int keyCode KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_DPAD_UP)
{
backChannel();
Toast.makeText(this chanelIndex+“ url: “+url[chanelIndex] Toast.LENGTH_LONG).show();
//video.seekTo(1000);
//Toast.makeText(this “seekTo :1000“ Toast.LENGTH_LONG).show();
}
else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN)
{
nextChannel();
Toast.makeText(this chanelIndex+“ url: “+url[chanelIndex] Toast.LENGTH_LONG).show();
//video.seekTo(20000);
//Toast.makeText(this “seekTo :20000“ Toast.LENGTH_LONG).show();
}
return super.onkeydown(keyCode event);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
// TODO Auto-generated method stub
if(event.getAction() == MotionEvent.ACTION_DOWN){
nextChannel();
Toast.makeText(this chanelIndex+“ url: “+url[chanelIndex] Toast.LENGTH_LONG).show();
}
return super.onTouchEvent(event);
}
private void nextChannel(){
chanelIndex = (chanelIndex + 1) % 3;
video.setVideoURI(Uri.parse(url[chanelIndex]));
video.start();
}
private void backChannel(){
chanelIndex = (chanelIndex + 3 - 1) % 3;
video.setVideoURI(Uri.parse(url[chanelIndex]));
video.start();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-07-09 12:59 TSFileSender\
文件 28672 2010-09-10 10:39 TSFileSender\DVTReTran.dll
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\
文件 328 2015-02-15 15:11 TSFileSender\SwitchChannel\Android.mk
文件 1036 2015-02-15 15:13 TSFileSender\SwitchChannel\AndroidManifest.xm
目录 0 2018-07-09 13:02 TSFileSender\SwitchChannel\assets\
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\libs\
文件 484258 2014-03-08 17:06 TSFileSender\SwitchChannel\libs\android-support-v4.jar
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\drawable-hdpi\
文件 7658 2014-03-08 17:06 TSFileSender\SwitchChannel\res\drawable-hdpi\ic_launcher.png
目录 0 2018-07-09 13:02 TSFileSender\SwitchChannel\res\drawable-ldpi\
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\drawable-mdpi\
文件 3777 2014-03-08 17:06 TSFileSender\SwitchChannel\res\drawable-mdpi\ic_launcher.png
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\drawable-xhdpi\
文件 12516 2014-03-08 17:06 TSFileSender\SwitchChannel\res\drawable-xhdpi\ic_launcher.png
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\drawable-xxhdpi\
文件 24777 2014-03-08 17:06 TSFileSender\SwitchChannel\res\drawable-xxhdpi\ic_launcher.png
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\layout\
文件 412 2014-03-08 17:13 TSFileSender\SwitchChannel\res\layout\activity_main.xm
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\menu\
文件 263 2014-03-08 17:06 TSFileSender\SwitchChannel\res\menu\main.xm
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\values\
文件 220 2014-03-08 17:06 TSFileSender\SwitchChannel\res\values\dimens.xm
文件 230 2015-02-15 15:28 TSFileSender\SwitchChannel\res\values\strings.xm
文件 697 2014-03-08 17:06 TSFileSender\SwitchChannel\res\values\st
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\values-sw600dp\
文件 203 2014-03-08 17:06 TSFileSender\SwitchChannel\res\values-sw600dp\dimens.xm
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\values-sw720dp-land\
文件 277 2014-03-08 17:06 TSFileSender\SwitchChannel\res\values-sw720dp-land\dimens.xm
目录 0 2018-07-09 12:59 TSFileSender\SwitchChannel\res\values-v11\
............此处省略15个文件信息
相关资源
- 时间敏感网络TSN
- 北大青鸟 Bootstrap 微票儿 项目_学习部
- 点阵字库生成工具font-generator&ts3;
- echarts 最全地图json加demo
- Foundations_of_Analog_and_Digital_Electronic_C
- jts-1.12包含gis的大部分空间分析方法
- tsmc18rf_pdk_v13 压缩包3
- Matrix Mathematics - TheoryFactsand Formulas 2
- visual components软件中文版帮助文档
- Industrial_Gadgets_ActiveX_Pro
- Linear Algebra and Its Applications 5th David
- FastStone_Capture8.4-中文绿色.zip
- Google Cloud Platform for Architects Design an
- struts2基于酒店的后台管理系统
- UniFalcon Components Package (Unigui)
- Software Requirements 3rd Edition
- Enfocus PitStop Pro 10破解补丁+高清PDF图文
- 设计模式:可复用面向对象软件的基
- Analysis and Design of Analog Integrated Circu
- NIITsm3在线考试切图有答案
- struts2+spring2.5+hibernate3.2中文开发手册
- The Econometrics of Financial Markets
- (启示录)Inspired: How To Create Product
- Mastering OpenCV with Practical Computer Visio
- Design.of.Analog.CMOS.Integrated.Circuits.2nd.
- 支持高版本谷歌播放rtsp的插件vxg me
- Jetson_TX2开发资料
- Struts2漏洞2.0.xx升级为Struts-2.5.12步骤
- Bootstrap v3.3.5 中文文档 chm
- 银行管理系统(Struts2+hibernate)
评论
共有 条评论