Help - Search - Members - Calendar
Full Version: Getting rid of the Network Provider(s)
DVB Owners Discussion Forum - dvbowners.com > Technical & Development Forums > BDA Driver Development
Pages: 1, 2
DCoder
Hi,

in my Filter (DC-DVB Source) i was already able to get rid of the buggy TIF by writing my own, but the Network Provider querys for some to me Unknown Interface GUIDS. I have implemented those Interfaces with some dummy Methods, but i would like to get rid of that.

So far, i was able to replace the Network Provider with a dummy CBaseFilter that implements a simple CBaseOutputPin. The Filter also implements the IBDA_NetworkProvider (for RegisterDeviceFilter and UnRegisterDeviceFilter).

My DVB-T Device (some KWorld Crap) is able to work with that Configuration. It registers itself to my Network Provider and calls RegisterDeviceFilter/UnRegisterDeviceFilter. The Tuner Filter has always the Output Pin created, but some Drivers like Spectrum's seems to need a call to IBDA_Topology.CreatePin to create the Output Pin. (maybe Input Pin too ??)

And that´s where i'm stuck. Anyone an idea how to get this working ?
DCoder
I figured out that on XP MCE 2005 with the same DX Version and the same Drivers, my KWorld Card also does not provide the Output Pin on the Tuner if the MS Network Provider is not connected to it. I succeeded to connect it by using the CreatePin Method on the IBDA_Topology Interface on the Tuner (after checking if an Output Pin exists)

(FTuner as IBDA_Topology).CreatePin(1, pinID);

The Tuner Sample in the DDK says that Pin ID 0 is the Terrestrial Pin and PinID 1 the TS Stream Pin. With that Code i am able to use BDA without all the MS Tuning Filters, but is creating the Pin really enough ?
DCoder
Unfortunatly creating the Pin only doesn't work. The connections succeeds, but no Data is going out. Doesn't happen with MS Network Provider ...
nate
Before I start i'll just point out is that i may not know what i'm talking about. I'm just reading the DirectX docs and trying to figure it out from educated guesses.

QUOTE
The Tuner Sample in the DDK says that Pin ID 0 is the Terrestrial Pin and PinID 1 the TS Stream Pin
Isn't IBDA_Topology::GetPinTypes what is supposed to be used rather than guessing the types of pin id's?


QUOTE
Unfortunatly creating the Pin only doesn't work. The connections succeeds, but no Data is going out. Doesn't happen with MS Network Provider ...
Does data normally flow between the tuner and capture filters? I didn't think it did. I thought the only communication between the tuner and capture filters was through interface calls. I could be entirely wrong though.

How are you submitting tune requests?

