2012-08-13, 12:39
With XBMC now expanding (back) to embedded systems, we hit problems where library scans/plugins provide content that the hardware devices can't decode, or can't decode well. Many plugins offer the ability to change which content they show, but there's no standard way of doing this. Some have a setting in their configuration panel, some pop up a dialogue box to ask every time something is played, some just select an arbitrary stream based on hard coded decisions.
It might be a better idea to include in the api somewhere a GetPreferedVideoFormat() function, that returns a list of the formats the hardware can handle. For example, an AppleTV would be set to return "h.264, 720p; *, 567p;" so that the plugin could automatically determine that they should first try to select a HD h.264 stream, then any SD stream. (Human readable example, return a struct would be much better than a string.)
Similar GetPreferedAudioFormat() and GetPreferedSubtitleFormat() might also be useful, but of more limited function. (Or including them in a single PreferedFormat struct.) The only example I can think of right now would be signalling plug-ins that would otherwise attempt to use styled subtitles on iOS 5 AppleTVs.
It might also be useful to eventually allow the user to set these preferences themselves on HTPC versions of XBMC.
It might be a better idea to include in the api somewhere a GetPreferedVideoFormat() function, that returns a list of the formats the hardware can handle. For example, an AppleTV would be set to return "h.264, 720p; *, 567p;" so that the plugin could automatically determine that they should first try to select a HD h.264 stream, then any SD stream. (Human readable example, return a struct would be much better than a string.)
Similar GetPreferedAudioFormat() and GetPreferedSubtitleFormat() might also be useful, but of more limited function. (Or including them in a single PreferedFormat struct.) The only example I can think of right now would be signalling plug-ins that would otherwise attempt to use styled subtitles on iOS 5 AppleTVs.
It might also be useful to eventually allow the user to set these preferences themselves on HTPC versions of XBMC.