MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Help on Development » General Development (no feature request here!)


General Development (no feature request here!) You were able to fix an issue, or improved a feature? Post it here.

Reply
 
Thread Tools Display Modes
Old 2007-06-10, 16:17   #1 (permalink)
Portal Member
 
Maephisto's Avatar
 
Join Date: May 2007
Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default How can I use PARTS of Mediaportal?

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!
Maephisto is offline   Reply With Quote
Old 2007-06-10, 17:54   #2 (permalink)
Portal Member
 
Join Date: Feb 2005
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts


Default

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
Flipit is offline   Reply With Quote
Old 2007-06-11, 17:54   #3 (permalink)
Portal Member
 
Maephisto's Avatar
 
Join Date: May 2007
Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

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.
Maephisto is offline   Reply With Quote
Old 2007-06-11, 18:13   #4 (permalink)
Portal Member
 
CHli's Avatar
 
Join Date: Jul 2005
Location: Switzerland
Age: 27
Posts: 1,011
Thanks: 9
Thanked 3 Times in 3 Posts

My System

Default

Don't whine and code
CHli is offline   Reply With Quote
Old 2007-06-11, 20:56   #5 (permalink)
Super Moderator
 
FlipGer's Avatar
 
Join Date: Apr 2004
Location: Leipzig, Germany
Age: 33
Posts: 2,165
Thanks: 17
Thanked 47 Times in 34 Posts

Country:

My System

Default

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.
FlipGer is offline   Reply With Quote
Old 2007-06-13, 10:40   #6 (permalink)
Portal Member
 
Maephisto's Avatar
 
Join Date: May 2007
Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

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!
Maephisto is offline   Reply With Quote
Old 2007-06-14, 00:16   #7 (permalink)
Portal Developer
 
Join Date: Apr 2006
Location: Chicago
Posts: 513
Thanks: 2
Thanked 13 Times in 9 Posts

Country:


Default

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.
diehard2 is online now   Reply With Quote
Old 2007-06-19, 12:19   #8 (permalink)
Portal Member
 
Maephisto's Avatar
 
Join Date: May 2007
Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

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
Maephisto is offline   Reply With Quote
Reply

Bookmarks

Tags
parts

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

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


All times are GMT +1. The time now is 05:42.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress