How to check SnapDragon 810 supports DASH
来源:互联网 发布:武汉seo大牛 编辑:程序博客网 时间:2024/05/16 10:40
Dynamic Adaptive Streaming over HTTP (DASH), also known as MPEG-DASH, is an adaptive bitrate streaming technique that enables high quality streaming of media content over the Internet delivered from conventional HTTP web servers. Similar to Apple's HTTP Live Streaming (HLS) solution, MPEG-DASH works by breaking the content into a sequence of small HTTP-based file segments, each segment containing a short interval of playback time of a content that is potentially many hours in duration, such as a movie or the live broadcast of a sports event.(wikipedia)
SnapDragon 810 Supports DASH?
We can find the Snapdragon 810 processor specs(link), as described in the table Specifications,SnapDragon 810 supports 4K capture and playback with H.264 (AVC) and H.265 (HEVC) formats and DASH.
How To Check?
Get Qualcomm license and download the source code for SnapDragon 810.Then you can find the source code path:
/external/mm-dash/
and
external/mm-dash/QCMediaPlayer/check the Android.mk then we know, QCMediaPlayer will be Compiled to qcmediaplayer.jar, and put into system/framework. QCMediaPlayer extends MediaPlayer, so we can write a QCMediaPlayer Demo to check whether Qualcomm's chip support DASH.
The key code is as follows:
import com.qualcomm.qcmedia.*;public class MainActivity extends Activity implements OnClickListener{ Button btnplay, btnstop, btnpause; SurfaceView surfaceView; QCMediaPlayer mediaPlayer; int position; public void onCreate(Bundle savedInstanceState) { //... ... mediaPlayer=new QCMediaPlayer(); surfaceView=(SurfaceView) this.findViewById(R.id.surfaceView); surfaceView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); surfaceView.getHolder().addCallback(new Callback() { @Override public void surfaceDestroyed(SurfaceHolder holder) { } @Override public void surfaceCreated(SurfaceHolder holder) { if (position>0) { try { play(); mediaPlayer.seekTo(position); position=0; } catch (Exception e) { } } } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } }); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btnplay: play(); break; case R.id.btnpause: if (mediaPlayer.isPlaying()) { mediaPlayer.pause(); }else{ mediaPlayer.start(); } break; case R.id.btnstop: if (mediaPlayer.isPlaying()) { mediaPlayer.stop(); } break; default: break; } } private void play() { try { mediaPlayer.reset(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); //mpd file path mediaPlayer.setDataSource("http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd"); mediaPlayer.setDisplay(surfaceView.getHolder()); mediaPlayer.prepare(); mediaPlayer.start(); } catch (Exception e) { } }}activity_main.xml
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <SurfaceView android:id="@+id/surfaceView" android:layout_width="fill_parent" android:layout_height="360px" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="horizontal" > <Button android:id="@+id/btnplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Play" /> <Button android:id="@+id/btnpause" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Pause" /> <Button android:id="@+id/btnstop" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Stop" /> </LinearLayout></LinearLayout>Android.mk
LOCAL_PATH:= $(call my-dir)include $(CLEAR_VARS)LOCAL_MODULE_TAGS := eng#need add jar supportsLOCAL_JAVA_LIBRARIES := qcmediaplayer# Only compile source java files in this apk.LOCAL_SRC_FILES := $(call all-java-files-under, src)LOCAL_PACKAGE_NAME := DASHDemoLOCAL_SDK_VERSION := currentinclude $(BUILD_PACKAGE)# Use the following include to make our test apk.include $(call all-makefiles-under,$(LOCAL_PATH))Remember to add network permission in AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />Finally, Compiled using mmm and installed the DASHDemo.apk to your SnapDragon 810 device.
Further More?
SONY released Multimedia for Android Library as an open source project to support DASH streaming. It's easy for application to support DASH streaming. More information please clickhere.
- How to check SnapDragon 810 supports DASH
- How to check if your hardware supports virtualization
- How to check srvconfig.
- How to delete Ubuntu Dash History
- How to check system information
- How to use authority check
- How to check cloud readiness?
- How to check linux version
- How to check CentOS version
- How to make Eclipse IDE supports JSF 2.0
- How to check digit of EAN
- how to check maxlength of textarea
- How to Check Missing Authorisation for User
- how to check errors automatic at word2007
- How to check health of Linux OS
- How to Check .net framework version installed
- How to check monkey test log
- How to check iscsi issue on Nexenta
- (总结)MySQL my.cnf参数配置优化详解(仅供参考)
- 【Android开发】基本组件-ListView(重要)
- 浅析socket短连接和长连接
- PDM转数据库类型,并导出建表脚本
- jquery.maxlength-min.js
- How to check SnapDragon 810 supports DASH
- Java中容易混淆的区别
- Web项目中静态代理和动态代理为基础的面向切面编程AOP
- 第一次面经
- 结构体里的string 要用new分配内存 。malloc只是分配内存。 new除了分配内存还会调用构造函数的
- ImageUtils
- POJ 2774 Long Long Message
- 【融信网】二周年广东花都分公司开业剪彩,注册进群抢红包啦
- EditText中关闭或者隐藏输入法