Directshow - issues, compatibility, and a memory leak

Discussion in 'General Development (no feature request here!)' started by mr.duck, November 13, 2011.

  1. mr.duck

    mr.duck Portal Member

    Joined:
    December 31, 2008
    Messages:
    44
    Likes Received:
    2
    Ratings:
    +2 / 0
    There seems to be several issues with the media portal directshow filters. My hope is for this thread to get developers to look into it and fix the problems.


    1) Playing a TS file in potplayer with the mediaportal filters causes the program to start using every GB of available RAM until it eventually crashes. I found that the cause is "DVBSub2.ax". Without it there is no memory leak. As soon as it is added while keeping everything else the same... memory leak.


    2) The filters behave in unusual ways that cause problems in the directshow framework. To quote the zoom player dev:
    [The TSFileReader] audio pin exposes data that can be identified as video. ... with the modification I added, the pin will be scanned for both audio and video. The same for the subtitle. They could output subtitle in a way that is compatible with other subtitle renderers (VobSub for example), but what they do require their custom subtitle filter.
    Can TSFileSource be fixed at least for the audio/video/subtitle pins to be identified as such? Can changes be made so that custom code *is not* required in each video player in order to support the directshow filters??




    3) There is a further compatibility issue with TSFileSource regarding seeking on resuming files. It seems that the filter isn't accepting the seek command right at the start of playback. Again this is something that only the mediaportal filters have issue with and have probably rather unfortunately been fixed in the mediaportal application rather than in the filter themselves.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Just a brief generic comment - MediaPortal directshow filters are designed to work with MediaPortal. If they are having issues with some 3rd party applications alone it is highly unlikely to be changed. No one is forcing those filters to be used in a 3rd party application. There are several "not-the-standard-way" design choices done (like the DVB subtitle filter feeds data directly to the GUI engine to allow DXVA used).

    DVBSub2.ax probably caches the subtitle bitmaps and no one is querying those. Not a memory leak. PotPlayer doesn't have correct interfaces implemented, so either it needs to be implement those or the DVBSub2.ax shouldn't be connected in the graph.

    TsReader.ax exposes the subtitle pin content as Transport Stream. DVBSub2.ax consumes Transport Stream and internaly parses the PES packets out of it. As far as I know VobSub wont have DVB subtitle support. There is no planned changes to output the DVB subtitles in any other format than as a RAW Trasport Stream.

    Please provide a patch / fix and we can consider if it is good to be included.
     
  4. mr.duck

    mr.duck Portal Member

    Joined:
    December 31, 2008
    Messages:
    44
    Likes Received:
    2
    Ratings:
    +2 / 0
    Playing a TS file is a deceptively simple challenge. The number of TS filters that can open a TS file adequately is an extremely short list. The mediaportal filter is the only one I have found that can do it and do it well. The only one!


    I see. But what I don't understand is when I try using ffdshow for video, why can't the subtitles from DVBSub2.ax be displayed as ffdshow supports picture based subtitles?


    I see. But what about the audio pin? Is that also identified as transport stream or is it identified as video?


    I love open source. But I have never written a line of C++ in my life. I would gladly make the changes and contribute if I could. I had my fingers crossed when I made this thread that someone that knows what they are doing would make the fixes for me.
     
  5. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    How do you trigger/reproduce the problem ?

    Have you got a TsReader.log that shows the problem ?

    Tony

    (and by the way, it's not hard to find problems in some non-MP filters - a little while ago I was doing some fast-forward testing, and discovered how easily you could crash/hang some well known splitter filters...... ;)
     
  6. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Can you point me at the forum discussion thread that the quote is taken from (or post all the information from the 'zoom player dev') so we know the context of how TsReader is being used, how the graph is being built etc ?

    Tony
     
  7. mr.duck

    mr.duck Portal Member

    Joined:
    December 31, 2008
    Messages:
    44
    Likes Received:
    2
    Ratings:
    +2 / 0
    Tested with zoom player and pot player with identical results:

    Play a TS file for a bit. Close it. Play same file again. The mediaplayer tries to resume the file from the same point it was at when it was closed. The timeline shows that this is the case, but the video is always from the very beginning.

    I don't have a log. I would need a debug TSReader.ax for that?


    It's in a 'closed beta' section of a forum (password protected). TsReader was set as the preferred source filter/splitter. Specific audio and video filters were also set to be used. If everything worked, the file will play; otherwise it would give an error that it could not be played. I'm not sure if this adequately answers your question. I could always try to invite the zoom player dev to this thread if it doesn't...
     
  8. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    No - the normal version writes logs into 'C:\ProgramData\Team MediaPortal\MediaPortal\log' e.g. TsReader-<date>.Log

    Tony
     
  9. mr.duck

    mr.duck Portal Member

    Joined:
    December 31, 2008
    Messages:
    44
    Likes Received:
    2
    Ratings:
    +2 / 0
  10. mr.duck

    mr.duck Portal Member

    Joined:
    December 31, 2008
    Messages:
    44
    Likes Received:
    2
    Ratings:
    +2 / 0
    It seems I'm going to have to learn C++

    - I've installed Visual Studio 2010 Express.
    - I downloaded the code bits (some 20 files) for DVBSub2.ax one by one (is there a better way to do it?)
    - I opened the project and click on 'build'
    - Getting an error like: 'streams.h' There is no such file or directory.

    What to do? Way out of my depth here.
     
  11. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    You should copy the whole GIT repository (there are other files needed as well).

    4_Development

    Some steps you need to make to be able to compile directshow filters:

     
    • Like Like x 2
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!