rtmp: normalize API

This commit is contained in:
aler9
2022-06-27 17:51:54 +02:00
parent 08ddc9f83d
commit 45c1370145
11 changed files with 23 additions and 27 deletions

View File

@@ -30,8 +30,8 @@ func (c *Chunk3) Read(r io.Reader, chunkBodyLen uint32) error {
return err
}
// Write writes the chunk.
func (c Chunk3) Write() ([]byte, error) {
// Marshal writes the chunk.
func (c Chunk3) Marshal() ([]byte, error) {
buf := make([]byte, 1+len(c.Body))
buf[0] = 3<<6 | c.ChunkStreamID
copy(buf[1:], c.Body)