如何创建与媒体播放器的InputStream实例?
How to I create mediaplayer instance with inputstream?
我只看到4功能的setDataSource。而且也没有功能获得的InputStream?
它是一个必须要使用的FileDescriptor
到媒体播放器?它似乎很基本的。但是,我couldnot找到一种方法。在J2ME中,有一个函数Manager.createPlayer(InputStream中)
。你也可以使用输入流来创建一个媒体播放器。有没有一种方法来创建一个像J2ME一个媒体播放器?
I see only 4 function for setDataSource. And there is no function getting inputstream ?
is it a must to use FileDescriptor
to mediaplayer ? It seems so basic. but, I couldnot find a way. In j2me, there is a function that Manager.createPlayer(InputStream)
. And you can use inputstream to create a media player. Is there a way to create a mediaplayer like j2me ?
一种方法可以写你流一个文件
,然后把它交给了的MediaPlayer
进行播放。
One approach can be to write your stream to a File
and then give it to the MediaPlayer
for playback.