Bda Tvlibrary, BDA TvLibrary for developers |
![]() ![]() |
Bda Tvlibrary, BDA TvLibrary for developers |
| Guest_Frodo_* |
Jun 5 2006, 07:15 PM
Post
#1
|
|
Guests |
Hi,
I've been working on a library which allows developers to easily add digital TV to their applications Although not completely finished its now in a state where its quite usable for most people The library features: - opensource and licensed under GPL - fully written in .NET 2.0 - Supports every BDA device for ATSC, DVB-C, DVB-T and DVB-S - Supports analog (MCE) tv cards - Supports SkyStar 2 (WDM DVB-S card) - multi tuner support - Scanning for channels - Grabbing EPG & MHW right from the digital transmission - timeshifting / recording using dvr-ms - Timeshifting .ts using tsFileSource - recording to .mpg - Conditional access support (CI) for twinhan, technotrend and FireDTV devices - Support for teletext Future enhancements: - Streaming over the network - asynchronous .net model - trace listeners for logging The library can now be found in SVN : http://svn.sourceforge.net/svnroot/mediapo...trunk/TvEngine3 Dont forget to register the filters in the Filters folder !!! and... please register TsFileSource if you want to to use .ts timeshifting If you have any questions, suggestions, bugs or feature requests, just lemme know. last update:23-juli-2006 Regards Frodo questions,remarks,suggestions,bugfixes,extensions? Please reply in this forum and/or mail to e.beckers@gmail.com
Attached File(s)
|
|
|
|
| Guest_Frodo_* |
Jun 5 2006, 07:37 PM
Post
#2
|
|
Guests |
Explanation on how to use:
Create an instance of the TvCardCollection() CODE TvCardCollection cardCollection = new TvCardCollection(); This will enumerate all BDA devices and for each device found a ITVCard is build you can enumerate the cards by: CODE foreach (ITVCard cardFound in cardCollection.Cards) { if (cardFound is TvCardDVBC) Console.WriteLine("DVBC card:{0}", cardFound.Name); if (cardFound is TvCardDVBT) Console.WriteLine("DVBT card:{0}", cardFound.Name); if (cardFound is TvCardDVBS) Console.WriteLine("DVBS card:{0}", cardFound.Name); } Tuning: For tuning, create a - DVBTChannel for dvbt cards - DVBCChannel for dvbc cards - DVBSChannel for dvbs cards fill in the properties and call card.Tune(channel) example (for dvbt): CODE DVBTChannel channel = new DVBTChannel(); channel.Name = "Nederland 2"; channel.NetworkId = 8720; channel.TransportId = 1; channel.ServiceId = 12; channel.Frequency = 698000; channel.BandWidth = 8; channel.PmtPid = 0x3fc; card.Tune(channel); Scanning: To scan for channels you will need the ITVScanning interface and used it like below: CODE //get the scanning interface ITVScanning scanning = card.ScanningInterface; //reset the scanner scanning.Reset(); // set scanning details DVBTChannel channel = new DVBTChannel(); channel.Frequency = 698000; channel.NetworkId = -1; channel.TransportId = -1; channel.ServiceId = -1; channel.BandWidth = 8; //scan for channels, returns a list of all channels found List<IChannel> channels=scanning.Scan(channel); //dump channel information... for (int i = 0; i < channels.Count; ++i) { Console.WriteLine(channels[i].ToString()); } Signal status: to get the signal quality/strength use the following: CODE Console.WriteLine("Tuner locked:{0} level:{1} quality:{2}", card.IsTunerLocked, card.SignalLevel, card.SignalQuality); Grabbing epg: To grab the epg, tune to a channel and then: CODE // start grabbing the epg card.GrabEpg(); while (true) { //get the epg, if null is returned then epg still busy grabbing List<EpgChannel> epg = card.Epg; if (epg == null) { // still busy... Thread.Sleep(1000); continue; } // dump epg information to the console for (int i = 0; i < epg.Count; ++i) { Console.WriteLine("epg channel: {0} count:{1}", epg[i].Channel.ToString(), epg[i].Programs.Count); for (int x = 0; x < epg[i].Programs.Count; ++x) { EpgProgram prog = epg[i].Programs[x]; Console.WriteLine("{0}-{1} {2} {3}", prog.StartTime,prog.EndTime,prog.Text[0].Title,prog.Text[0].Description); } } return; } Timeshifting: 1. tune to a channel 2. next call StartTimeShifting() CODE card.StartTimeShifting("live.dvr-ms"); ...... card.StopTimeShifting(); Recording: 1. first start timeshifting 2. Next call StartRecording() CODE card.StartRecording(RecordingType.Content,"recording.dvr-ms",0);
.... card.StopRecording(); |
|
|
|
Jun 5 2006, 08:54 PM
Post
#3
|
|
|
Forum Regular Group: Members Posts: 2,932 Joined: 24-April 04 From: Queensland Member No.: 808 Card: VisionPlus DVB-t |
hi Frodo,
QUOTE I've been working on a library which allows developers to easily add digital TV to their applications What a great idea, and thanks for sharing your hard work. I just may have to learn .Net one day.Although not completely finished its now in a state where its quite usable for most people QUOTE - any suggestions ??? DSNetwork streaming maybe? Also does the tuner instances allow for channel zapping & stream selection? |
|
|
|
| Guest_Frodo_* |
Jun 6 2006, 07:52 AM
Post
#4
|
|
Guests |
|
|
|
|
Jun 9 2006, 11:17 PM
Post
#5
|
|
|
Participant Group: Members Posts: 20 Joined: 2-June 05 Member No.: 3,044 Card: VisionPlus DVB-t |
Thanks for the library. What's the license on the code?
BTW, I had a bit of trouble getting scanning going from the example code given so I thought I'd add some pointers here for any followers. Make sure you call Tune on the card before you try to scan otherwise the graph isn't built. Here's my code for scanning a DVB-T frequency from scratch: CODE TvCardCollection cards = new TvCardCollection(); ITVCard card = cards.Cards[0]; DVBTChannel channel = new DVBTChannel(); channel.BandWidth = 7; channel.NetworkId = -1; channel.ServiceId = -1; channel.TransportId = -1; channel.Frequency = freq; card.Tune(channel); List<IChannel> channels = scanner.Scan(card.Channel); Hope that saves somebody else some playing around. Other feedback: The library could use some an asynchronous interface for things like scanning. e.g. BeginScan/EndScan methods using the standard .NET asynch style or the newer .NET 2.0 styled asynch style. Also, a switch to System.Diagnostics.Trace.WriteLine for the info rather than Console.WriteLine would be nicer for users of the library. Thanks again, should send one of my projects forward much quicker than if I had to write it all myself |
|
|
|
| Guest_Frodo_* |
Jun 13 2006, 11:28 PM
Post
#6
|
|
Guests |
I uploaded a new version of the tvlibrary.
In the past few days it has been tested with several devices and some bugs where fixed Thanks for the library. What's the license on the code? The library contains GPL code and thus is licensed under GPL QUOTE The library could use some an asynchronous interface for things like scanning. e.g. BeginScan/EndScan methods using the standard .NET asynch style or the newer .NET 2.0 styled asynch style. Also, a switch to System.Diagnostics.Trace.WriteLine for the info rather than Console.WriteLine would be nicer for users of the library. Good points, i'll look into that... |
|
|
|
| Guest_Frodo_* |
Jun 15 2006, 02:05 AM
Post
#7
|
|
Guests |
Uploaded version 2.0.0.2
-Fixed bugs with some cards -atsc is now working -added teletext support |
|
|
|
| Guest_Frodo_* |
Jun 19 2006, 06:21 PM
Post
#8
|
|
Guests |
Uploaded version 2.0.0.3
- Fixed some more bugs with cards - SkyStar 2 card is now supported (WDM DVB-S card) - .ts timeshifting is now working (install tsfilesource for it) - .mpg recording is now working (please install all filters in the filters subdir) |
|
|
|
Jul 16 2006, 03:30 PM
Post
#9
|
|
|
Participant Group: Members Posts: 76 Joined: 15-August 05 Member No.: 3,473 Card: VisionPlus DVB-t |
hi frodo and thanks for the library. i've just added a renderer to the testapp and found that timeshift on my system crash's the program. i am able to do timeshift in media portal. do you know what the problem might be? any help would be appreciated.
|
|
|
|
| Guest_Frodo_* |
Jul 16 2006, 05:52 PM
Post
#10
|
|
Guests |
hi drewb
The library has been extended a lot lately but since i didnt got much results on this topic I didnt upload it yet. I will upload a new version asap Frodo |
|
|
|
Jul 16 2006, 10:34 PM
Post
#11
|
|
|
Participant Group: Members Posts: 76 Joined: 15-August 05 Member No.: 3,473 Card: VisionPlus DVB-t |
thanks for the reply. i totally appreciate that. i really want to get into this my htpc app was originally done in vb, that was all i knew. i'm now getting into c# because i had to add dvb to my app (personal use) and i've been using the directshowlib on sourceforge which is great but your work takes it a step further with dvb. thats what i need and am learning. you've done well with the media portal as well i hope it goes places for you. thanks again.
|
|
|
|
| Guest_webrant_* |
Jul 17 2006, 09:58 PM
Post
#12
|
|
Guests |
hi drewb The library has been extended a lot lately but since i didnt got much results on this topic I didnt upload it yet. I will upload a new version asap Frodo Frodo, there might be many lurkers - I'm one of them :-) So I would be delighted if you kept posting updates! |
|
|
|
Jul 18 2006, 11:43 AM
Post
#13
|
|
|
Participant Group: Members Posts: 76 Joined: 15-August 05 Member No.: 3,473 Card: VisionPlus DVB-t |
this is no doubt a stupid question for everyone who know c# but i'm trying to pass the handle of the form1 to the TvCardDvbBase so as to render the output to ivideowindow. i've done i've done this in an app with 1 project but i can't seem to get it. i am using "control hostingControl = null" on the TvCardDvbBase side and trying to call:
public BDAGraphBuilder(Control renderingControl) { this.hostingControl = renderingControl; } from Form1. this is where the problem is here. in my other app i use: private BDAGraphBuilder bdaGraphBuilder = null; and then on form load: this.bdaGraphBuilder = new BDAGraphBuilder(this); any help would be great. please go easy, i'm new to c# from vb6 |
|
|
|
Jul 23 2006, 09:54 AM
Post
#14
|
|
|
Participant Group: Members Posts: 76 Joined: 15-August 05 Member No.: 3,473 Card: VisionPlus DVB-t |
hi frodo, hows the update coming along?
|
|
|
|
| Guest_Frodo_* |
Jul 23 2006, 09:16 PM
Post
#15
|
|
Guests |
The library & testapps are in the SVN of mediaportal
Latest sources can be downloaded here: http://svn.sourceforge.net/svnroot/mediapo...trunk/TvEngine3 Frodo |
|
|
|
Jul 24 2006, 12:02 AM
Post
#16
|
|
|
Participant Group: Members Posts: 76 Joined: 15-August 05 Member No.: 3,473 Card: VisionPlus DVB-t |
hi frodo, thanks for the update. i've been trying to download it with tortise and it gets around half way and comes up with an error. is there any other way to download or something else i should try? thanks again.
|
|
|
|
| Guest_Frodo_* |
Jul 24 2006, 12:51 AM
Post
#17
|
|
Guests |
just retry, tortoise sometimes crashes but if you retry it continues from where it left
frodo |
|
|
|
Jul 24 2006, 12:49 PM
Post
#18
|
|
|
Participant Group: Members Posts: 76 Joined: 15-August 05 Member No.: 3,473 Card: VisionPlus DVB-t |
thanks for that. managed to get it down now. when i try to build i get two errors. "Source file Sections\player.cs could not be found and the project file TestServiceApp\TestServiceApp.csproj was not found. any ideas?
|
|
|
|
| Guest_Frodo_* |
Jul 24 2006, 02:33 PM
Post
#19
|
|
Guests |
Sorry about that,
both are fixed now and in svn I also uploaded some MSDN-like documentation for the tvlibrary in doc/ While not everything has been documented yet, all important classes and methods are. Frodo |
|
|
|
Jul 24 2006, 02:54 PM
Post
#20
|
|
|
Participant Group: Members Posts: 76 Joined: 15-August 05 Member No.: 3,473 Card: VisionPlus DVB-t |
thanks again. looking forward to checking it out.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 3rd September 2010 - 11:12 PM |