Fix regressions and improvements to stream selection#1824
Fix regressions and improvements to stream selection#1824CastagnaIT merged 5 commits intoxbmc:Piersfrom
Conversation
|
Thanks CastagnaIT...it works fine...I noticed on Windows 10 Pro ( 64 BIT ) Kodi 22 Piers. Android 11...Nvidia Shield TV Pro 2019 = OK |
|
@Ronny-nerd have you tested also the use case of youtube issue #1821? |
be12e16 to
3ed74bd
Compare
| CODEC::FOURCC_HEVC, CODEC::FOURCC_AV01, CODEC::NAME_AV1, CODEC::FOURCC_VP09, | ||
| CODEC::NAME_VP9, CODEC::FOURCC_AVC_, CODEC::FOURCC_H264}; | ||
|
|
||
| CAdaptationSet* overrideAdp{nullptr}; // Override done by manifest custom parameter |
There was a problem hiding this comment.
This can be simplified to return currAdp immediately if it is default, without needing to continue the loops:
CAdaptationSet* defaultAdp{nullptr}; // Default determined by codec order
for (auto& codecCC : videoCodecOrder)
{
CAdaptationSet* currAdp{nullptr};
uint32_t adpIndex{0};
while ((currAdp = m_adaptiveTree->GetAdaptationSet(adpIndex++)))
{
if (currAdp->GetRepresentations().empty() || currAdp->GetStreamType() != StreamType::VIDEO)
continue;
if (currAdp->IsDefault())
{
return currAdp;
}
else if (CODEC::Contains(currAdp->GetCodecs(), codecCC) && !defaultAdp)
{
defaultAdp = currAdp;
}
}
}
return defaultAdp;
There was a problem hiding this comment.
yeah also one less variable, change done
good to go?
There was a problem hiding this comment.
Sorry, while the other changes seem to make sense don't have a machine/connectivity to properly runtime test. Only really checked the adaptation set default selection on initial playback start.
There have been some reports of both DRM and non-DRM streams failing to play with v22.2.0 but no logs so I don't know what may be causing it.
There was a problem hiding this comment.
you don't need to test each change, just just to know for your youtube case was ok
easily can be seen by using "adaptive" stream selection
3ed74bd to
704bd42
Compare
Description
Motivation and context
new drm rework has changed some code introducing a codec selection with priority order that was incomplete
and other things was need to be fixed
fix #1821
How has this been tested?
Screenshots (if appropriate):
Types of change
Checklist: