OSD development guide
MythTV supports theming of the On Screen Display (OSD) items used when watching Live TV or recordings. This theme development guide covers the steps necessary to develop your own look-and-feel for the OSD.
- 1 Technical Details
- 2 List of Containers
- 2.1 Timeformat Container
- 2.2 Fadeaway Container
- 2.3 Font Container
- 2.4 Program Info Container
- 2.5 Channel Number Container
- 2.6 Browse Info Container
- 2.7 Status Container
- 2.8 Notify CID Info Container
- 2.9 Notify Alert Text Container
- 2.10 Editmode Container
- 2.11 Settings Container
- 2.12 Base Dialog Container
- 2.13 News Scroller Container
- 2.14 Menu Container
- 2.15 Channel Editor Container
All x,y coordinates used in OSD themes are based on a grid of 640x480. In contrast to the menu themes, which use 800x600 for 4:3 displays and 1280x720 for 16:9 (widescreen), the grid used for OSD elements stays the same regardless of the actual aspect-ratio of the display being used. (this last bit is merely an assumption I'm making--edit if it's wrong)
OSD themes can be put in a subdirectory of their own under the themes directory (typically "/usr/share/mythtv/themes") or they may reside in the same directory as the other theme files of a set. Since there is no difference in the was OSD themes are handled based on the aspect ratio, there is no need to add "-widescreen" to the end of the directory name. OSD themes are stored in a file named simply "osd.xml".
List of Containers
OSD themes are XML documents with the top-level container being named "mythtvosdtheme". Within the mythtvosdtheme container, there are a number of other container types that can be used.
This is a container with only one thing inside, namely the format string to be used for displaying the time in the display for the elements that show the time. If you use the special token FROMSETTINGS, MythTV will use the time format specified in General settings.
|format string||Format of time to be displayed
or special token 'FROMSETTINGS'
Similar to timeformat, this container only has one value which is the number of ms it should take for a display element to be faded to 100% transparency when it is being removed from the screen.
|Integer||Duration of fade effect in ms|
As with all the other types of themes, you will need to declare named fonts for use for any text elements in the display. The name attribute defines the name of the font as other elements will refer to it.
Program Info Container
The program info container shows any information available about the content currently being watched, including the name, number, and icon of the channel, the name of the program being watched, and it's description.
Channel Number Container
The channel number container is merely a widget that displays the channel number as the user enters it to change the channel.
Browse Info Container
The status container shows the current position information for the recording.
It allows the following elements:
- slidertext - Position info in text form e.g. 1:24 of 2:01
- extendedslidertext - Extends the position info with time remaining e.g. (0:37 minutes remaining)
- statusslider - Displays a fill type position bar or slider
- statusposition - Another slider? Maybe allows you to overlay a position marker on statusslider?
- progbefore - In livetv allows you to display an image indicating a programme exists before in the livetv chain
- progbefore - In livetv allows you to display an image indicating a programme exists after in the livetv chain