|
| | CStreamDetails () |
| |
| | CStreamDetails (const CStreamDetails &that) |
| |
| CStreamDetails & | operator= (const CStreamDetails &that) |
| |
| bool | operator== (const CStreamDetails &that) const |
| |
| bool | operator!= (const CStreamDetails &that) const |
| |
| bool | HasItems (void) const |
| |
| int | GetStreamCount (CStreamDetail::StreamType type) const |
| |
| int | GetVideoStreamCount (void) const |
| |
| int | GetAudioStreamCount (void) const |
| |
| int | GetSubtitleStreamCount (void) const |
| |
| const CStreamDetail * | GetNthStream (CStreamDetail::StreamType type, int idx) const |
| |
| std::string | GetVideoCodec (int idx=0) const |
| |
| float | GetVideoAspect (int idx=0) const |
| |
| int | GetVideoWidth (int idx=0) const |
| |
| int | GetVideoHeight (int idx=0) const |
| |
| std::string | GetVideoHdrType (int idx=0, bool alt=false) const |
| |
| std::string | GetVideoHdrDetail (int idx=0) const |
| |
| int | GetVideoDuration (int idx=0) const |
| |
| void | SetVideoDuration (int idx, const int duration) |
| |
| std::string | GetStereoMode (int idx=0) const |
| |
| std::string | GetVideoLanguage (int idx=0) const |
| |
| std::string | GetSubtitleLanguage (int idx=0) const |
| |
| StreamFlags | GetSubtitleFlags (int idx=0) const |
| |
| int | GetPreferredAudioStreamIndex (const StreamUtils::AudioPreferences &preferences) const |
| | Get the index of the audio stream playback is likely to start on.
|
| |
| int | GetDefaultAudioStreamIndex () const |
| | Get the index of the audio stream the media nominates as its default.
|
| |
| std::string | GetFirstAudioLanguage () const |
| | Get the language of the first audio stream in the order the source lists them.
|
| |
| std::string | GetFirstAudioCodec () const |
| | Get the codec of the first audio stream in the order the source lists them.
|
| |
| int | GetFirstAudioChannels () const |
| | Get the channel count of the first audio stream in the order the source lists them.
|
| |
| std::string | GetFirstSubtitleLanguage () const |
| | Get the language of the first subtitle stream in the order the source lists them.
|
| |
| void | AddStream (CStreamDetail *item) |
| |
| void | Reset (void) |
| |
| void | DetermineBestStreams (void) |
| |
| void | Archive (CArchive &ar) override |
| |
| void | Serialize (CVariant &value) const override |
| |
| bool | SetStreams (const VideoStreamInfo &videoInfo, int videoDuration, const AudioStreamInfo &audioInfo, const SubtitleStreamInfo &subtitleInfo, CStreamDetail::Source source) |
| |
| CStreamDetail::Source | GetSource (CStreamDetail::StreamType type, int idx) const |
| |
| CStreamDetail::Source | GetSources () const |
| |
| void | SetSources (CStreamDetail::Source source) |
| |
| bool | ShouldUpdateWithNewDetails (const CStreamDetails &newInfo) const |
| |
| int | GetVersion (CStreamDetail::StreamType type, int idx) const |
| |
|
An idx of 0 asks for the technically best stream, as judged by StreamUtils::CompareAudioQuality() (based on codec and channel count only).
Any other idx is a 1-based ordinal into the streams in the order the source presented them.
|
| std::string | GetAudioCodec (int idx=0) const |
| |
| std::string | GetAudioLanguage (int idx=0) const |
| |
| int | GetAudioChannels (int idx=0) const |
| |
| StreamFlags | GetAudioFlags (int idx=0) const |
| |
| std::string CStreamDetails::GetFirstAudioLanguage |
( |
| ) |
const |
Get the language of the first audio stream in the order the source lists them.
This is neither the technically best stream (GetAudioLanguage()) nor the one the user's preferences ask for (GetPreferredAudioStreamIndex()) - it is simply the stream listed first by whatever produced these details, which is one of:
- a bluray playlist, whose streams are stored in stream number order, so the first is audio stream number 1 - the stream the disc expects a player to start with. This is the only case where the order is specified rather than conventional.
- any other container, in the order its demuxer reports the streams.
- an NFO, in the order its elements appear.
Note this does not say which stream playback will actually start on. That also depends on stream flags, a choice remembered from a previous watch and the audio layout at play time, none of which the library carries.
Note also that "first" is the order the details were stored, which is the order the source presented for freshly scanned or disc-browsed content. It is not currently guaranteed to survive a round trip through the video database, which stores no stream ordinal and reads the rows back without an ORDER BY.
- Todo
- Persist a stream ordinal and order by it, so this holds unconditionally.
- Returns
- The language of the first audio stream, or an empty string if there is none
| auto CStreamDetails::COMMON_ASPECT_RATIOS |
|
staticconstexpr |
Initial value:= std::to_array<AspectRatio>({
{1.00f, "1.00"},
{1.19f, "1.19"},
{1.33f, "1.33"},
{1.37f, "1.37"},
{1.43f, "1.43"},
{1.50f, "1.50"},
{1.66f, "1.66"},
{1.78f, "1.78"},
{1.85f, "1.85"},
{1.90f, "1.90"},
{2.00f, "2.00"},
{2.20f, "2.20"},
{2.35f, "2.35"},
{2.40f, "2.40"},
{2.55f, "2.55"},
{2.76f, "2.76"},
})
The vocabulary of aspect ratio labels Kodi reports, in ascending order.
Content is classified as the closest entry in log space, which means the cutoff between two adjacent entries is their geometric mean. See VideoAspectToAspectDescription().
This is the single source of truth for the aspect labels skins display. Anything else needing the same vocabulary - a selection list, a reported label, a plausibility check - must use this table rather than defining a parallel list, or the two will drift.
- Note
- The table classifies but never rejects. Any value wider than the last entry is reported as that entry, so this cannot be used as a validity check on its own.