搜尋此網誌

2012年1月4日

Code snippet of Android (Hashtable, Enumeration)

public class MyTemplateActivity extends Activity {

     private String streamingHTTPURL1 = "https://sites.google.com/site/xxx/1.mp4";
     private String streamingHTTPURL2 = "http://indiespectrum.com:9000/";
     private String streamingRTSPURL = "rtsp://wow.eleden.com:1935/livegntv/livestream";
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        Hashtable<String, String> playTable = new Hashtable<String, String>();
       
        playTable.put("Playlist1", streamingHTTPURL1);
        playTable.put("Playlist2", streamingHTTPURL2);
        playTable.put("Playlist3", streamingRTSPURL);
        
        Enumeration<String> em = playTable.keys();
        while(em.hasMoreElements()) {
          String value = (String) em.nextElement();
          Log.w("test","" + playTable.get(value));
        }
       
        Log.w("test","Done!!");      
     }
}

[Code snippet] Android video streaming / Android 視訊串流

Android streaming player test

測試幾個 Android market 裡面的 media player 是否有 support audio / video streaming
要找到特定協定的 URL 挺困難的,還好有些軟體裡面可以查詢到一些
目前看到最容易找到的是 StreamMediaPlayer
但很奇怪的是,都不能播放我 local 架設的 VLC server (127.0.0.1:xxxx)。若有成功在更新

Player
Streaming
External Plug-ins
rtsp://wow.eleden.com:1935/livegntv/livestream
My VLC
 
Asti Media Player
X
 
 
?
 
 
Dice Player
X
V
 
?
 
 
Doga Player
V
 
V
?
X
 
lukluk
-
 
 
?
 
 
megaplayer
X
 
 
?
 
 
MoboPlayer
X
 
 
?
 
 
MX Video Player
V
V
V
?
X
 
QissMusic
V
 
V
?
X
 
StreamMediaPlayer
V
 
X
?
X
Many URLs?
Stream Media Player
V
 
V
V
X
 
VLC Direct
V
 
X
V
X
 
Vplayer
X
V
 
 
 
 
yxplayer
V
(Need registeration)
 
 
 
 
Meridian (子午)
X
 
 
 
 
 
達龍
V
 
 
X