Difference between revisions of "Osd.xml"

From MythTV Official Wiki
Jump to: navigation, search
(Fix colors and update list of windows)
(OSD Windows)
Line 210: Line 210:
 
| style="background:darkturquoise" | videocodec
 
| style="background:darkturquoise" | videocodec
 
| style="background:darkturquoise" align="center" | statetype
 
| style="background:darkturquoise" align="center" | statetype
| style="background:darkturquoise" | The current video encoding. Types are "MPEG-2", "VC-1", "H.264", "MPEG-4", "RTjpeg", "WMV3", and "H.263".
+
| style="background:darkturquoise" | The current video encoding. Types are "MPEG-2", "VC-1", "H.264", "MPEG-4", "RTjpeg", "WMV3", "H.263", and (new in 32) "HEVC".
 
| style="background:darkturquoise" align="center" | N
 
| style="background:darkturquoise" align="center" | N
 
|-  
 
|-  
 
| videodescrip
 
| videodescrip
 
| align="center" | statetype
 
| align="center" | statetype
| The current video resolution. Types are "SD", "HD_720_P", "HD_1080_I", "HD_1080_P", and (new in 0.27) "HD".
+
| The current video resolution. Types are "SD", "HD_720_P", "HD_1080_I", "HD_1080_P", (new in 0.27) "HD", and (new in 32) "UHD_4K_I", "UHD_4K_P".
 
| align="center" | N
 
| align="center" | N
 
|-  
 
|-  

Revision as of 20:17, 20 June 2020

The osd.xml file governs the layout and behavior of an On Screen Display (OSD) during video playback. To make sure your OSD is detected (if you are including it with another type of theme), it's important to remember to add "OSD" to the <types> element in themeinfo.xml. For an OSD-only theme, osd.xml and themeinfo.xml (as well as any image assets) are required. osd.xml consists of the following windows and named attributes:


OSD Windows

Important.png Note: Special consideration when writing an OSD
Because the various video renderers all perform scaling differently, and because of the nature of scaling and image caching in MythUI, you must follow the following rules:

  • You must give each image an <area>
  • You must not inherit any widgets from outside of the OSD.xml file. (Fonts are fine)
Window Name Type Description
MythPopupBox Window The OSD menu. See base.xml for details.
osd_message Window The OSD text message/notification popup.
osd_input Window This window displays the channel number being input during a channel change.
osd_status Window The "overall status" window, which usually displays playback progress.
osd_navigation Window The navigation window, which displays buttons for common playback actions.
program_info Window The Program Information window.
browse_info Window The OSD window displayed during channel browsing.
osd_program_editor Window The recording editor window
ChannelEditor Window The channel details editor
osd_debug Window The OSD window displaying technical details about the currently playing media.


Generic attributes used in most windows

As with the recordings-ui.xml and schedule-ui.xml, the osd.xml file can use most mapped program attributes. This allows the themer to show whichever information he or she likes across the different screens. This is a list of attributes you can utilize in many (but not all) of the aforementioned windows, including use in their buttonlists or individually.
Widget Name Widget Type Description Required?
title textarea The title of the item. N
subtitle textarea The subtitle of the item. N
titlesubtitle textarea The title and subtitle of the item. N
description textarea The description/plot of the item. N
category textarea The category of the item. N
callsign textarea The callsign of the item's channel. N
commfree textarea The commercial free status of the item's channel. N
outputfilters textarea The playback output filters of the item's channel. N
starttime textarea The start time of the item in the user-specified format. N
startdate textarea The start date of the item in the user-specified format. N
endtime textarea The end time of the item in the user-specified format. N
enddate textarea The end date of the item in the user-specified format. N
recstarttime textarea The recording start time of the item in the user-specified format. N
recstartdate textarea The recording end date of the item in the user-specified format. N
recendtime textarea The recording end time of the item in the user-specified format. N
recenddate textarea The recording end date of the item in the user-specified format. N
lastmodifiedtime textarea The last modified time of the item in the user-specified format. N
lastmodifieddate textarea The last modified date of the item in the user-specified format. N
lastmodified textarea The last modified time and date of the item in the user-specified format. N
channum textarea The channel number on which the item was recorded. N
chanid textarea The internal myth channel ID on which the item was recorded. N
channel textarea The combined channel number/name string. N
longchannel textarea The full plain english channel name/number string. N
iconpath textarea The path to the icon file for the channel on which the item was recorded. N
filesize textarea The file size of the item in bytes. N
tvstate statetype What is currently being played back. Types are "WatchingLiveTV", "WatchingPreRecorded", "WatchingVideo", "WatchingDVD", "WatchingBD", and "WatchingRecording". N
audiocodec statetype The current audio encoding. Types are "PCM_DVD", "PCM_BLURAY", "AC3", "E-AC3", "TRUEHD", "WMAPRO", "WMAV2", "DTS", "AAC", "AAC/LATM", "MP2", "MP3", and "VORBIS". N
audiochannels statetype The number of discrete channels in the current audio. Types are "1" (mono), "2" (stereo), "3" (three speakers), "4" (four speakers), "5" (five speakers), "6" (5.1, or five speakers and a subwoofer), "7" (seven speakers), and "8" (7.1). N
videocodec statetype The current video encoding. Types are "MPEG-2", "VC-1", "H.264", "MPEG-4", "RTjpeg", "WMV3", "H.263", and (new in 32) "HEVC". N
videodescrip statetype The current video resolution. Types are "SD", "HD_720_P", "HD_1080_I", "HD_1080_P", (new in 0.27) "HD", and (new in 32) "UHD_4K_I", "UHD_4K_P". N
filesize_str textarea A "plain english" filesize of the item (in MB/GB/etc.) N
lenmins textarea The length of the item in minutes. N
lentime textarea The length of the item in hours. N
rectypechar textarea The recording type of the item, single character. N
rectype textarea The recording type of the item as a string. N
rectypestatus textarea A string value for the status of an upcoming recording. N
card textarea The card upon which an item will record. N
recpriority textarea The recording priority of an item. N
recgroup textarea The recording group of an item. N
playgroup textarea The playback group of an item. N
storagegroup textarea The storage group of an item. N
timedate textarea The "date, starttime-endtime" of an item. N
shorttimedate textarea The short version of the "date, starttime-endtime" of an item. N
shortstarttimedate textarea The short "date starttime" of an item. N
recstatus textarea The recording status of an item. N
repeat textarea The short repeat status of an item. (Repeat) N
longrepeat textarea The long string repeat status of an item. (Repeat Sun July 17, 2010) N
seriesid textarea The grabber-assigned Series ID of an item. N
programid textarea The grabber assigned Program ID of an item. N
catType textarea The category Type of an item. N
year textarea The year of release of an item. N
stars textarea The stars value in text of an item. (4 Stars) N
yearstars textarea The year and star values of an item. (1996, 5 stars) N
originalairdate textarea The original air date of an item. N
shortoriginalairdate textarea The short original air date of an item. N
ratingstate statetype A statetype for the rating of the item. Types are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10. N

