How to draw text message on video (1 Viewer)

stax

Portal Member
October 29, 2004
47
0
I could use some guidence on how to draw a text messages on the the video. I've never used DirectX unfortunately.
 

charli181

Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    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.
     

    stax

    Portal Member
    October 29, 2004
    47
    0
    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.
     

    stax

    Portal Member
    October 29, 2004
    47
    0
    As background I could use the image calibration_bar:

    calibration_bar.png


    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.
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    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.
     

    stax

    Portal Member
    October 29, 2004
    47
    0
    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.
     

    Users who are viewing this thread

    Similar threads

    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For the first example, I highlighted the example text and eventually found the location in the menus where I could select the CODE macro to have the example text formatted as a code example. So far, so good...
    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
    Replies
    0
    Views
    523
    Are the media/video folders on the Mint host?
    Are the media/video folders on the Mint host?
    I've used Mediaportal for years on a Windows Host with restricted online-access. Lately I reinstalled...
    Replies
    1
    Views
    1K
    OK....perhaps impatient of me I know, but went for a full reinstall....and now up and running once more. Have no idea what was at the root of this problem....still wondering if it may've been due to a Win11 update earlier this week?
    OK....perhaps impatient of me I know, but went for a full reinstall....and now up and running once more. Have no idea what was at...
    Have used MP1.38 64 successfully since it's introduction.....now something has changed. Video folders are still present.....but now...
    Replies
    3
    Views
    1K
    My bad, I misunderstood your post then :) Yeah, these things can get complicated really quickly. I remember scrapping some of my skin-improvement-ideas because I couldn't get these cross-dependencies sorted out.
    My bad, I misunderstood your post then :) Yeah, these things can get complicated really quickly. I remember scrapping some of my...
    I adjusted the MyMusicPlayingNowInfos.xml for my OldEyes variant of DWHD so it fits without crowding. I now have the issue of text...
    Replies
    7
    Views
    2K
    .....it was also the culprit for me!!! Can't think why I've changed from LAVsplitter to MPurl ......:oops: Videos playing now.....so thanks!
    .....it was also the culprit for me!!! Can't think why I've changed from LAVsplitter to MPurl ......:oops: Videos playing...
    Just upgraded to 1.37 'Willow'.....and although TV is fine.....I'm unable to play video. Error message points to Mpeg4IsoAvc or...
    Replies
    12
    Views
    3K
    Top Bottom