nate
Mar 8 2004, 01:09 PM
QUOTE
The main problem for me is working out how to mux the elemental streams back into a PES stream to save to a file.
I'm just about to start working on a filter to do that. I managed to get a fair idea of how it all works from trying to implement libmpeg2 in vidomi, but we'll see how it goes. I think i'll probably have my nose buried in mpeg2 spec manuals for the first week though.
If i can get it done then there'll be nothing stopping me adding BDA support to DigitalWatch.
null_pointer
Mar 8 2004, 08:36 PM
QUOTE
I'm just about to start working on a filter to do that. I managed to get a fair idea of how it all works from trying to implement libmpeg2 in vidomi, but we'll see how it goes. I think i'll probably have my nose buried in mpeg2 spec manuals for the first week though.
If i can get it done then there'll be nothing stopping me adding BDA support to DigitalWatch.
You may want to check out he source of the mplex tool from the mjpegtools package:
http://sourceforge.net/project/showfiles.p...package_id=5823
I have been playing with the Moonlight XMuxer:
http://www.elecard.com/products/xmuxer.shtml
I can demux the transport stream and then use the moonlight Xmuxer to mux the video and audio I am interested in and then save the stream to the HD using the Dump filter.
http://www.digtv.ws/temp/capture.png
It works, it would be good to have an open source filter though.
Spectrum, would it be possible to make the source filter work with multiple cards?
Spectrum
Mar 8 2004, 10:06 PM
Multiple cards? Sure, my second card (a Chaintech) is in my Windows Media Center Edition PC working full time as my HTPC so my development box only has a single card - but I should be able modify the code regardless. I haven't done too much programming recently - sitting at the PC for too long in Summer is awful (I hate the heat). But I expect to get back into it real soon.
Spectrum
JoeyBloggs
Mar 9 2004, 04:31 PM
Multicard would be a good step forward from my perspective as well
null_pointer
Apr 13 2004, 10:13 AM
Hi Spectrum,
How is the to do list going?
To Do:
-Implement power state changes (eg. recovery from PC suspend state).
-Correctly implement signal strength/quality.
I am thinking you do not need to correctly implement the strength/quality values, the dBm rating would be good but very hard to implement as you can not calibrate the readings anyway. I would say something like take 80 as the zero mark and anything above that is + and anything below is -.
The power state changes are quite important as the software I am working on will allow the PC to go to sleep and wake it up etc (S3).
Multiple cards would also be good but I can not find any reference in the MSDN docs about how it should be handled.
Spectrum
Apr 14 2004, 09:37 AM
Signal strength is all cleaned up - the documentation is conflicting but I've returned to a percentage reading (the value read from the card), so that whole +/- millidecibel crap is to be forgotten.
As for handling power transitions, well I just wish I understood what my requirement is. I have a basic understanding of what happens generally, but the documentation does not say exactly what I need to cover. As it is, I can press the power button on the MCE remote while watching live TV and the box will suspend to S3 state. Then I press the button again and it comes up and live TV plays straight away - so I have no problem with power transitions as far as I can see. I guess I'm going to have to find someone who knows this a little better. I've posted to some news groups so hopefully someone will be forthcoming with information.
With the multiple cards scenario, I just need some time to pull apart my MCE box and put that card into my development box to test two-at-once. An upcoming weekend I hope.
I've been doing a lot of code refactoring and removing some bugs along the way. I'll release a new driver set soon.
Spectrum.
null_pointer
Apr 14 2004, 11:22 AM
QUOTE
Signal strength is all cleaned up - the documentation is conflicting but I've returned to a percentage reading (the value read from the card), so that whole +/- millidecibel crap is to be forgotten.
The signal strength is only for an indication anyway so as long as it gives you some sort of level then that should be fine.
QUOTE
As for handling power transitions, well I just wish I understood what my requirement is. I have a basic understanding of what happens generally, but the documentation does not say exactly what I need to cover. As it is, I can press the power button on the MCE remote while watching live TV and the box will suspend to S3 state. Then I press the button again and it comes up and live TV plays straight away - so I have no problem with power transitions as far as I can see. I guess I'm going to have to find someone who knows this a little better. I've posted to some news groups so hopefully someone will be forthcoming with information.
If you can bring your system out of S3 and the driver still works then you have no problem :-) it looks like it is already sleep enabled.
QUOTE
With the multiple cards scenario, I just need some time to pull apart my MCE box and put that card into my development box to test two-at-once. An upcoming weekend I hope.
The main question I have here is how would a programmer get access to both cards? Would the second instance of the capture filter reference the second card etc?
QUOTE
I've been doing a lot of code refactoring and removing some bugs along the way. I'll release a new driver set soon.
Cool, I am about to start working an a guide store dll that will allow
apps to create Tune Requests based on a tuning space and list of
Locators etc.
Has anyone done any work on this yet, I do not want to reinvent the
wheel if someone has already started work on this?
JoeyBloggs
Apr 14 2004, 11:36 AM
Nope, go for it
null_pointer
Apr 14 2004, 02:34 PM
Spectrum, where did you get your original Tuning space reg file from, did you create it yourself?
JoeyBloggs
Apr 14 2004, 02:41 PM
I remember him saying something about poking binary values into the dll as MCE wasn't setup for Australia. I think he reused the german frequencies area ~
null_pointer
Apr 14 2004, 03:07 PM
I am just talking about the reg file that he has available for download with the DVB-T tuning space in it.
When you add this info to your registry it adds a new Tuning space of type DVB-T I was just wondering where Spectrum got it from.
Spectrum
Apr 14 2004, 04:07 PM
It came from MCE. It's not related to the MCE DLL I mentioned before. You could make your own one up, but what's the point - I can't see any need for multiple tuning spaces for DVB-t.
Spectrum
null_pointer
Apr 14 2004, 07:16 PM
No, neither can I, I was just wondering where it came from that's all.
Spectrum
Apr 14 2004, 10:06 PM
I've just done a quick test (an extensive test and possible debug session will have to wait) and I'm successfully running two graphs simultaneously with both cards installed with no code changes. Channel 7 in one window and Channel 10 in the other

