| |||||||
| General Development (no feature request here!) You were able to fix an issue, or improved a feature? Post it here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: May 2007 Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | Hi to everyone. I've tried Mediaportal and it looks wonderful. My question is about extracting some part of the source code: I have to create an application to view DVB-T channels. Reading the source code of Mediaportal I found g_Player so I thought "wow, everything it has been already done!". Apparently I was wrong The thing is that, if I want to use g_Player, I have to include many classes and use many methods to initialize the enviromente for my application. I don't want to create a plugin (I managed to create it reading the tutorial about plugin development), but (let's say) just a simple Form with one button to view a single DVB-T channel.The main method, after reading some stuff from registry and things like that, creates a MediaPortalApp instance, that extends D3DApp. How can I create a new solution that can use this classes? My idea was to create a simple Form which extends D3DApp (like MediaPortalApp) and do things *similar* to MediaPortalApp. Is there a way to get some documentation for MediaPortal, like diagrams and examples? Or should I dig the source code to understand every single feature of this complex (yet beautiful) program? Thx to everyone! |
| | |
| | #2 (permalink) |
| Portal Member Join Date: Feb 2005
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
| Hi, If your just after a simple form, take a look at the DirectShowLib Samples, the BDA sample is the one you want. It shows you how to setup a BDA-T,S,C graph via C# and submit tuning requests. You'll need to add something to map logical channels to PIDs but that is hard, you can use MP for inspiration. Flipit
__________________ Hardware: P4 3.0GHz, ASUS P4C800-E, Radeon 9600XT, 1GB DDR2, 2x Nova-t 9002's, FloppyDTV-S, TRex, 300Gb WD HHD and a 74Gb Raptor, IMON PAD and VFD in a Silverstone LC10-M. Software: Windows XP Home SP 2, DirectX 9.0c, .NET 2.0, latest drivers, MP codecs, VMR9, ffdshow...and MBblue on my IPaq |
| | |
| | #3 (permalink) |
| Portal Member Join Date: May 2007 Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | So you're suggesting me to learn Directshow enviroment. Ok, this may be a solution but I believe it's too long: if I were able to extract the right parts from MediaPortal source code, I could create the prototype I need. Is there a way to embed MediaPortal in my application? I tried to create a MediaPortalApp instance and showing it through .show() method (since MediaPortalApp is a Form) but the form appears empty. I was even thinking to create a plugin for MediaPortal that, with .NET Remoting, could let my application send some commands to MediaPortal, like "switch on tv", "switch off tv" and so on. The thing is that code is not documented and it's not easy to understand where are the things I need. |
| | |
| | #5 (permalink) |
| Super Moderator Join Date: Apr 2004 Location: Leipzig, Germany Age: 33
Posts: 2,165
Thanks: 17
Thanked 47 Times in 34 Posts
Country: | Hi, as Flipit said: Take a look into the DirectShow Library samples: http://directshownet.sourceforge.net/index.html They already contain a ready to start small DVB-T BDA TV application. ![]() HTH, Flip. |
| | |
| | #6 (permalink) |
| Portal Member Join Date: May 2007 Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | thank you for your help: I managed to create the form I needed. I'll be back for other questions about volume, tuning and so on... I'm beginning to understand a little how MediaPortal works! |
| | |
| | #7 (permalink) |
| Portal Developer Join Date: Apr 2006 Location: Chicago
Posts: 513
Thanks: 2
Thanked 13 Times in 9 Posts
Country: | From someone who knows DirectShow, it will be quite difficult to write an app that does what you want without understanding the DirectShow interfaces. You don't need to be a COM expert, but a basic understanding will sure help. |
| | |
| | #8 (permalink) |
| Portal Member Join Date: May 2007 Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | Hi, I'm back with other questions. Reading the BDA Sample in DirectshowLib I managed to create an application that shows tv in a simple form. Now I need to put OSD (on screen display) on my video. I use VideoMixingRenderer9 and reading its features I've understood that it should be easy to add text or images on a video. On MSDN there is a sample using VMR9 and IVMRMixerBitmap9 methods like GetAlphaBitmapParameters and so on... but in DirectshowLib DxText sample it is shown how to do the same thing with SampleGrabber filter. Two different approaches to obtain a similar result. Now, my questions: 1. can I use SimpleGrabber filter over a live video like TV? 2. in the sample about IVMRMixerBitmap9 methods there are instructions like GetDC or CreateCompatibleDC (I believe they belong to GDI) and all the code is written in C++: how can I turn the code in C# language? Do I have to convert all the required interfaces? How can I know what interfaces are already implemented by DirectshowLib? Thx in advance |
| | |
![]() |
| Bookmarks |
| Tags |
| parts |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New HTPC. DOA Parts? | Banyon | General Support | 7 | 2007-04-25 03:11 |
| HTPC parts | Tommi44 | HTPC Projects | 2 | 2006-11-14 23:12 |
| flickering 'artefacts' on some parts of screen | alexeix | General Support | 0 | 2006-05-31 11:51 |
| Laptop parts for an HTPC | Efros | MediaPortal 1 Talk | 5 | 2006-05-20 08:16 |
| HTPC project 2006 (with some old pc parts) | Nefius | Ongoing HTPC Projects | 7 | 2006-01-11 12:56 |