FFDShow Remote API: Time in milliseconds

Help
2011-12-19
2013-04-15
  • Marius Ionescu

    Marius Ionescu - 2011-12-19

    Hi,
    I need to obtain the current time from FFDShow, but in milliseconds, not seconds. From my research, this doesn't seem to be possible in the current version of the remote API. Could this be easily implemented?
    Thanks.

     
  • h.yamagata

    h.yamagata - 2011-12-19

    What do you mean by current time? ffdshow doesn't manage time. Renderers would do.

     
  • Marius Ionescu

    Marius Ionescu - 2011-12-20

    I mean the function:
        public int getCurrentTime()
    which is defined in FFDShowAPI.cs
    and described in the remote API documentation as follows:
    "Retrieve the current position in the timeline of the media being played
    Return Value
    Current position in seconds".
    Thanks.

     
  • h.yamagata

    h.yamagata - 2011-12-20

    Sorry, I don't understand C#. I don't understand what albain meant to do with the code.

     
  • Marius Ionescu

    Marius Ionescu - 2011-12-20

    Ok. If you'd still like to help me, I'll explain to you what you need to know
    That function just uses the SendMessage function from user32.dll in the following way:
    SendMessage(8,0).
    I guess it sends this message to FFDShowRemoteAPI.cpp.
    It returns the time in seconds, not milliseconds.
    So the problem seems to be either that a different message (which I couldn't find) has to be sent to the remote api, or that it doesn't have a function to return time in milliseconds.
    IN both cases, the problem can be resolved by looking just in the c++ code part of the api.
    I've tried to look in it but hadn't understood yet what function is called and what is returned for that message. I'll keep trying. Let me know if you can help.
    If I'm wrong about the SendMessage thing, is there any chance of contacting Albain? Is he active on this board? Can you help me to reach him privately?
    Thanks

     
  • h.yamagata

    h.yamagata - 2011-12-21

    Thanks for the info.
    TffdshowBase::getCurTime2 seems to be the implementation for the API.
    It queries IMediaPosition on IFilterGraph and call IMediaPosition::get_CurrentPosition.
    ffdshow is not a correct filter to answer to your need.

     

Log in to post a comment.