Perhaps you need to use something like IBDA_Topology::CreateTopology after creating the output pin?
JoeyBloggs
I think you are on the right track, ie you need a dummy filter that will setup a default Node Topology for the tuner filter (and also for the Demodulator filter if it's a separate filter) Unfortunately I think you need to enum and create the nodes from input to output based on the tuningspace and modulation parameters etc. Not just a hardcoded pin creation ~~~

Spectrum may be able to help us understand this better ~ Perhaps he could compile for us a set of drivers with ::DebugOutput's for all the interface calls.

AFAIK the KWorld / VStream BDA drivers are still not compliant and I would not be using them for this work... ie they are still using the NIM tuning module outside of the BDA Architecture.

@Nate Agreed that TS flow is virtual through the hardware at least until it hits the Capture filter at which point it becomes an AVStream ~ and in most cases is brought into the user processes address space at this point.

@Nate tuning directly to the interfaces
CODE
CComPtr<IBDA_DeviceControl>       piTunerDeviceControl;
    
CComPtr<IBDA_FrequencyFilter>     piFrequencyFilter;
CComPtr<IBDA_DigitalDemodulator>  piDigitalDemodulator;
nate
QUOTE (JoeyBloggs @ Apr 13 2005, 10:51 AM)
@Nate tuning directly to the interfaces
Yeah, sorry. What i really meant to ask was if DCoder is going to implement ITuner on his dummy filter or just leave it up to the application or another filter (such as his new TIF) to tune directly.
JoeyBloggs
I did look at this a couple of months ago. IIRC his graph building code calls the BDA node interfaces directly, its all here http://cvs.dsp-worx.de/index.cgi/dcdvbsource/Source/Filter/

and specifically http://cvs.dsp-worx.de/index.cgi/dcdvbsour...cannerGraph.pas
JoeyBloggs
@DCoder. One thing I found helpful when experimenting with this was to put a null renderer filter in place of the TIF but I imagine your TIF replacement achieves much the same thing ~
JoeyBloggs
There is also the issue of the NP firing IBroadcastEvent's as per bear's investigations (but probably only necessary to drive the real TIF into remapping the Demux ~~~)

So if I had to guess a replacement NP should

1/ Create a default TuningSpace of the correct type DVB/C/S/T, ATSC etc at creation

2/ Actively implement get and set tuning space, as I believe that CreateTopology() will retrieve and use this information...

3/ Respond to a RegisterDeviceFilter() (Note to self, also IBDA_PinControl::RegistrationContext()) from a tuner or demod filter being added to the graph by creating an input and output pin and calling CreateTopology on them.
DCoder
Thanks guys.

First, i need to correct my posting above. The only problematic Drivers are the Twinhan. The Spectrum Drivers works very well with my NP replacement. I don't know if the Spectrum Drivers already create the Output Pin and Topology on it´s own, but on my KWorld the Output Pin is not created and a simple IBDA_Topolgy.CreatePin is enough to Start the Device.

QUOTE
Before I start i'll just point out is that i may not know what i'm talking about. I'm just reading the DirectX docs and trying to figure it out from educated guesses.
Isn't that what we're all doing? biggrin.gif

QUOTE
Isn't IBDA_Topology::GetPinTypes what is supposed to be used rather than guessing the types of pin id's?

Right, i was just using the Values i have seen in the GenericTuner Sample in the DDK.

CODE
//
//  Topology Constants
//
typedef enum {
   PIN_TYPE_ANTENNA = 0,
   PIN_TYPE_TRANSPORT
} FilterPinTypes;

typedef enum {
   INITIAL_ANNTENNA_PIN_ID = 0
} InitialPinIDs;


QUOTE
Does data normally flow between the tuner and capture filters? I didn't think it did. I thought the only communication between the tuner and capture filters was through interface calls. I could be entirely wrong though.
You are right, but I wasn't checking the Data Flow on the Output Pin of the Tuner. I have connected a PinTee between Receiver and Demux, with an additional File (Dump) Writer Filter and the Filesize is always 0 with the Twinhan Drivers.

QUOTE
Perhaps you need to use something like IBDA_Topology::CreateTopology after creating the output pin?

That´s what i have tried.

CODE
   if not Assigned(GetOutPin(FTuner, 0)) then
   begin
     with (FTuner as IBDA_Topology) do
     begin
       hr := CreatePin(1, id);
       hr := CreateTopology(0, id);
     end;
   end;


'id' after Create is 1. Even if i create multiple Output Pins, each ID is 1 and every hr is S_OK. I tried to create (just for fun) some additional Input Pins. Creating works, but CreateTopology fails and no Data is received on the demux.

QUOTE
I think you are on the right track, ie you need a dummy filter that will setup a default Node Topology for the tuner filter (and also for the Demodulator filter if it's a separate filter) Unfortunately I think you need to enum and create the nodes from input to output based on the tuningspace and modulation parameters etc. Not just a hardcoded pin creation ~~~
That´s exactly what i want to do, but it´s really hard to work things out and that each Driver is acting different doesn't help at all dry.gif

QUOTE
Spectrum may be able to help us understand this better ~ Perhaps he could compile for us a set of drivers with ::DebugOutput's for all the interface calls.

AFAIK the KWorld / VStream BDA drivers are still not compliant and I would not be using them for this work... ie they are still using the NIM tuning module outside of the BDA Architecture.

Yeah that might help. As i said before, i don't know if the Spectrum Drivers automagically create the Output Pin and Topology on it´s own. Maybe it will be needed to rewrite that Driver, so we can create the Pin and Topology on our own.

Can i use other (maybe Spectrum) Drivers for the KWorld Card ?

QUOTE
What i really meant to ask was if DCoder is going to implement ITuner on his dummy filter or just leave it up to the application or another filter (such as his new TIF) to tune directly.
Actually, i was only going to add Code to start the Dataflow. The tuning using the IBDA_XXX Interfaces is already working very well.

QUOTE
I did look at this a couple of months ago. IIRC his graph building code calls the BDA node interfaces directly, its all here http://cvs.dsp-worx.de/index.cgi/dcdvbsource/Source/Filter/

and specifically http://cvs.dsp-worx.de/index.cgi/dcdvbsour...cannerGraph.pas

I should mention here that the ChannelScan is still using the MS NP and TIF. That will be changed later when i am able to completely replace it. My main DirectShow Source Filter is not using the MS NP and TIF anymore.

QUOTE
One thing I found helpful when experimenting with this was to put a null renderer filter in place of the TIF but I imagine your TIF replacement achieves much the same thing ~
I tried that a while ago, but without the TIF in the Graph the MS NP crashed when closing the App. It seems the NP is calling a method on an Interface without checking if the interface is assigned...

My TIF replacement is not really working like the MS TIF. The whole mappings on the Demux Pins are done by the saved ChannelFiles from the ChannelScan. http://cvs.dsp-worx.de/index.cgi/dcdvbsour...raphBuilder.pas in TDVBGraphBuilder.TuneToChannelInternal. The only mapping i do within my TIF replacement is the mapping on Pin 1 of the demux to map the PID for EPG/NIT by parsing the PAT.

QUOTE
So if I had to guess a replacement NP should

1/ Create a default TuningSpace of the correct type DVB/C/S/T, ATSC etc at creation

2/ Actively implement get and set tuning space, as I believe that CreateTopology() will retrieve and use this information...

3/ Respond to a RegisterDeviceFilter() (Note to self, also IBDA_PinControl::RegistrationContext()) from a tuner or demod filter being added to the graph by creating an input and output pin and calling CreateTopology on them.

As i said before, it´s not my Goal to write a full Network Provider. I just want the Device Filters to start the delivering. My tuning works very well for DVB-T and DVB-S. DVB-C is already implemented, but untested, so i don't really see the need to implement the whole TuneRequest Interfaces.
DCoder
That´s what i´ve found in the Generic Tuner Sample in the DDK. It´s within the Constructor of the Filter.

CODE
#ifdef NO_NETWORK_PROVIDER
   //
   //  This code can be used for initial testing of a filter when
   //  a network provider can't be used to configure the filter.
   //  This situation may arise when the receiver topology includes
   //  filters that have not yet been written or when a new network
   //  type does not yet have a network provider implementation.
   //
   //  This code should NOT be used when a driver is delivered into
   //  a working BDA receiver solution.
   //

   //  Create the transport output pin
   //
   Status = BdaCreatePin( pKSFilter,
                          PIN_TYPE_TRANSPORT,
                          &ulOutputPinId
                          );
   if (!NT_SUCCESS(Status))
   {
       goto errExit;
   }
   
   //  Create the topology between the antenna input and
   //  transport output pins.
   //
   //  Note that the antenna input pin was automatically created
   //  because it was included in the pin descriptor list of the
   //  initial filter descriptor passed to BdaCreateFilterFactory.
   //
   Status = BdaCreateTopology( pKSFilter,
                               INITIAL_ANNTENNA_PIN_ID,
                               ulOutputPinId
                               );
   if (!NT_SUCCESS(Status))
   {
       goto errExit;
   }

#endif // NO_NETWORK_PROVIDER


so, it seems it´s actually just needed to create the pin and topology.
JoeyBloggs
QUOTE
Isn't that what we're all doing?
Yup biggrin.gif

QUOTE
Can i use other (maybe Spectrum) Drivers for the KWorld Card ?
Nope CX2388x vs 878 no chance. There are rumours that compliant drivers for the KWorld are coming (But it has been over a year already...)

QUOTE
As i said before, it´s not my Goal to write a full Network Provider. I just want the Device Filters to start the delivering. My tuning works very well for DVB-T and DVB-S. DVB-C is already implemented, but untested, so i don't really see the need to implement the whole TuneRequest Interfaces.
Understood

Which TwinHan drivers ? I had direct tuning (but still with NP) working at one point but the next step release of the drivers seemed to break it ~~~ I'm using 1.2.1.5 at the moment as I found 1.2.1.6 BSOD'ing on me. I have been meaning to try 1.2.1.7
DCoder
I asked the guy with the Twinhan Drivers..waiting for resonse.

Some more Informations. It seems the Output Pin on the Tuner has to be created before I connect my Network Provider to it, otherwise the Output Pin is not able to connect the Receiver Filter.
DCoder
hmm...i tried to create the additional Pin in my Network Provider in the RegisterDeviceFilter Method of IBDA_NetworkProvider. I don't who is calling that Method (I guess the Tuner), but i think that´s the right Location to check for and create the Pin and Topology if it doesn't exist. The Filter passes itself as a Parameter to that Method ... that would make it easier to port that Code into a C++ Version, so testing wouldbemuch easier ...
JoeyBloggs
QUOTE (DCoder @ Apr 14 2005, 12:06 AM)
I asked the guy with the Twinhan Drivers..waiting for resonse.

Some more Informations. It seems the Output Pin on the Tuner has to be created before I connect my Network Provider to it, otherwise the Output Pin is not able to connect the Receiver Filter.
Yeh I just tried creating the output pin and topology on the tuner (which apparently succeeded ~) but could not get a capture filter to connect to it by enumeration at all... (no NP)

Which maybe points to the PinId / Context not being setup ???
JoeyBloggs
The reason that I was saying earlier that the TuningSpace is involved (and I may be reading too much into it)

Is that in the case of hardware (and drivers) that support multiple hardware paths (and multiple templated connection topologies) such as Dvico's Fusion3 which theoretically supports both "Off Air" ATSC / VSB8 and "Local Cable" ATSC / QAM64 (works with their proprietry drivers apparently) although I'm not aware of anyone getting the BDA drivers to work with ATSC / QAM64 even though the hardware supports it...

So something somewhere in the software stack has to make a decision about how the hardware (and Node Topology~) is being configured based on tuning parameters. It may even be that this was the original design and Microsoft never finished writing it, who knows... wink.gif
DCoder
Maybe ... i will port my current NP Code to c++ tonight and create it standalone. Also i noticed that the MPEG-2 Demultiplexer might be setting up something. So far the Order is the following:

1) create my NP
2) create the Tuner
3) connect NP to Tuner
4) during the connection, IBDA_NetworkProvider.RegisterDeviceFilter is called with a Pointer to IUnknown Parameter to the Tuner
5) in RegisterDeviceFilter check if the Tuner has an Output Pin (this will propably need another way to check if the Topology exists)
6) if it doesn't exist, query IUnknown for IBDA_Topology and create Output Pin
7) (only if 6) is done) call CreateTopology with the Parameter that was received by calling CreatePin
8) back in the GraphBuilder, add the additional Demod and/or Receiver Filter and connect them
9) create the Pin Tee
10) connect Receiver to Pin Tee
11) create the MPEG-2 Demultiplexer
12) connect Pin Tee to MPEG-2 Demultiplexer

