container/mts: added some commenting

This commit is contained in:
Saxon 2019-06-14 19:33:40 +09:30
parent f0d1b994bf
commit eff69e87ce
2 changed files with 4 additions and 0 deletions

View File

@ -184,6 +184,8 @@ var (
errMetaUpperBound = errors.New("meta 'to' cannot be found") 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) { func (c *Clip) BytesForMetaInterval(key, from, to string) ([]byte, error) {
// First check that the interval makes sense. // First check that the interval makes sense.
if from == to { if from == to {

View File

@ -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) { func TestBytesForMetaInterval(t *testing.T) {
const ( const (
numOfTestFrames = 10 numOfTestFrames = 10