简体   繁体   English

Android Mediaplayer :: ::如何检测流内容类型(音频或视频)

[英]Android Mediaplayer :: How to detect streaming content type (audio or video)

I am completely new to displaying streaming either audio or video content using media player. 我对使用媒体播放器显示流音频或视频内容完全陌生。

Somehow using post available here, i am able to display RTSP content(.3gp video) in my MediaPlayer implementation. 通过某种方式使用此处可用的帖子,我能够在MediaPlayer实现中显示RTSP内容(.3gp视频)。

How to identify streaming content is audio only stream or audio/video stream using MediaPlayer class or streaming link? 如何使用MediaPlayer类或流链接识别流内容是仅音频流还是音频/视频流?

I could be wrong here, but I believe there is only a MediaPLayer.OnInfoListner API available in Java to get information about the content stream being played. 我在这里可能是错的,但我相信Java中只有MediaPLayer.OnInfoListner API可用,以获取有关正在播放的内容流的信息。 Not sure of how helpful that API actually is though. 虽然不确定该API实际上有多有用。 You might also want to try stream scrapers(is what I believe they are called) to get stream data and see if there is both audio and video channel to make a determination. 您可能还想尝试使用流抓取器(我相信它们被称为)来获取流数据,并查看是否有音频和视频通道来确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM