Menu

Unable to get Video/Audio in DTVSample (Win7)

2009-09-14
2012-10-29
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-14

    Hello there,

    I'm currently fiddling arround with Windows 7 and was wondering if all of the
    DirectShow.NET goodness is also available on the new OS.

    I was able to plugin my Vista BDA Drivers for my Terratec Cinergy XS (with
    Capture Device) and my MSI Digivox mini II (without Capture Device) and fireup
    DTVSample's DVB-T Graph on a frequence which is known to work. But all I got
    is three (yes, three) black Windows showing nothing. Altough the graph seemed
    to have started up successfully.

    Using the DVBSiParser I was able to retrieve information as ONID, TSID etc.
    therefor I am pretty confident the graph is processing data from my DVB-T
    stick.

    My Solution: I opened the Graph with GraphEdt and replaced the MPEG2
    Demultiplexer, with Cyberlink MPEG Demuxer (which came with the vendor's dvb-t
    software) and suddenly it started working within GraphEdt.

    Anyways, as Windows Media Center and several other Applications are able to
    show A/V via DVB-T my guess is that there is something wrong with either
    DirectShowLib or the DTVSample itself.

    Can someone help me figuring this out, since i would be thrilled to continue
    writing my own TV Application ;)

    Does it help to show my Graph file to you guys?

    Greetings,

    Maui

     
  • BEZ

    BEZ - 2009-09-14

    I am currently working with audio only and have gotten things to work very
    well with windows 7. I did have to manually build all of my graphs and I found
    that some of my graphs for windows xp and vista did not work with windows 7 as
    available filters have changed between them. Also some graphs that would build
    using the automation would not play my audio. I just figured out combinations
    with graphedit that would work for the different supported formats and then I
    reproduce them. For good measure I have built my own builder with tracing so
    If a user needs to modify the graph to force a specfic filter item then they
    will be able to. You most likely will need to manually build your graphs to
    solve your issue.

     
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-14

    Hmmm...i don't know how to proceed, since I can not imagine how to replace the
    Standard Microsoft MPEG2 Demuxer. I can not depend on Cyberlink's Demuxer
    being available on the target plattform. As soon as I replace the old demuxer
    in GraphEdt alls works perfectly....

     
  • BEZ

    BEZ - 2009-09-14

    I was told by a MS rep that some of the filters in Win 7 are locked to only
    work with MS apps. I was told that this was due to licensing issues with MPEG
    technology. And that developers would need to persue thier own licensing and
    code base if they wanted to utilize a codec. Which means that as a developer
    we would need to go to a third party to license a filter and codec. I have no
    confirmation on this, but I have seen evidence that this might be the case.
    You may have to license the Cyberlink codec or require that your end users
    have it on their system. You may also have to provide the option for your end
    user to select their MPEG2 Demuxer and leave the MS one out of the list. Does
    the hardware that you are using come with it's own demuxer?

     
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-14

    Hmmm...the Cinergy Stick does come with a Software that installs the Cyberlink
    Filters. I am pretty sure that there must be a way around this issues, as
    DVBViewer (http://www.dvbviewer.com/de/index.php) for example is able to access the device with BDA AND deliver
    proper A/V.

    Here is my Graph: www.maui.at/downloads/tes2.grf

     
  • BEZ

    BEZ - 2009-09-14

    I can't get the graph to open. It says that there is a filter in use that I do
    not have. Can you type out a text vers.. ie..

    Source -- > Demuxer --> Tee --> Render

    This will give me a beter idea of what you are trying to do.

     
  • Eric

    Eric - 2009-09-15

    It seem that Microsoft changed the MPEG-2 Demux behavior in Windows 7 RC-1
    (and perhaps also in Vista with the TV Pack 2008). Surprisingly, i found very
    little references on the Web about that. So i was balanced between a problem
    with my hardware but I have the same problem with the RTM.

    I made a post on the official DirectShow MSDN forum but nobody answer me :
    http://social.msdn.microsoft.com/Forums/en-
    US/windowsdirectshowdevelopment/thread/b324d209-3ec0-48ad-955a-
    bbc398047ac2

    To summarize the problem : The network provider is responsible of the creation
    of the Demux output pins. Under Vista SP2 (and older versions), on a classic
    BDA graph, the Demux have 5 outputs pins that can be rendered to complete the
    graph construction. This is how the DTVSample works. Under Windows 7, the
    Demux have 30 outputs pins ! Many of them are Audio pins and video pins.
    That's why DTVSample can not build a correct graph under W7.

    Regarding the licensing, only the encoding and decoding process of the MPEG
    codecs are patented, not the stream parsing (the responsibility of the Demux).
    I have also made tests with the new Microsoft's mpeg codecs with Graph Studio.
    The video filter works great, even in AVI and MKV files.The only problem is
    that i don't have any sound but it's perhaps a configuration problem (the
    codec perhaps need to know how to downgrade a 5.1 audio stream since i only
    have a stereo headphone on this computer). So I'm sure at all that Microsoft
    locked the codecs for its how usage...

     
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-15

    Hmmm...so now we don't really now how to bypass that problem...
    Unfortunately i am not able to connect to Remote Grpahs with GraphEdt under
    Windows 7, to see how programs like DVBViewer do it.

     
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-26

    Just wanted to bump that issue. So far I wasn't able to get DTV working. Since
    Windows 7 seven is due to be released in October we should figure out
    something soon.

     
  • snarfle

    snarfle - 2009-09-26

    Since it was clearly Microsoft's code that changed, have you tried following
    up with them?

    They are the only people who know what they did and how they expect people to
    adjust to it.

     
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-27

    Well I thought the whole DirectShow/BDA thingie was to be an open API? Guess I
    will try if one of Microsoft's own C++ Samples still works.

     
  • DMAN

    DMAN - 2009-09-27

    DTVSample is a basic app which worked fine when the M$ demux provided one set
    of output pins for BDA.
    In effect you could render the graph from the BDA Receivers ouptut pin.
    The M$ demux for TVPack 2008 & Windows 7 has 30 output pins.
    This allows the possibility of 4x video streams (god knows).

    You posted graph shows 3x decoders & renderers, hence your issue.

    You need to manually build the graph - especially the connections from the M$
    demux so you have 1x audio & video connection.
    Do this by cycling through the pins for the major type. i.e. MEDIATYPE_Audio
    & MEDIATYPE_Video and adding your decoders accordingly.
    Only connect the first video & audio output pins to the renderer you're
    using.

    DMAN

     
  • Eric

    Eric - 2009-09-29

    Thanks DMAN for your feedback. Did you successfully write a BDA application
    under W7? How do you select a pin rather than another?

    I'm open to innovations but they have to be documented (and last month, MS
    didn't documented this new behavior yet).

     
  • DMAN

    DMAN - 2009-09-29

    Yes I help with a BDA application which works under Windows 7.
    Here is an example method to find the pin major & minor types.
    Adapt it for your code.

    i.e. we would call it anytime with:
    FindPin(MediaType.Video, MediaSubType.Mpeg2Program, _filterMPEG-2Demux);

    Where _filterMEPG-2Demux is decalred with IBaseFilter and the later allocated
    to the specific MPEG-2 demux filter.

    private void FindPin(Guid mediaType, Guid mediaSubtype, IBaseFilter filter)
    {
    if (filter == null)
    {
    //Throw exception or error here
    }
    IEnumPins enumPins;
    filter.EnumPins(out enumPins);
    // loop through all pins
    while (true)
    {
    IPin pins = new IPin;
    int fetched;
    enumPins.Next(1, pins, out fetched);
    if (fetched != 1)
    break;
    //first check if the pindirection matches
    PinDirection pinDirection;
    pins.QueryDirection(out pinDirection);
    if (pinDirection != PinDirection.Output)
    continue;
    //next check if the pin supports the media type requested
    IEnumMediaTypes enumMedia;
    AMMediaType media = new AMMediaType;
    pins.EnumMediaTypes(out enumMedia);
    while (true)
    {
    int fetchedMedia;
    enumMedia.Next(1, media, out fetchedMedia);
    if (fetchedMedia != 1)
    break;
    if (media.majorType == mediaType)
    {
    if (media.subType == mediaSubtype)
    {
    //it does... we're done
    _pinCapture = pins;
    DsUtils.FreeAMMediaType(media);
    return;
    }
    }
    DsUtils.FreeAMMediaType(media);
    }
    Release.ComObject("filter pin", pins);
    }
    }

     
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-29

    I got it to work. OK, not programatically (so I'm still hoping that someone of
    you guys can help me out)

    This is what a working Windows 7 graph looks on my computer.
    http://www.maui.at/downloads/WorkingGraph.png

    I already implemented dman proposal, but that did not bring the success. The
    graph was still pitch black.

    I noticed that my filter (which I export from the DTVSample) always connected
    a unconnected "BDA MPEG2 Transport Information Filter".
    So I hooked up MPEG2 Demux Pin 001 to IB Input on the BDA MTIF, and MTIF's iTV
    Out and SBE Out to MPEG2 Sections and Tables, MPEG2 Sections and Tables 008.

    After starting this graph, my tuning request works and the graph starts to
    show the TV-Picture with sound.

    Now the final questions seems to be how this manual graph can be created by
    code...

    Greetings,

    Maui

     
  • Sebastian Mauer

    Sebastian Mauer - 2009-09-29

    This is what i've done in AddTransportStreamFiltersToGraph()

    if (devices_.Name.Equals("BDA MPEG2 Transport Information Filter"))
    {
    hr = graphBuilder.AddSourceFilterForMoniker(devices_.Mon, null, devices_.Name,
    out this.bdaTIF);
    DsError.ThrowExceptionForHR(hr);

    hr = capBuilder.RenderStream(null, null, this.mpeg2Demux, null, this.bdaTIF);
    continue;
    }

    if (devices_.Name.Equals("MPEG-2 Sections and Tables"))
    {
    hr = graphBuilder.AddSourceFilterForMoniker(devices_.Mon, null, devices_.Name,
    out this.bdaSecTab);

    DsError.ThrowExceptionForHR(hr);
    hr = capBuilder.RenderStream(null, null, this.bdaTIF, null, this.bdaSecTab);
    continue;
    }

    It creates the necessary connection mentioned above.
    Now i have sound in DTVSample. The VMR9 Media windows is now missing though.
    Still have to figure out what's wrong now______

     

Log in to post a comment.