Extract video size from media stream (#3856)

* Extract video size from media stream

* fix test
This commit is contained in:
cnderrauber
2025-08-18 09:06:57 +08:00
committed by GitHub
parent 456b870936
commit b660c3b582
11 changed files with 838 additions and 58 deletions
@@ -217,3 +217,16 @@ func GetActiveDecodeTargetBitmask(layer VideoLayer, decodeTargets []DependencyDe
}
// ------------------------------------------------------------------------------
func ExtractDependencyDescriptorVideoSize(dd *dd.DependencyDescriptor) []VideoSize {
if dd.AttachedStructure == nil {
return nil
}
videoSizes := make([]VideoSize, 0, len(dd.AttachedStructure.Resolutions))
for _, res := range dd.AttachedStructure.Resolutions {
videoSizes = append(videoSizes, VideoSize{Width: uint32(res.Width), Height: uint32(res.Height)})
}
return videoSizes
}