stream/mts: improved and added commenting

This commit is contained in:
Saxon 2019-03-02 13:21:46 +10:30
parent 7c6719ab5a
commit 9be2f95bef
2 changed files with 7 additions and 3 deletions

View File

@ -168,6 +168,10 @@ const (
hasPTS = 0x2
)
// TimeBasedPsi allows for the setting of the PSI writing method, therefore, if
// PSI is written based on some time duration, or based on a packet count.
// If b is true, then time based PSI is used, otherwise the PSI is written
// every sendCount.
func (e *Encoder) TimeBasedPsi(b bool, sendCount int) {
e.timeBasedPsi = b
e.psiSendCount = sendCount

View File

@ -62,9 +62,9 @@ const (
AdaptationFieldsIdx = AdaptationIdx + 1 // Adaptation field index is the index of the adaptation fields.
DefaultAdaptationSize = 2 // Default size of the adaptation field.
AdaptationControlMask = 0x30 // Mask for the adaptation field control in octet 3.
DefaultAdaptationBodySize = 1
DiscontinuityIndicatorMask = 0x80
DiscontinuityIndicatorIdx = AdaptationIdx + 1
DefaultAdaptationBodySize = 1 // Default size of the adaptation field body.
DiscontinuityIndicatorMask = 0x80 // Mask for the discontinuity indicator at the discontinuity indicator idk.
DiscontinuityIndicatorIdx = AdaptationIdx + 1 // The index at which the discontinuity indicator is found in an MTS packet.
)
// TODO: make this better - currently doesn't make sense.