DTV Progress (1 Viewer)

bionicdonkey

Portal Pro
September 3, 2004
108
1
Sydney :: Australia
I thought i might share what little i've on a DTV Plugin.

I've taken a different approach than i'd normally do and document what needs to be done rather than just try to code it. So far i've documented 3 functions:
Code:
/// <summary>
		/// This function is ued to setup the initial part of the graph.
		/// A tune request must the sent before the Network Provider is connected to the other filters.
		/// Just create a tune request, filling the frequency and bandwidth/symbol rate with -1.
		/// </summary>
		/// <returns>true if it's setup, false if it's not</returns>
		public bool setupGraph() {
			
			// BDA Network Provider
				// Initialise Tuning Space (using the setupTuningSpace function)
				// Create NP based on a network type
				// Add NP to graph
				// Submit Tune Request
			// Tuner Device
				// Create Tuner device from device selected in setup
				// Add Tuner Device to the graph
				// Start the graph to make sure the device is available
				// Connect Network Provider to Tuner Device
			// Capture Device
				// Create Capture Device by matching it with the Tuner Device
				// Add the Capture Device to the graph
				// Connect the Tuner Device to the Capture Device
			// Mpeg2 Demultiplexer
				// Use CLSID_MPEG2Demultiplexer to create the demux
				// Add the Demux to the graph
				// Connect the Capture Device to the demux (which will setup the pins)
			// Transport Information Filter
				// Enumerate the KSCATEGORY_BDA_TRANSPORT_INFORMATION category
				// Add the filter to the graph
				// Try to connect to Pin 1 on the Demux
			// Sections & Tables Filter
				// Enumerate the KSCATEGORY_BDA_TRANSPORT_INFORMATION category
				// Add the filter to the graph
				// Try to connect to Pin 5 on the Demux

			return false; // Change to true when function complete
		}

		/// <summary>
		/// This is the function for setting up a local tuning space.
		/// Funtion is based on code written by Nate from DigitalWatch.
		/// It may be changed to use the Windows Registry. I have a C++ function for this.
		/// </summary>
		/// <returns>true if succeeded, fale if failed</returns>
		private bool setupTuningSpace() 
		{
			// Create instance of a tuning space using CLSID_DVBTuningSpace
			// Interface IDVBTuningSpace2 with the tuning space created above
			// Put the system type on the tuning space
			// Put the network type on the tuning space
			// Release the IDVBTuningSpace 2 interface from the main tuning space

			return false; // Change to true when function complete
		}

		/// <summary>
		/// Used to create a tune request and submit it to the tuner
		/// </summary>
		/// <param name="Frequency">Frequency</param>
		/// <param name="Bandwidth">Bandwidth/Symbol Rate</param>
		/// <param name="ONID">Original Network Identification</param>
		/// <param name="TSID">Transport Stream Identification</param>
		/// <param name="SID">Stream Identification (Program Number)</param>
		/// <returns>true if succeeded, false if failed</returns>
		public bool createTuneRequest(long Frequency, long Bandwidth, long ONID, long TSID, long SID) 
		{
			// Create the Tune Request
				// Interface IDVBTuningSpace2 with the TuningSpace
				// Create new Tune Request using tuning space
				// Interface IDVBTuneRequest with the Tune Request created above
				// Create instance of network specific Locator
				// Give frequency to the Locator (put_CarrierFrequency)
				// Give the bandwidth to the Locator (put_SymbolRate)
				// Give the DVB Tune Request the ONID (put_ONID)
				// Give the DVB Tune Request the TSID (put_TSID)
				// Give the DVB Tune Request the SID (put_SID)
				// Bind the locator to the DVB Tune Request (put_Locator)
				// Release the Locator and the DVB Tune Request
			// Submit the Tune Request
				// Create instance of ITuner
				// Interface the instance of ITuner with the Network Provider
				// Submit the Tune Request to the Tuner (put_TuneRequest)
				// Release the instance of ITuner
				// Release the Tune Request

			return false; // Change to true when function complete
		}

Some BDA stuff might need to be ported from c++ directshow before this stuff get started, so i might need to look into how to do that.

If anyone wants to code any of this, please feel fre to do so. I bearly know c++ let alone c# so it might take me a while.

If anyone has any comments, suggestions etc, post it here.

Regards,
Bionic Donkey
 
A

Anonymous

Guest
This looks like a bare minimum to get DTV added, my plan at the moment is to first improve the concept MediaPortal has of a channel and associate each channel with a persisted tune request object, (I plan to do this for both analog and digital btw). Once you've got a tune request object passed to the graph create function you just need to see what type of network provider to use (or if it's analog use the existing code) and the rest is as per the BDA documents.


The really hard part is most likely to be getting a frequency scan to work properly.

John
 

bionicdonkey

Portal Pro
September 3, 2004
108
1
Sydney :: Australia
Hi John,

You are right, this pretty much is the bare minimum for dtv. I'm not really a programmer so i wasn't thinking as big as you, but you you are talking about does sound good. Have you made any practical progress or is it still just a dream?

Josh
 
A

Anonymous

Guest
Josh

I've made some progress in terms of what I see as the pre-reqs to starting this, but I haven't attacked the dtv part of it yet. A while ago I made some progress with a simple app based on the ms video control but the idea of basically starting an app like mediaportal from stratch seemed a bit too daunting.

John
 
A

Anonymous

Guest
Josh

One thing that would be really good is if I can get hold of some transport streams from oz, it would be really helpful to know what's in there as far as channel info and epg. a cd or dvd's worth would be perfect.

John
 

bionicdonkey

Portal Pro
September 3, 2004
108
1
Sydney :: Australia
John

I'm sure we could organise something about that. Also you may find your answers in this forum. http://forums.dvbowners.com/index.php?showforum=14
Alot of work has been done here on transport streams and bda programs. One member has even created his own bda drivers for twinhans VisionDTV card. There are also programs made to analyse various parts of the transport stream. If you only needed specific info, this may be a better solution.

Josh
 

null_pointer

Portal Member
May 13, 2004
10
0
Yes there has been a lot of work done on various things for BDA application development on the above forum. If you are writing a BDA app it is work a read.
 
A

Anonymous

Guest
bionicdonkey said:
John

I'm sure we could organise something about that. Also you may find your answers in this forum. http://forums.dvbowners.com/index.php?showforum=14
Alot of work has been done here on transport streams and bda programs. One member has even created his own bda drivers for twinhans VisionDTV card. There are also programs made to analyse various parts of the transport stream. If you only needed specific info, this may be a better solution.

Josh

Have been lurking there for some time, but for testing there's no substitute for playing with the real thing.

John
 

Users who are viewing this thread

Top Bottom