MediaPortal Forums HTPC/MediaCenter

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


Reply
 
LinkBack Thread Tools Display Modes
Old 2008-08-09, 05:24   #1 (permalink)
Portal Member
 
Join Date: Oct 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts


Default How to draw text message on video

I could use some guidence on how to draw a text messages on the the video. I've never used DirectX unfortunately.
__________________
StaxRip
stax is offline   Reply With Quote
Old 2008-08-09, 14:12   #2 (permalink)
Retired Team Member
 
charli181's Avatar
 
Join Date: Aug 2007
Location: Sydney
Age: 37
Posts: 745
Thanks: 42
Thanked 41 Times in 34 Posts

Country:

My System

Send a message via MSN to charli181
Default

are you looking to add something like a notification box or soemthing more like subtitles?

I am no hard core developer but can pass on some advice about notification boxes.
__________________
Bubble wrap is the solution to all of life's problems...!!!
charli181 is offline   Reply With Quote
Old 2008-08-09, 15:17   #3 (permalink)
Portal Member
 
Join Date: Oct 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Just short notifications like:

Pause (05:08 / 15:27)
Seek Forward (120sec)
Play

I nice background would be a plus, ideally one that fits the current skin but plain text would be already a good start.
__________________
StaxRip
stax is offline   Reply With Quote
Old 2008-08-10, 23:59   #4 (permalink)
Portal Member
 
Join Date: Oct 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts


Default

As background I could use the image calibration_bar:

Click the image to open in full size.

Image length would be adjusted according to the length of the text message. After scanning through the code however, I'm still pretty clueless. As I understand everything is done with controls which are defined in xml. If possible I would like to do it without xml in order to make it work automatically for every skin that has a calibration_bar image.

I've searched the forum but couldn't find anything of help. Few hints about which classes/interfaces I'll need would be greatly appriciated, maybe there is already similar code I could use to get started.
__________________
StaxRip

Last edited by stax; 2008-08-11 at 00:02..
stax is offline   Reply With Quote
Old 2008-08-11, 08:03   #5 (permalink)
Retired Team Member
 
Inker's Avatar
 
Join Date: Dec 2004
Posts: 1,667
Thanks: 46
Thanked 149 Times in 65 Posts

My System

Default

You shold really, really do it through xml, that is the only way it is designed to work and it'll allow skinners to change the look.

You can still do it for every skin that has calibration_bar.png, simply instruct you're users to copy the xml to their skin.

What exactly are you trying to do anyways? Maybe there is a reason to do it in code I don't understand.
__________________

There are only two industries that refer to their customers as "users".
- Edward Tufte
Inker is offline   Reply With Quote
Old 2008-08-11, 10:40   #6 (permalink)
Portal Member
 
Join Date: Oct 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts


Default

I'm want to add several features to video playback or modify existing features, I've enough experience hacking application using Win32 with things like hooks or use reflection to access private fields and things of .NET applications. I've customized many applications according to my needs using this things. XML is problematic here because I'm hacking existing windows, not windows I created self so existing xml files would have to be modified, I don't think that's a good thing to do. Currently I'm not planning to share my plugin because releasing something well polished requires significant more work then personal hacks and many of my goals are much easier to achieve with hacks or cannot achieved without hacks, integrating things into MediaPortal is very difficult. I've released plugins for applications like DVBViewer or MediaMonkey which are much easier to work with. My plate is already full with supporting/maintaing my application StaxRip. Overwise I would love to contribute to MediaPortal but it seems the artitecture is very hard/limited extensibility wise because of things like skinning which appear to have a very high priority and after seeing a couple of very nice skins and advanced animations I certainly understand this.

Big players like MPC, Zoom Player, KMP player and even VLC have a feature allowing to define three different seek distances where the length for every distance can be defined and notifications are displayed without displaying a big bar which can be distracting, this is very efficient for people making excesive use of seeking which I do. Even MP being a big application there are many basic things missing or usability issues like no Play/Pause toggle. Adding such features to MP is very painful since custom actions are not supported in the code, no way to integrate custom actions into the key/remote UI. I have to use hacks in order to add it, this part is not a big problem for me but anything DirectX related is a big problem for me since I've never worked with it. Maybe I should start learning about it but I'm not sure if it would help in this case, the code base is huge making it difficult to find and understand things even with all the smart code navigation features Visual Studio offers.

I could try to put a System.Windows.Forms control/window on top of things, this is probably easy and cheap for me since I know the related classes, problem is I guess it would lack transparency.
__________________
StaxRip

Last edited by stax; 2008-08-11 at 11:38..
stax is offline   Reply With Quote
Reply

Bookmarks

Tags
draw, message, text, video

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Draw osama MediaPortal 1 Talk 3 2007-12-18 01:04
Draw osama Newcomers Forum 1 2007-12-18 01:04
blank screen and error message with no text bluemorris General Support 6 2007-03-21 05:09


All times are GMT +1. The time now is 03:07.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden