Add support backchannel for Tapo source

This commit is contained in:
Alexey Khit
2023-02-16 11:29:10 +03:00
parent 9fd783793e
commit 70c415a1d8
8 changed files with 498 additions and 76 deletions
+14
View File
@@ -0,0 +1,14 @@
package mpegts
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestTime(t *testing.T) {
w := NewWriter()
w.WriteTime(0xFFFFFFFF)
assert.Equal(t, []byte{0x27, 0xFF, 0xFF, 0xFF, 0xFF}, w.Bytes())
ts := ParseTime(w.Bytes())
assert.Equal(t, uint32(0xFFFFFFFF), ts)
}