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

    That was the correction I made in BasicHome for the 1.35 Prerelease which you adddd to repo ;)
    That was the correction I made in BasicHome for the 1.35 Prerelease which you adddd to repo ;)
    I'm going bananas here!! Used MP1 since MP1.10 or so.....an haven't had problems for years! Am using latest Dune...
    Replies
    8
    Views
    1K
    It's getting weirder..... If I remove all the IP cards in the TVServer setup and then add them back I can scan the M3u and tune the stations but if I rescan it on the same card it just keeps updating the 1 channel. My brain is melting.........
    It's getting weirder..... If I remove all the IP cards in the TVServer setup and then add them back I can scan the M3u and tune the...
    Having great fun with this still. I have a fairly good PC setup, Ryzen 5 8500g, Msi Pro 650M-P with 32GB of RAM with a TBS 6281 and...
    Replies
    2
    Views
    251
    Hi mate, As usual, you are always first up with an offer of assistance, and I really appreciate it. So sorry I haven't replied. I'll send you a PM now. Cheers, Steve.
    Hi mate, As usual, you are always first up with an offer of assistance, and I really appreciate it. So sorry I haven't replied...
    It appears that MP somehow caches previously used subtitle files for subsequent use next time the same video is played. My problem...
    Replies
    2
    Views
    1K
    Hello, I would like to use a media server to display various learning categories. I prefer not to use software like Kodi, as it requires extensive metadata scraping that I don't need. Is it possible to instantly access the video categories when landing on the page? I would like to display a single media page with the following...
    Hello, I would like to use a media server to display various learning categories. I prefer not to use software like Kodi, as it...
    Hello, I would like to use a media server to display various learning categories. I prefer not to use software like Kodi, as it...
    Replies
    0
    Views
    319
    Thanks for your reply. In my configuration this setting is set to "no". To avoid misunderstandings, the MP window size changes on screen resolution changes, MP always fulfills the whole screen. Also, the home screen buttons size is adjusted. Only the font size is not adjusted to the new screen resolution.
    Thanks for your reply. In my configuration this setting is set to "no". To avoid misunderstandings, the MP window size changes on...
    I use two monitors - a large display for TV and video watching and a small display for music playback, to get the current track...
    Replies
    2
    Views
    972
    Top Bottom