and now IBDA_NetworkProvider.RegisterDeviceFilter is called again, but this Time the parameter is a Pointer to the MPEG-2 Demultiplexer
DCoder
QUOTE (JoeyBloggs @ Apr 14 2005, 12:34 AM)
The reason that I was saying earlier that the TuningSpace is involved (and I may be reading too much into it)

Is that in the case of hardware (and drivers) that support multiple hardware paths (and multiple templated connection topologies) such as Dvico's Fusion3 which theoretically supports both "Off Air" ATSC / VSB8 and "Local Cable" ATSC / QAM64 (works with their proprietry drivers apparently) although I'm not aware of anyone getting the BDA drivers to work with ATSC / QAM64 even though the hardware supports it...

So something somewhere in the software stack has to make a decision about how the hardware (and Node Topology~) is being configured based on tuning parameters. It may even be that this was the original design and Microsoft never finished writing it, who knows... wink.gif
*


hmm...this makes sence. It makes it even more complicated than i thought. But how is the Device or NP going to know what part of the Device should be enabled ..
JoeyBloggs
Guessing... I think the Demux registers just so the NP can tell the TIF where to remap pid's. ie RegisterTIFEx() gets back an IMPEG2PIDMap
JoeyBloggs
QUOTE
hmm...this makes sence. It makes it even more complicated than i thought. But how is the Device or NP going to know what part of the Device should be enabled ..
Obviously the NP cannot have internal knowledge, so it comes down to the TunerDevice having access to TuningSpace during CreateTopology ??? I think this may be off track for today's goal anyway...
nate
@DCoder,

