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


    Write your reply...

    Similar threads

    MP1 MP2 EPGCleaner for x64 DE
    Thanks. Worked perfectly. The installer won’t work but dropping the DLL in worked.
    Thanks. Worked perfectly. The installer won’t work but dropping the DLL in worked.
    Hi there I've just made the switch from a working and stable 1.36 x86 installation (Standalone TVServer and a TVClient both...
    Replies
    3
    Views
    612
    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
    Attached are new TV service logs with your latest DLL. I see lots of EPG events and none of the messages from earlier. Congratulations!
    Attached are new TV service logs with your latest DLL. I see lots of EPG events and none of the messages from earlier. Congratulations!
    I have some weird behavior trying to operate the MP GUI in a new installation of MP 1.36 under Windows 11 Pro. Some of the remote...
    Replies
    33
    Views
    2K
    Work with FanArt Handler. Disable Video.
    Work with FanArt Handler. Disable Video.
    How can I disable or delete the field newest films if go to video?
    Replies
    1
    Views
    149
    Nice finding! (y)(y)(y) Adapted to new DWHD and PVHD ;) Position is in front of category bar ;)
    Nice finding! (y)(y)(y) Adapted to new DWHD and PVHD ;) Position is in front of category bar ;)
    This thread is intended for skin authors, plus those advanced users who have learnt skin programming and have customised the skins...
    Replies
    1
    Views
    758
    Top Bottom