Reference time stamp for SVC. (#2185)

SVC has only one stream and when calculating reference time stamp,
irrespective of reference layer, reference time stamp will be the
same as the given time stamp as there is only one stream and no offset.

TODO: Need better all around SVC handling.
This commit is contained in:
Raja Subramanian
2023-10-25 23:27:43 +05:30
committed by GitHub
parent fa01297d96
commit d8e4933dd1
3 changed files with 11 additions and 4 deletions
+6
View File
@@ -651,6 +651,12 @@ func (s *StreamTrackerManager) GetReferenceLayerRTPTimestamp(ts uint32, layer in
return 0, fmt.Errorf("invalid layer, target: %d, reference: %d", layer, referenceLayer)
}
// SVC-TODO: better SVC detection
if s.isSVC {
// there is only one stream in SVC
return ts, nil
}
if layer != referenceLayer && s.layerOffsets[referenceLayer][layer] == 0 {
return 0, fmt.Errorf("offset unavailable, target: %d, reference: %d", layer, referenceLayer)
}