I just found this thread on the dsp-worx forum. Jeltz is actually correct, although it may differ depending on the drivers being used. With spectrum's drivers you definatly need to submit a tune request (even if the frequency is only set to -1) before you can connect the NP to the Tuner.

To my way of thinking that would indicate that there's something in the tune request that is required during the creation of the tuners output pin && || topology.
DCoder
Hmm..actually, Jeltz is using the Spectrum Drivers and my current solution without the MS Network Provider works very well for him. He also tried the Twinhan Drivers (v 1.2.1.6) and they also connected, but with the Twinhan, there was no Dataflow.

In case you want to play around with, I´ve ported my Network Provider now into an own Filter with a property page to setup Frequency/Bandwidth and Audio/Video PID on the MPEG-2 Demultiplexer. When connecting, the Filter will store the mappings, create the Output Pin on the Tuner (if needed) and create the Audio/Video Pins on the Demux.

The Topology is still created by guessing that the Input Pin has an ID of 0. I also noticed that the call to IBDA_FrequencyFilter.get_FrequencyMultiplier fails. In that case i use a value of 1000 for it.

The Filter is registered as "DVB Network Provider" under the DirectShow Filters Category. It will also output a few OutputDebugString Messages ...

http://files.dsp-worx.de/networkprovider.zip
DCoder
Another User with a Hauppauge Nova-T reported that my NP is working for him biggrin.gif seems I´m close to get what I want ...
DCoder
Update to the NetworkProvider. Seems when no OutputPin is present the IBDA_Frequency Filter isn' available too. Now i´m searching for these interface(s) when needed. This fixes also a Bug that wouldn't create the Output Pin.

http://files.dsp-worx.de/networkprovider2.zip
nate
QUOTE
Hmm..actually, Jeltz is using the Spectrum Drivers and my current solution without the MS Network Provider works very well for him.
Sorry, I wasn't saying that your NP won't work, just that the MS NP will not connect without submitting a tune request first, and that that might imply something about what the MS NP does when it connects.


QUOTE
In case you want to play around with, I´ve ported my Network Provider
Just tried it with my VisionPlus (Spectrum drivers) and it nearly works. Everything connects up fine and data starts flowing, but setting the frequency in the DVBNP doesn't actually change the tuning. It's always outputting data from whatever frequency was used last in DigitalWatch or WebScheduler.


QUOTE
The Topology is still created by guessing that the Input Pin has an ID of 0.
I think that might have to do for now. I can't find anything that hints at how to get the PinId of existing pins.

An alternative might be to use IBDA_Topology::GetTemplateConnections to get the topology, then call IBDA_Topology::CreatePin for the input pin aswell as the output pin. Even if there's an input pin already created internally it might just get ignored if we create another one.
nate
Just found something else worth looking into as an alternative to using IBDA_Topology::CreatePin while reading the comments of BdaMethodCreatePin.
KSMETHODSETID_BdaDeviceConfiguration
I'm not sure how you call it. IKsPropertySet maybe? I've never played with IKsPropertySets before so i'm just guessing there.

