diff --git a/stream/mts/encoder.go b/stream/mts/encoder.go index 29875588..41dd94d2 100644 --- a/stream/mts/encoder.go +++ b/stream/mts/encoder.go @@ -140,7 +140,7 @@ func (tl *timeLocation) SetTimeStamp(t uint64) { } // GetTimeStamp returns the location of a TimeLocation. -func (tl *timeLocation) GetTimeStamp() uint64 { +func (tl *timeLocation) TimeStamp() uint64 { tl.RLock() defer tl.RUnlock() return tl.time @@ -154,7 +154,7 @@ func (tl *timeLocation) SetLocation(l string) { } // GetLocation returns the location of a TimeLocation. -func (tl *timeLocation) GetLocation() string { +func (tl *timeLocation) Location() string { tl.RLock() defer tl.RUnlock() return tl.location @@ -294,11 +294,11 @@ func (e *Encoder) writePSI() error { } // Update pmt table time and location. - err = psi.UpdateTime(pmtTable, MetaData.GetTimeStamp()) + err = psi.UpdateTime(pmtTable, MetaData.TimeStamp()) if err != nil { return err } - err = psi.UpdateLocation(pmtTable, MetaData.GetLocation()) + err = psi.UpdateLocation(pmtTable, MetaData.Location()) if err != nil { return nil }