Menu

gmfBridge mixing file and live

VBMizio
2016-06-22
2016-09-09
  • VBMizio

    VBMizio - 2016-06-22

    Hi all,
    I have a GMFBridge based application that switches between two video files, and it works right.
    Now I need to add a Live audio/video source. The live signal is obtained by two GSSF filter instances (video and audio) and an incoming NDI stream.
    I'm doing some tests, but I have a problem.
    Initially the live graph is stopped, so, the GSSF filters don't send nothing.
    I play a video file; when the file is over, I stop it, I debridge the GMFBridge contoller, then I run the live graph and bridge it to the controller.
    In this moment, the live graph is accelerated for a while.
    I know that, in a Live graph, the GMFBridge should work in discard mode, but in my application, it works in suspend mode.
    It is possibile to mix file and live?
    Any trick?

     

    Last edit: VBMizio 2016-06-23
  • Eric

    Eric - 2016-06-24

    Honestly, instead of writing that kind of code, you should try to write a DirectShow source filter (and/or a Media Foundation's Media Source) that consume NDI streams...

     
  • VBMizio

    VBMizio - 2016-06-24

    Eric, thanks for your answer.
    Unfortunatelly I'm not able to write a DS source filter.
    I'm not a C++ developer.
    About MF, actually I don't know nothing about it, I hope to have the chance to study MF during my next holiday. I know that a company is actually selling a MF source for NDI.
    So, in this moment, the only chance for me is to make DS with GSSF filters working, or to find a ready to use DS source filter for NDI

     
  • snarfle

    snarfle - 2016-06-26

    live graph is accelerated for a while

    Could this be a timestamp problem?

     
  • VBMizio

    VBMizio - 2016-06-28

    Hi snarfle,
    yes it could be.
    Every GSSF sample have no timestamp.
    I've tryied to set the timestamp, as received from NDI audio and video frame, but my GMFBridge based application hangs.
    I've tryied to use the BridgeAtDiscont method of the GMFBridge controller, as well as the SetLiveTiming one (maybe in the wrong way? ) but it doesn't work.

     
  • snarfle

    snarfle - 2016-06-29

    It's been a while since I played with timestamps. A few things to try:

    • Using IMediaSample::SetTime, set the times to NULL (ie delete any timestamp).
    • If the graph is running at x fps, if you keep track of how many frames the graph has shown, you can compute the timestamp of the next sample.
    • Get a IMediaFilter interface from the FilterGraph, use that to get the Graph's clock (GetSyncSource), use the IReferenceClock to get the current graph time, use that time (or maybe add bit) on the samples.
     
  • VBMizio

    VBMizio - 2016-09-09

    snarfle, thanks.
    Actually I need to re-design my application, so I don't know when (and if) I'll back to mixing file and live.

     

Log in to post a comment.