EDIT: Perhaps IKsControl::KsMethod rather than IKsPropertySet
JoeyBloggs
@Nate pretty sure these are just the same thing from a DDK vs SDK perpective ~


As far as the pin enum goes I've yet to see anyone who hasn't just copied the DDK samples and made the 0 pin the antenna input... But I don't see a way of programmatically identifying what PinType 0, 1 means ~
JoeyBloggs
QUOTE
QUOTE
In case you want to play around with, I´ve ported my Network Provider

Just tried it with my VisionPlus (Spectrum drivers) and it nearly works. Everything connects up fine and data starts flowing, but setting the frequency in the DVBNP doesn't actually change the tuning. It's always outputting data from whatever frequency was used last in DigitalWatch or WebScheduler.


Similar experiences here with the TwinHan 1.2.1.7 drivers. I can build and connect a graph and it will start no problems. but the tuning doesn't appear to work unless I use another program to change frequencies and there is no data flow until I do ~

Dvico drivers started the same way but once I had data flow (after external tuning first) I could then use the DVB NP to change frequencies successfully...

VBox drivers same as TwinHan back to requiring external tuning changes
nate
QUOTE
As far as the pin enum goes I've yet to see anyone who hasn't just copied the DDK samples and made the 0 pin the antenna input... But I don't see a way of programmatically identifying what PinType 0, 1 means ~

I don't know why i didn't notice this before, but i think getting the pin ID is as simple as querying the input pin for IBDA_PinControl and calling GetPinID()
DCoder
QUOTE (JoeyBloggs @ Apr 15 2005, 12:46 PM)
QUOTE
QUOTE
In case you want to play around with, I´ve ported my Network Provider

Just tried it with my VisionPlus (Spectrum drivers) and it nearly works. Everything connects up fine and data starts flowing, but setting the frequency in the DVBNP doesn't actually change the tuning. It's always outputting data from whatever frequency was used last in DigitalWatch or WebScheduler.


Similar experiences here with the TwinHan 1.2.1.7 drivers. I can build and connect a graph and it will start no problems. but the tuning doesn't appear to work unless I use another program to change frequencies and there is no data flow until I do ~

Dvico drivers started the same way but once I had data flow (after external tuning first) I could then use the DVB NP to change frequencies successfully...

VBox drivers same as TwinHan back to requiring external tuning changes
*


My guess is that IBDA_DeviceControl is not found, so StartChanges/CommitChanges isn't called. What does the Debug Log say? You can view the Debug Messages with Debug View http://www.sysinternals.com/ntw2k/freeware/debugview.shtml

QUOTE (nate @ Apr 15 2005, 02:45 PM)
QUOTE
As far as the pin enum goes I've yet to see anyone who hasn't just copied the DDK samples and made the 0 pin the antenna input... But I don't see a way of programmatically identifying what PinType 0, 1 means ~

I don't know why i didn't notice this before, but i think getting the pin ID is as simple as querying the input pin for IBDA_PinControl and calling GetPinID()
*



Yeah, i guess this will do it biggrin.gif When calling IBDA_Topology.GetPinTypes, i get an array 2 types (0 and 1), so if IBDA_PinControl.GetPinType on the Input Pin returns 0, the Output Pin most likely has to be PinType 1, but if there are more than 2 PinTypes then it would be a guess again (just choose one of the list).
nate
QUOTE (DCoder @ Apr 15 2005, 06:31 PM)
Yeah, i guess this will do it biggrin.gif When calling IBDA_Topology.GetPinTypes, i get an Array 2 types (0 and 1), so if IBDA_PinControl.GetPinType on the Input Pin returns 0,  the Output Pin most likely has to be PinType 1, but if there are more than 2 PinTypes then it would be a guess again (just choose one of the list).

I guess that's where GetTemplateConnections comes in.
According to the docs for BDA_TEMPLATE_CONNECTION the pin type is an index to an array of KSPIN_DESCRIPTOR_EX objects. Perhaps there's some info in there that can be used to make sure the output pin is of the right type. Maybe something in the KSDATARANGE which is part of the KSPIN_DESCRIPTOR. I guess there's not way to know if we're right until we come across a driver with more than 2 pin types.
That said, i don't know how to get the actual array of data that the pin type is an index of.
DCoder
Here's a log of my NP with Kworld Drivers.

