http://www.localeconcept.com/pub/scratch/games/now_with_title.jpgMore progress..this time pretty small, but getting here was an interesting voyage of discovery....
MediaStream objects contain metadata about a given set of playlist items, and in particular, what is displayed on the OSD displays of the orbiters in regards to program title, section title, time code etc.
I wrote a new little stub of namespaced functions which will be used for the DCE router plugin, MAMEUtils, which currently only has one function in it TitleFromROMName...which, given a rom name (i.e. bublbobl), it will call mame with ProcessUtils and get the full title using the -listfull option.
This will probably be replaced later by a full class, that grabs all the related mame data from the -listxml function, but I wanted to get this working as soon as possible for the first pass.
The trick was, after I had debugged the initial function that grabbed the title, the individual stream items were not showing up on the OSD, even though I had updated them, indicating they were being overwritten somewhere else.....turns out, I was right.
If you look at the code for MediaStream, you'll find that there is a function, called UpdateDescriptions.... (this code contains yet another terrible example of why this code bugs the hell out of me, it has knowledge of child classes by default, but I digress!)... at the first of this code is a short circuit which checks if m_bPluginWillUpdateDescriptions... if this is set to true in the subclass, this method will immediately exit. Setting this to true in my subclass's constructor alleviated the issue and I was able to see my custom descriptions, properly....sheezus.....
Guys, we _REALLY_ need to refactor this code. It really could be written so much better.
So, I have attached a screenshot, showing the result of ....um...6 hours of exploratory hacking....
Now, I am going to investigate doing the automatic media identification and tagging....
ONWARD AND UPWARD!
-Thom
Screenshots attached.