The "osd_message" window

Widget Name Widget Type Description Required?
message_text textarea The popup/notification text area. Yes

The "osd_input" window

Widget Name Widget Type Description Required?
osd_number_entry textarea The channel number/text input text area. Yes

The "osd_status" window

Widget Name Widget Type Description Required?
position progressbar The playback position of the current item. Yes

The "osd_navigation" window

This window is displayed in conjunction with osd_status. It must be designed so that is does not overlap osd_status.

Widget Name Widget Type Description Required?
more button Cycle through groups of buttons No

The following buttons must be in a group. Groups must be named grp0, grp1, grp2, etc. The first group must be grp0. Subsequent groups, if used, must be numbered sequentially with no gaps.

Widget Name Widget Type Description Required?
PLAY button Resume playback after pause.

This is only visible while paused. Play and pause should be given the same location, so that the button switches between play and pause as applicable.

No
PAUSE button Pause playback. This is only visible while not paused. No
MUTE button Mute audio. This is only visible when audio is not muted.

Mute and unmute should be given the same location, so that the button switches between mute and unmute as applicable. Note that Mute and unmute are hidden if internal volume controls are not selected in setup or the video has no sound.

No
unmute button Unmute audio. This is only visible when audio is muted.

Note that Mute and unmute are hidden if internal volume controls are not selected in setup or the video has no sound.

No
MENU button Display playback pop-up menu. No
JUMPRWND button Jump back in video. No
SEEKRWND button Jump back in video by a smaller amount. No
JUMPFFWD button Jump forward in video. No
SEEKFFWD button Jump forward in video by a smaller amount. No
INFO button Display the program_info window. No
TOGGLEFILL button Cycle between options for resizing the video to fill the screen. No
TOGGLEASPECT button Cycle between aspect ratios for the video. No
NEXTCC button Cycle between available subtitles or no subtitle. No
JUMPSTART button Jump to start of video. No
SETBOOKMARK button Set the bookmark. No
JUMPBKMRK button Jump to the bookmark. No
RWNDSTICKY button Rewind. Subsequent presses increase rewind speed. No
FFWDSTICKY button Fast Forward. Subsequent presses increase speed. No
PLAY# button Return to playback from Rew/FFwd. No
<Other Command> button You can use many of the actions available in Setup, Edit Keys to create a button for another action. No
<Command>#x button Use any command except unmute, followed by # or # followed by letters or numbers (e.g. PLAY#, MENU#1, RWNDSTICKY#2, JUMPBKMRK#XYZ) to create another button that does the same thing. The additional button will ignore the automatic hide if it is used for PLAY, PAUSE, MUTE. No

The "program_info" window

Widget Name Widget Type Description Required?
iconpath imagetype The channel icon for the currently playing item. No
coverart imagetype The cover fan art for the currently playing item. No

The "browse_info" window

Widget Name Widget Type Description Required?
iconpath imagetype The channel icon for the currently playing item. No

The "ChannelEditor" window

Widget Name Widget Type Description Required?
callsign textedit The channel callsign edit field. Yes
channum textedit The channel number edit field. Yes
channame textedit The channel name edit field. Yes
XMLTV textedit The channel xmltv edit field. Yes
probe button The 'Probe' button. Yes
ok button The 'Ok' button. Yes

The "osd_debug" window

This window doesn't introduce any new widgets. You can use any of the generic metadata widgets described above.