mediamtx/internal/protocols/rtmp/message/extended_sequence_end.go
Alessandro Ros 770d72b638
Some checks are pending
code_lint / golangci_lint (push) Waiting to run
code_lint / mod_tidy (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_highlevel (push) Waiting to run
rtmp: support Extended Metadata Frames (#4006) (#4014) (#4018)
2024-12-04 23:29:16 +01:00

26 lines
588 B
Go

package message
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// ExtendedSequenceEnd is a sequence end extended message.
type ExtendedSequenceEnd struct {
FourCC FourCC
}
func (m *ExtendedSequenceEnd) unmarshal(raw *rawmessage.Message) error {
if len(raw.Body) < 5 {
return fmt.Errorf("invalid body size")
}
m.FourCC = FourCC(raw.Body[1])<<24 | FourCC(raw.Body[2])<<16 | FourCC(raw.Body[3])<<8 | FourCC(raw.Body[4])
return nil
}
func (m ExtendedSequenceEnd) marshal() (*rawmessage.Message, error) {
return nil, fmt.Errorf("TODO")
}