To read rtsp streaming has been discussed a lot,but still not
solved .Now android 1.5 realised,can rtsp streaming be played in
android?
the method setDateSource seems provide a way to receive rtsp
streaming.

public void setDataSource (String path)

Sets the data source (file-path or http/rtsp URL) to use.
Parameters
path    the path of the file, or the http/rtsp URL of the stream you want
to play
Throws
IllegalStateException   if it is called in an invalid state
IOException
IllegalArgumentException

who knows how to use it?i wrote

MediaPlayer mp =new MediaPlayer();
        try {
                        mp.setDataSource("rtsp://live.cri.cn/pop");
                        mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
                        mp.prepare();
                        mp.start();
                } catch (IllegalArgumentException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IllegalStateException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

but didn't work.May be the parameter in setAudioStreamType is
wrong....Who knows??please help me .Thank you.~~
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to