在 Android VideoView / MediaController 上禁用缓冲
我们正在 Samsung Galaxy Tab 上编写 Android 应用程序。我们有一个内窥镜(医疗手术摄像机)作为 DV 输入,我们希望将 DV 视频实时传输到平板电脑。 作为流媒体服务器,我们有 VLC 播放器和 RTSP 流。编码工作正常,并且通过网络(rtsp)流式传输到另一台计算机效果很好(<1s)。但是,如果我们在 Galaxy Tab 上打开 RTSP 流,则会出现 6-7 秒的延迟。 我尝试设置比特率编码(即使最低的比特率也不起作用,流媒体延迟结果相同)。所以我认为Android本身一定有某种网络缓存或视频缓存。
我用谷歌搜索,没有找到禁用甚至修改视频视图/媒体控制器上的缓存的方法。 有谁知道如何调整 Android 流视图吗?
编辑: 我发现一定是内部缓冲区大小限制了视频流速度。 LogCat 告诉我 AweSomePlayer 是负责的视频播放器。那么下一个问题:如何更改 Awesomeplayer 缓冲大小?我觉得是用cpp写的。如何通过 eclipse/java/android 访问此预编译代码?
We are writing an Android App on the Samsung Galaxy Tab. We have an Endoscope (Medical Surgery Camera) as DV-input and we want to live-stream the DV Video to the Tablet.
As a streaming server, we have the VLC player and a RTSP stream. The encoding works fine, and streaming over the network(rtsp) to another computer is good (< 1s). However, if we open the RTSP stream on the Galaxy Tab, there is a lag of 6-7s.
I have tried to set down the bitrate encoding (even the lowest doesn't work, the streaming lag results the same). So I think there must be some kind of network caching or video caching on the Android itself.
I googled and didn't find a way to disable or even modify caching on the videoview / mediacontroller.
Does anyone have an idea how to tweak the Android Streaming View?
Edit:
I figured out that it must be the internal buffer size that limits the video stream velocity. The LogCat tells me that AweSomePlayer is the Videoplayer in charge. So next question: How to change the awesomeplayer buffering size? I think it's written in cpp. How can I access this precompiled code via eclipse/java/android?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论