CODE
[3580] NP: calling IBDA_Topology.GetNodeDescriptors
[3580] NP: NodeDescriptors count = 2
[3580] NP:  looping through NodeDescriptors
[3580] NP:   NodeDescriptor 0  Type     = 0
[3580] NP:   NodeDescriptor 0  Function = {71985F4C-1CA1-11D3-9CC8-00C04F7971E0} KSNODE_BDA_RF_TUNER
[3580] NP:   NodeDescriptor 0  Name     = {00000000-0000-0000-0000-000000000000} Unknown
[3580] NP:   NodeDescriptor 1  Type     = 1
[3580] NP:   NodeDescriptor 1  Function = {2DAC6E05-EDBE-4B9C-B387-1B6FAD7D6495} KSNODE_BDA_COFDM_DEMODULATOR
[3580] NP:   NodeDescriptor 1  Name     = {00000000-0000-0000-0000-000000000000} Unknown
[3580] NP: calling IBDA_Topology.GetNodeTypes
[3580] NP: NodeTypes count = 2
[3580] NP: looping through Nodes
[3580] NP:  NodeType 0
[3580] NP:   Value from GetNodeTypes = 0
[3580] NP:   calling IBDA_Topology.GetNodeInterfaces on NodeType = 0
[3580] NP:   NodeInterfaces count = 2
[3580] NP:   looping through NodeInterfaces
[3580] NP:    NodeInterface 0 has GUID {71985F47-1CA1-11D3-9CC8-00C04F7971E0} KSPROPSETID_BdaFrequencyFilter
[3580] NP:    NodeInterface 1 has GUID {1347D106-CF3A-428A-A5CB-AC0D9A2A4338} KSPROPSETID_BdaSignalStats
[3580] NP:  NodeType 1
[3580] NP:   Value from GetNodeTypes = 1
[3580] NP:   calling IBDA_Topology.GetNodeInterfaces on NodeType = 1
[3580] NP:   NodeInterfaces count = 2
[3580] NP:   looping through NodeInterfaces
[3580] NP:    NodeInterface 0 has GUID {EF30F379-985B-4D10-B640-A79D5E04E1E0} KSPROPSETID_BdaDigitalDemodulator
[3580] NP:    NodeInterface 1 has GUID {1347D106-CF3A-428A-A5CB-AC0D9A2A4338} KSPROPSETID_BdaSignalStats
[3580] NP: calling IBDA_Topology.GetPinTypes
[3580] NP: PinTypes count = 2
[3580] NP:  looping through PinTypes
[3580] NP:   PinType 0 is 0
[3580] NP:   PinType 1 is 1
[3580] NP: calling IBDA_Topology.GetTemplateConnections
[3580] NP: TemplateConnections count = 3
[3580] NP:  looping through TemplateConnections
[3580] NP:   TemplateConnection 0 FromNodeType    = 4294967295
[3580] NP:   TemplateConnection 0 FromNodePinType = 0
[3580] NP:   TemplateConnection 0 ToNodeType      = 0
[3580] NP:   TemplateConnection 0 ToNodePinType   = 0
[3580] NP:   TemplateConnection 1 FromNodeType    = 0
[3580] NP:   TemplateConnection 1 FromNodePinType = 1
[3580] NP:   TemplateConnection 1 ToNodeType      = 1
[3580] NP:   TemplateConnection 1 ToNodePinType   = 0
[3580] NP:   TemplateConnection 2 FromNodeType    = 1
[3580] NP:   TemplateConnection 2 FromNodePinType = 1
[3580] NP:   TemplateConnection 2 ToNodeType      = 4294967295
[3580] NP:   TemplateConnection 2 ToNodePinType   = 1


To get the right connection, i would first checkif the Output Pin exists. if it doesn't exist, check the PinID and PinType on the Input Pin and compare it to IBDA_Topology.GetPinTypes. Then use these ID(s) and compare it to IBDA_Topology.GetTemplateConnections and search for a connection where both ID's are present (in my case Template Conenction 1).
JoeyBloggs
That is more likely a single set of template connections ie

CODE
The following code snippet shows examples of arrays of template connections and joints:

//
//  BDA Template Topology Connections
//
//  Lists the possible connections between pin types and
//  node types. This structure along with the BDA_FILTER_TEMPLATE,
//  KSFILTER_DESCRIPTOR, and BDA_PIN_PAIRING structures
//  describe how topologies are created in the filter.
//
const
KSTOPOLOGY_CONNECTION TemplateTunerConnections[] =
{
   { -1,  0,  0,  0}, // from upstream filter to 0 pin of 0 node
   {  0,  1,  1,  0}, // from 1 pin of 0 node to 0 pin of 1 node
   {  1,  1,  -1, 1}, // from 1 pin of 1 node to downstream filter
};
//
//  Lists the template joints between antenna (input) and transport
//  (output) pin types. Values given to joints correspond to indexes
//  of elements in the preceding KSTOPOLOGY_CONNECTION array.
//
//  For this template topology, the RF node (0) belongs to the antenna
//  pin and the 8VSB demodulator node (1) belongs to the transport pin
//
const
ULONG   AntennaTransportJoints[] =
{
   1  // Second element in the preceding KSTOPOLOGY_CONNECTION array.
};


DCoder's solution for finding the input pin seems reasonable to me
QUOTE
if IsEqualGUID(mt.majortype, KSDATAFORMAT_TYPE_BDA_ANTENNA)


