自定义RTSP媒体源状态转换错误 [英] Custom RTSP Media Source state transition error

查看:82
本文介绍了自定义RTSP媒体源状态转换错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我写过一个RTSP媒体资源,除了一个状态转换问题外,工作正常。 (视频播放正常,可以搜索,暂停,简历等。)

I have written an RTSP Media Source that is working perfectly except for one state transition issue. (The Video plays fine, can seek, pause, resume, etc).

问题出现在以下情况。


  1. 加载 - 工作正常
  2. 开始 - 正常工作
  3. 暂停 - 工作正常
  4. 寻找新位置(MediaSession在内部发送停止和开始事件,
    刷新数据并重置时间戳)  - 工作正常
  5. 开始  - 工作正常
  6. 停止(将演示时钟重置为0并"重新点回"视频,刷新
    数据并重置时间戳)  - 工作正常
  7. 再次尝试播放视频会导致MediaSource
    饥饿
    ...通过样本请求检索的所有缓冲数据基本上被转储,100多个缓冲样本和  (没有播放视频),直到最后一个演示时间b在寻求到达之前
  1. Load - works fine
  2. Start - works fine
  3. Pause - works fine
  4. Seek to new location (the MediaSession sends a Stop and Start Event Internally, Flushes data and resets timestamps) - works fine
  5. Start - works fine
  6. Stop (resets the presentation clock to 0 and "rewinds" the video, Flushes data and resets timestamps) - works fine
  7. Attempting to Play video again causes the MediaSource to be starved... all data that was buffered was retrieved via sample requests are basically dumped, 100+ buffered samples and (no video is played) until the last presentation time before the seek has been reached

我可以其他方面,玩耍和停顿,并且没有任何问题地寻求,但是一旦我停下来并且在寻求之后尝试开始,我就会跑进入这个问题。  我相信我正在发送MESourceSeeked / Started,  MEStreamSeeked / Started事件,因为我有
紧跟 WavSource MPEG1Source 示例。    我还检查了演示时钟的状态和当前时间,看起来没问题。  任何想法都将不胜感激!

I can other wise, play and pause, and seek without any problems, but once I Stop and attempt to Start after a seek, I run into this issue.  I believe I am sending the MESourceSeeked/Started, MEStreamSeeked/Started events correctly as I have followed the WavSource and MPEG1Source examples closely.    I have also examined the presentation clock's state and current time and they appear to be OK.  Any thoughts would be greatly appreciated!

谢谢,

周杰伦

Jay

推荐答案

使用MFTrace工具后,看起来解码器正在发送MF_E_TRANSFORM_NEED_MORE_INPUT消息。  这对我来说很奇怪,因为我已经缓存了大量数据,并且发布了几乎相同数量的请求,所有数据立即被删除
。   H264对新的时间戳不满意并且在获取数据时丢弃了数据吗?   MediaSession :: stop功能不会重置所有转换吗?

After using the MFTrace tool, it looks as though the decoder is sending a MF_E_TRANSFORM_NEED_MORE_INPUT message.  This is very strange to me as I've buffered quite a bit of data and almost the same number of requests are posted and all the data gets removed right away.  Is the H264 not happy with the new timestamps and throwing out the data as it gets it?  Doesn't the MediaSession::stop function reset all of the transforms?





这篇关于自定义RTSP媒体源状态转换错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