locked
Implemending custom source for DES RRS feed

  • Question

  • Hi, everybody.
    I've  implemented directshow source filter for PNG files.
    It works fine with Graphedit and renders PNG files wery well.

    Now I would like to use it with DES tecnology.
    I've implemented IMEdiaSeeking interface to make DES able to use my source.
    For test purposes I use DirectShow transition previewer ( sample project "transviewer" from dxsdk summer 2004).
    Image apears in "select an ending/starting clip" section, but preview section shows a black screen.

    While debugging I've got shure, that my source is used to open image properly.
    And for preview purposes (in "select an ending/starting clip" section)
    IsFormatSupported
    GetCapabilities
    IsUsingTimeFormat
    SetPositions
    are called,

    But DES does not call any of these methods.
    Maybe some additional interface should be implemented in my filter?
    Is it important for DES what dataflow model I use (push/pull)? Push used, output media type is ARGB32.

    Thanks forward!
    Fed)'io
    Monday, August 10, 2009 7:29 AM

Answers

  • The problem was solved.

    DES uses Push model.

    Use Bouncing Ball filter which is supplied with DirectShow samples to implement PNG source for DES.

    Steps:
    1. Add seeking to Bouncing Ball - implement IMediaSeeking (there are some tricks);
    2. Add IFileSource support.


    • Proposed as answer by Gleb Sapunkov Friday, September 11, 2009 5:36 AM
    • Marked as answer by The March Hare Friday, September 11, 2009 3:49 PM
    Friday, September 11, 2009 5:36 AM

All replies

  • Sorry for being annoying, but I'm really got killed with this problem.
    Being expirementing I've found that default directshow 'still image source' for .jpg and .bmp does not support IMediaSeeking, but works fine with DES.

    My source supports IMediaSeeking.
    Works in Push mode.
    Has Output mediatype MEDIASUBTYPE_ARGB32 (supported by DES).
    I insert my source object with SetSubObjectGuid() or SetMediaName() - it does not matter.
    What else could cause problems in DES?
    Fed)'io
    Saturday, August 15, 2009 2:42 PM
  • Hello!

    The problem still needs the solution.

    Is there someone to answer the forum question?

    Thank you.
    Tuesday, August 25, 2009 10:06 AM
  • Hello, everyone!

    I have taken a sample from DirectShow SDK "Async". It implements Async File Source.

    I tried to use this source in DES (via TransViewer - sample in DS SDK in folder "Editing"). This source works correctly (!), but only with video files. Actually it has STREAM media type on the output pin.

    I have replaced media type to VIDEO and subtype ARGB32 (tried also RGB32 and RGB24), created VIDEOHEADERINFO and filled it with data from PNG file which I load (and which I want to show in DES).
    But now the "PNG Async File Source" doesn't render even in GraphEdit. It sais that there are no appropriate Media types. I have found the reason of this message.

    As Async File Source uses PULL model, so while the connection it checks, whether a downstream filter asks for async data. If it doesn't then connection is being interrupted.

    -= My GOAL is: =-
    create DS filter which loads PNG file and gives it to DES.

    Answer, please, which model (PUSH or PULL) is used in DES?
    Can you provide me with sources of Jpeg (or BMP, or GIF, or TGA) File Source which works in DES?

    Any other advices are welcome.

    Best regards,
    Sapunkov Gleb
    Wednesday, August 26, 2009 12:22 PM
  • The problem was solved.

    DES uses Push model.

    Use Bouncing Ball filter which is supplied with DirectShow samples to implement PNG source for DES.

    Steps:
    1. Add seeking to Bouncing Ball - implement IMediaSeeking (there are some tricks);
    2. Add IFileSource support.


    • Proposed as answer by Gleb Sapunkov Friday, September 11, 2009 5:36 AM
    • Marked as answer by The March Hare Friday, September 11, 2009 3:49 PM
    Friday, September 11, 2009 5:36 AM