The problem remains to reliably get the data flowing for all drivers...
DCoder
From the logs of one of the DNTV Devs, i can see that the PinTypes are equal on all Devices (0 and 1) so, i will do a comparison between IBDA_PinControl on the input pin and IBDA_Topology.GetPinTypes to create the Output Pin. I guess that will do it for now ..

Regarding the Dataflow, i don't know how to continue. Each Device has different failures. We definitly need a Debug Build of a Driver (Spectrum?) that Outputs shitload of Dbg Messages, so we can connect the MS NP and mine and compare the differences.
JoeyBloggs
@DCoder what OS and SP's are you testing with ? I'm using Win2000 SP4 and AFAIK Nate's still on WinXP SP1.
DCoder
I am testing on Windows XP and Windows XP MCE 2005, both with SP2 and DX9.0c (the non MCE OS has the DX9SDK installed though). On the MCE OS i use the Conexant 4.0.99.0 Drivers. These Drivers doesn't have the Output Pin created. On the other OS i use the 4.0.107.0 Drivers. This Version has the Pin automagically created.

IMHO MCE has a newer Network Provider that any other OS. I noticed that the mappings on the MPEG-2 Demultiplexer are completely different. i.e Video and Audio Pins are mapped on Pin 3 and 4.
JoeyBloggs
Yeah that makes sense, the TIF is much newer too. Microsoft is obviously trying to freeze competition out sad.gif and also force OS upgrades $$$ I guess... dry.gif

Between us we have a good test coverage, just need some approach to sort out the NP / Tuner interactions. I'll PM Spectrum and see what's possible from his perspective.
JoeyBloggs
All this with the released TwinHan V1.2.1.9 drivers.

Firstly the good news cool.gif

I can get Direct Tuning (still with a NP) working by not setting the bandwidth ie

CODE
     hr = piFrequencyFilter->put_Frequency(lFrequency);

     MYTRACE(_T("piFrequencyFilter->put_Frequency(%ld) - hr = 0x%08lx\n"), lFrequency, hr);

////  hr = piFrequencyFilter->put_Bandwidth(lBandwidth); // direct tune FAILS
////  hr = piFrequencyFilter->put_Bandwidth(         0); // direct tune FAILS
////  hr = piFrequencyFilter->put_Bandwidth(        -1); // direct tune SUCCEEDS

     MYTRACE(_T("piFrequencyFilter->put_Bandwidth(%ld) - hr = 0x%08lx\n"), lBandwidth, hr);
So maybe even though the drivers are installed with the FixedBandwidth option, calling put_Bandwidth() totally confuses the drivers ??? ~~~

I guess there could also be confusion with FreqMultiplier but I tried 7000000, 7000, 7 without success...


As far as constructing a graph without a NP, I have not been successfull sad.gif