I need to return the second card to my MCE box for now but I will definitely look into this some more later.
Certainly looks promising.
BTW, MCE can't even run with two cards installed :cry: I hope they support multiple cards eventually.
Spectrum
JoeyBloggs
Apr 14 2004, 10:20 PM
That's real cool
Spectrum
Apr 14 2004, 10:35 PM
The latest driver set is now available.
http://home.swiftdsl.com.au/~spectrum/drivers.zip
Spectrum
null_pointer
Apr 15 2004, 07:11 AM
QUOTE
I've just done a quick test (an extensive test and possible debug session will have to wait) and I'm successfully running two graphs simultaneously with both cards installed with no code changes. Channel 7 in one window and Channel 10 in the other

I need to return the second card to my MCE box for now but I will definitely look into this some more later.
Certainly looks promising.
BTW, MCE can't even run with two cards installed :cry: I hope they support multiple cards eventually.
Spectrum
If it works in Graphedit them it should work when driving the card from an application. I will start playing this weekend :-)
Spectrum
Apr 15 2004, 09:15 AM
I've had a quick look at the Directx DDK documentation, and found this function
http://msdn.microsoft.com/library/default....tsavailable.asp that might be useful for enumerating multiple cards.
I haven't done any programming in this area so it might not work but it's probably a good place to start.
This is assuming you're using the Video Control null_pointer? (The Video Control should make programming digital TV apps relatively easy).
Spectrum
null_pointer
Apr 15 2004, 09:26 AM
I will not be using the "Video Control" but building and controlling
the Graph manually, what is outlined in the link should still be
possible using the Device Enumeration interfaces that are available
though.
This is all looking very promising, I have been reading everything I
can get my hands on regarding "Microsoft Unified Tuning Model" and
"Broadcast Driver Architecture (BDA)" systems.
I will start playing with actual code this weekend, at the moment I am
just getting my head around the interfaces and filters and how they
interact etc, the DBA approach is a much better and more flexible way
of driving TV hardware then the old WDM way.
Spectrum
Apr 15 2004, 09:29 AM
Why you are building the graph manually? I would have thought allowing the Video Control to do most of the work would be a good thing. Keeping in mind that the Video Control is only available in Windows XP or newer (and my BDA drivers are only for XP anyway).
Spectrum
null_pointer
Apr 15 2004, 09:50 AM
QUOTE
Why you are building the graph manually?
Because I can :-)
The main reason is you have more control over what decoders are used etc, and in my case I do not want to render the streams at all, in fact I do not even want to demux the TS, I just want to dump the Transport Stream to disk.
QUOTE
I would have thought allowing the Video Control to do most of the work would be a good thing.
It is, but I want to do non standard things like dump the Transport Stream to disk etc.
QUOTE
Keeping in mind that the Video Control is only available in Windows XP or newer (and my BDA drivers are only for XP anyway).
Are you sure, if you have followed the DirectX 9.0 DDK then your BDA driver should work anywhere DirectX 9 will...or am I mistaken?
Spectrum
Apr 15 2004, 10:25 AM
There is no DirectX DDK - only an SDK. I've programmed the Driver using the Windows 2003 DDK, building Windows XP drivers.
By the way, a BDA driver is a type of AVStream driver which is a valid WDM driver, but not in the way most tv card manufacturers imply.
Spectrum
null_pointer
Apr 15 2004, 11:08 AM
QUOTE
There is no DirectX DDK - only an SDK. I've programmed the Driver using the Windows 2003 DDK, building Windows XP drivers.
http://msdn.microsoft.com/library/default....esinternals.asp
QUOTE
BDA is documented in the DirectX 9.0 DDK and the Microsoft Platform DDK for Windows XP.
The above page mentioned the "DirectX 9.0 DDK" so I thought it was a real Development Kit, perhaps it is just a reference document.
I understand the driver will not work on Win9X/Me but it should work on Win2K/XP and 2003 shouldn't it????
QUOTE
By the way, a BDA driver is a type of AVStream driver which is a valid WDM driver, but not in the way most tv card manufacturers imply.
The above page has a very good explanation of how it all fits together.
Spectrum
Apr 15 2004, 11:12 AM
I don't have access to any pre Windows XP system so I can't do any tests.
So if you're not using the Video Control you might want to take a look at this document
http://msdn.microsoft.com/library/en-us/di...eenumerator.asp which tells you how to enumerate filters. You should just need to specify the correct GUIDs.
Spectrum
null_pointer
Apr 15 2004, 12:12 PM
QUOTE
I don't have access to any pre Windows XP system so I can't do any tests.
Cool, perhaps someone with Windows 2K can install the drivers and see if they work.
QUOTE
So if you're not using the Video Control you might want to take a look at this document
http://msdn.microsoft.com/library/en-us/di...eenumerator.asp which tells you how to enumerate filters. You should just need to specify the correct GUIDs.
Yep, that is what I was referring to in one of my previous posts.
I am going to have a go this weekend at converting the DBA sample that comes with the DirectX SDK over to a DVB-T app.
Once this is done I will start working on the Tune Request Factory DLL.
JoeyBloggs
Apr 15 2004, 12:18 PM
There is a Dx9 DDK but it's Microsoft Internal only afaik. I saw a reference to it yesterday when I was reading some of the WinHEC2003 presentations.
Spectrum
Apr 15 2004, 12:21 PM
In that case null_pointer can you start a new thread when you're ready where we can discuss the API for your Tune Request Factory.
Spectrum
JoeyBloggs
Apr 15 2004, 12:49 PM
Spectrum,
When you trialed the dual tuner scenario using GraphEdit. Is it just a case of inserting 2 MS DVB-T provider filters and they automagically pickup the first available compatible device ? Or is there more too it than that.
Regards
Joey
null_pointer
Apr 15 2004, 12:55 PM
QUOTE
In that case null_pointer can you start a new thread when you're ready where we can discuss the API for your Tune Request Factory.
Good idea, will do.
Spectrum
Apr 15 2004, 01:25 PM
I always insert the DVB-T Network Provider, BDA Tuner, and BDA Capture filters, then submit a tune request on the network provider, and finally render the network provider's output pin to build a complete graph. ie. I do it manually.
From memory with both devices installed you just see them like this
BDA Source Filters
->Spectrum BDA Tuner
->Spectrum BDA Tuner
BDA Receiver Components
->Spectrum BDA Capture
->Spectrum BDA Capture
Where you pick the first filter from each set for one graph and the second filter from each set for the other graph. Programatically, I don't know beyond what's already listed in earlier posts.
Maybe I need to somehow change the code to generate different names like this
BDA Source Filters
->Spectrum BDA Tuner
->Spectrum BDA Tuner (2)
Anyway I'll need to do some research on this (God the long hours of research work never ends :wink: )
Spectrum
JoeyBloggs
Apr 15 2004, 02:11 PM
Excuse me sir. May I be excused. My brain is full
null_pointer
Apr 16 2004, 08:42 AM
OK, I had some free time last night so started playing with this, I
installed the drivers, all worked fine, drivers installed and I could
then see the Spectrum options in GraphEdit.
Started playing with GraphEdit and all is working great, I can now
watch TV without having to touch the TwinHan drivers/software at all
:-)
I started modifying the BDA example app that comes with the DirectX
SDK and got it working with DVB-T tune requests and DVB-T Tune Spaces.
I did not get a lot of time to play with the app last night, I will
play a bit more this weekend. There are one or two small issues I did
not get a chance to investigate but it is working and I can
use it to watch TV and change channels etc.
One thing I did notice is that it does not matter what Bandwidth you
submit in your DVBT Tune Request it always works, Spectrum are you
hard coding any of the tune option in the tuner driver?
So last night I got the driver installed and used GraphEdit to watch
TV and then capture the Transport Stream to Disk which I then demuxed
using ProjectX and remuxed just the streams I wanted. All worked fine
but much more testing needs to be done. And all of this without having
to touch the buggy TwinHan SDK at all :-)
Spectrum
Apr 16 2004, 01:12 PM
:oops: Yes the bandwidth is hard coded. If you see the need I can put some code in to allow it to be manually set.
Spectrum
JoeyBloggs
Apr 16 2004, 01:15 PM
Good work
Now you need to run up two (2) GraphEdits and see if that will work :wink:
null_pointer
Apr 16 2004, 01:44 PM
It would probably be better to not hard code the options, this card is available in other counrties so it might be a good idea to try to support as many of the tune options that the DVB-T Locator and Base Locator can supply. Following is a list of the Locator interface settings.
ILocator Interface:
put_CarrierFrequency - Sets the frequency of the RF signal.
put_InnerFEC - Sets the type of inner forward error correction that is used.
put_InnerFECRate - Sets the inner FEC rate.
put_Modulation - Sets the modulation type.
put_OuterFEC - Sets the type of inner forward error correction that is used.
put_OuterFECRate - Sets the outer FEC rate.
put_SymbolRate - Sets the QPSK symbol rate.
And for the DVB-T specifice Locator Interface:
put_Bandwidth - Sets the bandwidth of the frequency in megahertz, usually 7 or 8.
put_Guard - Sets the guard interval.
put_HAlpha - Sets the hierarchy alpha.
put_LPInnerFEC - Sets the inner FEC type of the low-priority stream.
put_LPInnerFECRate - Sets the inner FEC rate of the low-priority stream.
put_Mode - Sets the transmission mode.
put_OtherFrequencyInUse - Specifies whether the frequency is being used by another DVB-T broadcaster.
Having said that the driver should try to support most of the above, I do not even know what half of them are so that might be a bit hard :-)
Also I could not see anywhere in the Graphedit interface for submitting tune requests where you could specify the DVBT locator options (bandwidth), I could only see the Base Locator interface settings, so if you do implement this your driver my not work with Graphedit any more.
I hope to finish modifying the BDA sample app for DVB-T on the weekend and will make the source available as well as an exe so people can use your driver etc. I will then start thinking about a Tune Request Factory DLL.
null_pointer
Apr 16 2004, 01:46 PM
QUOTE
Good work
Now you need to run up two (2) GraphEdits and see if that will work :wink:
At the moment I do not have two cards in the same machine, I will try this once I have some working code to throw at two cards but for now I am just trying to get my head around how to drive this driver and tuner etc.
Spectrum
Apr 16 2004, 01:54 PM
Actually out of all the functions listed for the interfaces above, the VisionPlus card only supports carrier frequency and bandwidth. It determines the rest automatically from the signal.
I had noticed that the bandwidth was not being passed to the driver (probably when using GraphEdit as you pointed out above) - I think that's why I hard coded "7" in the first place. I'll do some more investigation over the weekend.
If it turns out that the bandwidth is not always passed, I will still need to use some default value. I was thinking maybe I could ask the user at installation time what country they were in and write a bandwith value to the registry that the driver can read later on. It may be possible to just get the computer location setting and work from that too.
Spectrum
Spectrum
Apr 16 2004, 01:59 PM
It will be great to have null_pointer and anyone else who want to join in writing applications. The more the better.
Spectrum
null_pointer
Apr 16 2004, 02:11 PM
You could add auto detection of the bandwidth based on the location id from the system settings, i.e. location 61 (Aust) would default to 7 etc but if a bandwidth was passed in then that is what it would use regardless.
When you are creating an app you will always be adding a DVBTLocator to your Tune Requesty so you will always be setting the bandwidth.
My intention is to create a BDA DLL plugin for Web Scheduler, it will capture the complete Transport Stream initially but there are other filters that hopfully will allow individual demuxed A/V streams to be muxed and saved as a program stream MPG file.
JoeyBloggs
Apr 16 2004, 02:17 PM
Trying hard not to get distracted... but I might get another VP and put it in my secondary machine
Well I would suggest an open source (MIT) test bed in c++ that we could all work with to start off with. You, Shaun, Nate, Myself... It's a bit pointless all four of us adapting the BDA sample ?
null_pointer
Apr 16 2004, 02:27 PM
QUOTE
It's a bit pointless all four of us adapting the BDA sample ?
Yep, agreed, once I have made a few more changed I will upload the
source and exe to my server, it will be a starting point for people to
look at or use as a base to create TV apps etc.
It is much easier to understand how this works when you have a working
c++ code sample in from of your.
The main problem is understanding the Microsoft Unified Tuning Model,
it is quite different to the old WDM tuning interface that are
available for the old analog cards.
Spectrum
Apr 16 2004, 07:39 PM
null_pointer, I've updated the drivers to allow the setting/getting of bandwidth and frequency multiplier. As I can't test bandwidth with GraphEdit could you give it a go please? GraphEdit uses a frequency multiplier of 1000 by default it seems.
Hopefully you'll fail to tune any channels with bandwidth values other than 7.
http://home.swiftdsl.com.au/~spectrum/drivers.zip
Spectrum
null_pointer
Apr 17 2004, 05:12 PM
frequency multiplier?
Where is this set? I can not find any reference to it in the Locator Interfaces.
I have had a little bit of a play and can not get it to use the custom bandwidth. Also the version number in one of the INF file is still showing 1.1.0.0 instead of 1.2.0.0
I have finished modifying the BDA sample, it is available in source and binary format from the following URL:
http://www.digtv.ws/files/dvb/BDA/
Spectrum
Apr 19 2004, 02:51 PM
null_pointer, I'm not sure if this explains it, but if so, it appears put_Bandwidth is not implemented. I suspect we'll just have to wait for a DirectX update to fix it:
http://groups.google.com.au/groups?hl=en&l...bda%2Bbandwidth
Either that or the wrong interface is being used. My DirectShow is a little rusty but would the
http://msdn.microsoft.com/library/en-us/di...erinterface.asp IBDA_FrequencyFilter interface work? It defines get/put_Bandwidth as well as get/put_FrequencyMultiplier.
Spectrum
ngoodchild
Apr 19 2004, 03:43 PM
A working BDA sample, I'd like to see that!
null_pointer
Apr 19 2004, 06:33 PM
QUOTE
A working BDA sample, I'd like to see that!
So are you saying the sample availabel from the above link works or does not work on your system?
null_pointer
Apr 19 2004, 06:35 PM
QUOTE
null_pointer, I'm not sure if this explains it, but if so, it appears put_Bandwidth is not implemented. I suspect we'll just have to wait for a DirectX update to fix it:
Either that or the wrong interface is being used. My DirectShow is a little rusty but would the IBDA_FrequencyFilter interface work? It defines get/put_Bandwidth as well as get/put_FrequencyMultiplier.
Spectrum
It looks like the DVB-T network provider filter does not support the bandwidth option then.
bionicdonkey
Apr 19 2004, 07:05 PM
QUOTE
QUOTE
null_pointer, I'm not sure if this explains it, but if so, it appears put_Bandwidth is not implemented. I suspect we'll just have to wait for a DirectX update to fix it:
Either that or the wrong interface is being used. My DirectShow is a little rusty but would the IBDA_FrequencyFilter interface work? It defines get/put_Bandwidth as well as get/put_FrequencyMultiplier.
Spectrum
It looks like the DVB-T network provider filter does not support the bandwidth option then.
I'm not sure i quite follow what your saying as i'm still trying to figure dba and c++ all at once which is very hard on the brain, but isn't the bandwidth set in the IDVBTLocator??
null_pointer
Apr 19 2004, 07:23 PM
QUOTE
I'm not sure i quite follow what your saying as i'm still trying to figure dba and c++ all at once which is very hard on the brain, but isn't the bandwidth set in the IDVBTLocator??
Yep, sure is, you set the bandwidth in the locator, add the locator to the Tune Request and then put the Tune Request to the iTune interface on the Network Provider. It is the network provider that does all the actual interface calls to all the device filters to set them up etc.
Check out the following links, they have some very good info:
http://msdn.microsoft.com/library/en-us/di...ningprocess.asp
http://msdn.microsoft.com/library/en-us/di...pplications.asp
Check out the CreateDVBTTuneRequest method in the sample I uploaded.
bionicdonkey
Apr 19 2004, 07:40 PM
does the tune request go to the video control before going to the network provider?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.