Pergunta

I'm working on video streaming service for ip-cameras. I've implemented RTSP source filter (on Live555) for DirectShow, which is intended to be used in WPF MediaElement inside my company's main product. On my development machine it works fine (Vista), so I'm able to watch streamed H.264 video in Windows Media Player, or any other software, that uses DirectShow for rendering.

But: on other machines (Windows 7), no video is shown. I found out, that Enhanced Video Renderer in Vista (renderer file version 6.0.6002.18005) after receiving "Play" command calls on upstream filter IBaseFilter::Pause and IBaseFilter::Run methods, which are finally routed to my source filter. In Windows 7 EVR has different version (6.1.7601.17514), and its behavior differs too: it calls only IBaseFilter::Pause, and no IBaseFilter::Run is issued. As a result, everything stops on CSourceStream::FillBuffer method until timeout returns E_FAIL, and EndOfStream is sent downstream to renderer. Sometimes, after EndOfStream IBaseFilter::Run is issued, but it has no meaning at this point.

I tried to provide another renderer by creating and adding it to graph manually in CreateInstance method. It worked with Haali Video Renderer, and Windows Media Player successfully plays streamed video on other machines. But, as far as i know, MediaElement (MediaPlayer inside it) uses EVR by default, and it ignores HVR (seems so), created by me, so no video on any machine.

Am i missing something using EVR? Any help is appreciated.

Foi útil?

Solução

I forgot to reimplement IMediaFilter::GetState() method to return VFW_S_CANT_CUE in State_Paused. Doing so solved the problem.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top