Even though the CreatePin() and CreateTopology() calls apparently SUCCEED there does not appear to be any actual output pin created and subsequent attempts to load and connect the capture filter obviously fail :-(

CODE
hr = poTunerFilter->m_piBaseFilter->QueryInterface(IID_IBDA_Topology, reinterpret_cast<void**>(&piTopology) );

if (SUCCEEDED(hr))
{
    ULONG ulInputPinId  = 0;
    ULONG ulOutputPinId = 0;

    hr = piTopology->CreatePin(/*PIN_TYPE_TRANSPORT*/ 1, &ulOutputPinId);

    hr = piTopology->CreateTopology(ulInputPinId, ulOutputPinId);
}

/////////////

if (true)
{
    USES_CONVERSION;

    IEnumPins*  piEnum    = NULL;
    IPin*       piPin     = NULL;
    PIN_INFO    stPinInfo;

    // Get a pin enumerator
    hr = poTunerFilter->m_piBaseFilter->EnumPins(&piEnum);

    if (SUCCEEDED(hr))
    {
 // Look for the pins
 DWORD ulRetrieved = 0;

 while (piEnum->Next(1, &piPin, &ulRetrieved) == S_OK)
 {
     hr = piPin->QueryPinInfo(&stPinInfo);

     MYTRACE(_T("%s Pin '%s'\n"), (stPinInfo.dir == PINDIR_INPUT) ? _T("Input ") : _T("Output"), OLE2T(stPinInfo.achName) );

     if (stPinInfo.pFilter != NULL)
     {
   stPinInfo.pFilter->Release();
     }

     piPin->Release();
 }
    }
}
nate
QUOTE
So maybe even though the drivers are installed with the FixedBandwidth option, calling put_Bandwidth() totally confuses the drivers ???
That's rather disturbing. Does it still happen if you put the bandwidth first and then the frequency?

QUOTE
Even though the CreatePin() and CreateTopology() calls apparently SUCCEED there does not appear to be any actual output pin created and subsequent attempts to load and connect the capture filter obviously fail :-(
We're definatly missing something. Just a thought, but perhaps CreatePin and CreateTopology need to be wrapped in IBDA_DeviceControl::StartChanges and IBDA_DeviceControl::CommitChanges??
JoeyBloggs
Now that's close to the metal smile.gif smile.gif

QUOTE
Watching channel '7 Digital'
StartWatching - ChannelChangeEnd    447 ms

Watching channel 'NINE DIGITAL'
StartWatching - ChannelChangeEnd    443 ms

Watching channel 'TEN Digital'
StartWatching - ChannelChangeEnd    608 ms

Watching channel 'SBS DIGITAL 1'
StartWatching - ChannelChangeEnd    441 ms

Watching channel 'ABC TV Sydney'
StartWatching - ChannelChangeEnd    454 ms

Watching channel 'NINE DIGITAL'
StartWatching - ChannelChangeEnd    453 ms

Watching channel '7 Digital'
StartWatching - ChannelChangeEnd    441 ms

Watching channel 'TEN Digital'
StartWatching - ChannelChangeEnd    501 ms
JoeyBloggs
QUOTE (nate @ Apr 18 2005, 05:33 PM)
QUOTE
So maybe even though the drivers are installed with the FixedBandwidth option, calling put_Bandwidth() totally confuses the drivers ???
That's rather disturbing. Does it still happen if you put the bandwidth first and then the frequency?
I didn't try but as the changes are batched it makes no sense that they would be order dependant ~

QUOTE (nate @ Apr 18 2005, 05:33 PM)
QUOTE
Even though the CreatePin() and CreateTopology() calls apparently SUCCEED there does not appear to be any actual output pin created and subsequent attempts to load and connect the capture filter obviously fail :-(
We're definatly missing something. Just a thought, but perhaps CreatePin and CreateTopology need to be wrapped in IBDA_DeviceControl::StartChanges and IBDA_DeviceControl::CommitChanges??
Yup we are definitely missing something ~ But I'm pretty sure you need to have the Topology created before calling IBDA_DeviceControl methods...

[EDIT] Well I tried it anyway, no change [/EDIT]
DNTV Live!
Hi All,

After extended tests myself I will agree with Joey that the set bandwidth function is failing when used with a Tuner/Demod filter that does not have output pin pre created for us.

Interesting thing is if I run the card in WS or any BDA app that uses the MS NP then create a filtergraph with DVB NP then it works and I can change frequencies. If I set bandwidth to 8 MHZ or something whacky it does not effect playback thus it is definately failing.

Thus confirms it I think.

Hmmm what are we missing?

Cheers
JoeyBloggs
Ok that's different from the behaviour that I am seeing, even with a MS NP connected set_Bandwidth() on the TwinHan drivers is causing them to fail (under Win2000 SP4). What are you running ?
DNTV Live!
XP SP2
DCoder
@JoeyBloggs
For my KWorld Device, the Frequency Multiplier doesn't affect the Bandwidth Settings. I have to setup the Bandwidth to 8 to get it work. But -1 for you ??? blink.gif
JoeyBloggs
Only in the sense of not setting the bandwidth, I suspect. Simply not calling put_Bandwidth() achieves the same thing.

QUOTE
//  Settings for Tuner Frequency
//
#define BDA_FREQUENCY_NOT_SET       -1
#define BDA_FREQUENCY_NOT_DEFINED   0

//  Settings for Tuner Range
//
//  Tuner range refers to the setting of LNB High/Low as well as the
//  selection of a satellite on a multiple satellite switch.
//
#define BDA_RANGE_NOT_SET       -1
#define BDA_RANGE_NOT_DEFINED   0

//  Settings for Tuner Channel Bandwidth
//
#define BDA_CHAN_BANDWITH_NOT_SET       -1
#define BDA_CHAN_BANDWITH_NOT_DEFINED   0

//  Settings for Tuner Frequency Multiplier
//
#define BDA_FREQUENCY_MULTIPLIER_NOT_SET        -1
#define BDA_FREQUENCY_MULTIPLIER_NOT_DEFINED    0

#endif // not defined _BDATYPES_

// end of file -- bdatypes.h
DCoder
New build of my NP. According to the DNTV Dev, it works on all Devices he tried. I´m interested how it works with the Spectrum Drivers ...

http://files.dsp-worx.de/networkprovider5.zip
JoeyBloggs
As long as I set Bandwidth to -1 it works with TwinHan and Dvico Fusion drivers, it doesn't work with the VBox drivers as there is no output pin created on the Demod filter and hence no connection between the Demod and Capture filters~
renura
QUOTE (DCoder @ Apr 19 2005, 11:35 AM)
New build of my NP. According to the DNTV Dev, it works on all Devices he tried. I´m interested how it works with the Spectrum Drivers ...

http://files.dsp-worx.de/networkprovider5.zip
*


Hi Dcoder and All,

I have tested your latest NP and can confirm that it works with at least the following devices:

TwinHan DVB-t - all of them
DNTV Live! DVB-T PCI
DigitalNow tinyUSB2
Compro T300
DVICO DVB-T PCI - all of them
DVICO USB devices - all of them
LifeView DVB-t

As I have the time I will try with the V-Box devices as well as a few others not yet released.

Good work smile.gif

Cheers

Renura
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.