开发者

How to play media player with non-file and non-rtsp source?

开发者 https://www.devze.com 2022-12-20 08:42 出处:网络
We\'ve a mpeg4 source that we would like to play in the media player. Our source is not in a file or on an rtsp server. It is hand coded to generate mpeg4 source on the fly. Imagine the data is coming

We've a mpeg4 source that we would like to play in the media player. Our source is not in a file or on an rtsp server. It is hand coded to generate mpeg4 source on the fly. Imagine the data is coming from an unix pipe stream instead of rtsp or a file. How can I use that stream in medi开发者_运维技巧a player?


Android does not presently support streaming video other than through HTTP and RTSP, sorry.


I think you can use MediaPlayer.setDataSource( FileDescriptor fd ) with the pipe.
Or with the combination of both LocalSocket and LocalServerSocket.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号