Now I have been using the Directshowlib-2005 Libs. And the SDK BDA sample called DTVViewer.
Now I am not the type of person to ask for help and annoy the living *&^*& out of some poor person..
...But....
I just need some simple help to convert the code into something that I can use as a Media Centre All in one..I have already designed a Touch Screen Media Player and UI and works fine but now I would just like to add the Digital TV Module....
OK using the DTVViewer sample code I finally got some source code to work with 2 different brands of DVB-T Tuner Cards (DVICO/Fusion and Compro E700). Now I have not modified the sample code MUCH at all it just worked! Just by entering the Frequency and Hitting Build Graph..
What I would like to do is mod the code so that I can Either use a combo box with Pre-Entered Frequency’s (i.e..Channel ??/Freq 191500).
Now the help I need as I have just started to programming in c# again(after a few years). And I can’t seem to figure out how this works completely...
So basically what I need is to somehow call the DVBTTuning() class with predefined Values(Frequencies) from a Combo box(or Whatever).
This is the section of code that I think! I need to change.
namespace DirectShowLib.Sample
{
/// <summary>
/// Description résumée de DVBTTuning.
/// </summary>
public class DVBTTuning : Form, ITuningSelector
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textCarrierFreq;
private System.Windows.Forms.TextBox textONID;
private System.Windows.Forms.TextBox textTSID;
private System.Windows.Forms.TextBox textSID;
/// <summary>
/// Variable nécessaire au concepteur.
/// </summary>
private System.ComponentModel.Container components = null;
private IDVBTuningSpace tuningSpace = null;
private IDVBTuneRequest tuneRequest = null;
public DVBTTuning()
{
InitializeComponent();
int hr = 0;
this.tuningSpace = (IDVBTuningSpace) new DVBTuningSpace();
hr = this.tuningSpace.put_UniqueName("DVBT TuningSpace");
hr = this.tuningSpace.put_FriendlyName("DVBT TuningSpace");
hr = this.tuningSpace.put__NetworkType(typeof(DVBTNetworkProvider).GUID);
hr = this.tuningSpace.put_SystemType(DVBSystemType.Terrestrial);
MessageBox.Show(this.tuningSpace.ToString());
ITuneRequest tr = null;
hr = this.tuningSpace.CreateTuneRequest(out tr);
DsError.ThrowExceptionForHR(hr);
this.tuneRequest = (IDVBTuneRequest) tr;
hr = this.tuneRequest.put_ONID(-1);
hr = this.tuneRequest.put_TSID(-1);
hr = this.tuneRequest.put_SID(-1);
IDVBTLocator locator = (IDVBTLocator) new DVBTLocator();
hr = locator.put_CarrierFrequency(191500); <- I have enter the vaule manually(191500)
hr = tr.put_Locator(locator as ILocator);
}
*****I have not sent the whole sample...But the Link is http://sourceforge.net/project/showfiles.php?group_id=136334&package_id=188409
This Class calls a form with the tuning Freq(s) and SID and such...I just would like to be able to pass a value within a call say User clicks button Channel Up and it Calls Change Channel(FreqComboBox).
(In other words remove the need to manually enter each Frequencies when Hitting retune)
OK my basic question is how would I rewrite this sample for only DVB-T(not DVBS) and add Predefined Channels(Frequencies) later in the build I would like to attempt Auto Scan Feature...But would like to just get the basic working....
and one other thing what the hell is the ' hr ' varible doing? were is it's value being sent...I KNOW THAT'S A VAGUE Question.
Any Help Would be greatly appreciated..