Streaming Video From Android

心不动则不痛 提交于 2019-12-02 17:39:06
kks

Right click on the packet in Wireshark and select the decode as option. Then select rtp. Now you can see RTP packets in Wireshark.

user752512

I think that you can find the solution from the following code snippet:

package com.Videoplaying;

import android.app.Activity;  
import android.net.Uri;  
import android.os.Bundle;  
import android.widget.MediaController;  
import android.widget.VideoView; 

public class Video extends Activity {  
private MediaController mc;

/** Called when the activity is first created. */  
  @Override  
  public void onCreate(Bundle savedInstanceState) {  
  super.onCreate(savedInstanceState);  
  setContentView(R.layout.main);  
  VideoView vd = (VideoView) findViewById(R.id.VideoView);  
  String LINK = "http://daily3gp.com/vids/747.3gp";  
  mc = new MediaController(this);  
  mc.setMediaPlayer(vd);  
  Uri uri = Uri.parse(LINK);  
  vd.setMediaController(mc);  
  vd.setVideoURI(uri);  
  vd.requestFocus();  
  vd.start();  
 }  
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!