From eff69e87cebeace890764486f657ca4cc67e89dc Mon Sep 17 00:00:00 2001 From: Saxon Date: Fri, 14 Jun 2019 19:33:40 +0930 Subject: [PATCH] container/mts: added some commenting --- container/mts/payload.go | 2 ++ container/mts/payload_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/container/mts/payload.go b/container/mts/payload.go index 9785f2f0..d05e994e 100644 --- a/container/mts/payload.go +++ b/container/mts/payload.go @@ -184,6 +184,8 @@ var ( errMetaUpperBound = errors.New("meta 'to' cannot be found") ) +// BytesForMetaInterval will return the media data as a slice between two meta +// values 'from' and 'to', of key 'key'. The meta values must not be the same. func (c *Clip) BytesForMetaInterval(key, from, to string) ([]byte, error) { // First check that the interval makes sense. if from == to { diff --git a/container/mts/payload_test.go b/container/mts/payload_test.go index 3ae114e7..d56ca516 100644 --- a/container/mts/payload_test.go +++ b/container/mts/payload_test.go @@ -316,6 +316,8 @@ func TestBytesForPTSInterval(t *testing.T) { } } +// TestBytesForMetaInterval checks that we can correctly get media data between +// two meta values using BytesForMetaInterval. func TestBytesForMetaInterval(t *testing.T) { const ( numOfTestFrames = 10