locked
IMediaSeeking::GetPositions in Demux is not getting called RRS feed

  • Question

  • Hello All,

    I am calling GetPositions() from my application after calling SetPositions(). I want to know the actual position where the demux has got video key frame after seeking. I have implemented GetPositions() in demux which will return the video key frame timestamp. But I noticed that GetPositions() from application returns me the same tStart and tStop which I set during SetPositions(). Also GetPositions() in demux is not getting called at all. Can anybody explain me this please? What should I do if I want to get the time from Demux? Please help.

    -Sourabh
    Tuesday, October 21, 2008 9:04 AM

Answers

  • GetPositions is implemented in the renderer to return the current stream time adjusted by seek offset. That is, it tells you where the renderer should be now. It does not answer the question you are asking about key frame locality. I think you will need a private interface on the demux to do that.

    G

    Thursday, October 23, 2008 8:46 AM

All replies

  • IMediaSeeking is called from renderer upstream through filters, through ones which support IMediaSeeking/IMediaPosition "pass through" and forward the call to the proper upstream filter. In your case you might have a filter, such as decoder, that does not support these interfaces and does not forward the calls, in which case the calls don't reach demux. You graph topology would be helpful for troubleshooting.
    Tuesday, October 21, 2008 10:18 AM
  • Hello Roman,

    My filter graph looks like this 
    Source->Demux->Decoder->Renderer. I have not drawn the audio chain.
    And one more thing I want to mention is that I am able to seek correctly using ImediaSeeking SetPositions interface. Thats why I am bit confused. Why then GetPositions is not getting called?

    Thanks,
    Sourabh

    Tuesday, October 21, 2008 10:53 AM
  • The first thing you can try is to QI decoder filter's output pin for IMediaSeeking and IMediaPosition. These two are required to be present in order for demux filter is receiving the forwarded calls. If they are present but there still is a problem, most likely it is decoder's behavior to not forward these calls. BTW what is the decoder filter?
    Tuesday, October 21, 2008 3:54 PM
  • The decoder is DivX video decoder filter. I will definitely try what you have suggested. Also I am planning to have a separate interface for getting the time information from demux if GetPositions do not work.

    Thanks,
    Sourabh
    Wednesday, October 22, 2008 1:22 AM
  • GetPositions is implemented in the renderer to return the current stream time adjusted by seek offset. That is, it tells you where the renderer should be now. It does not answer the question you are asking about key frame locality. I think you will need a private interface on the demux to do that.

    G

    Thursday, October 23, 2008 8:46 AM
  • Thanks Geraint,
    I have implemented a private interface to get the timing information from demux. Earlier I thought that I can return the timing info about key frames from GetPositions in demux to solve my purpose.

    -Sourabh
    Thursday, October 23, 2008 1:36 PM