Files
rtsp-simple-server/internal/rtmp/message/extended_sequence_end.go
Alessandro Ros 1133c734ab
Some checks reported warnings
lint / code (push) Has been cancelled
lint / mod-tidy (push) Has been cancelled
lint / apidocs (push) Has been cancelled
test / test64 (push) Has been cancelled
test / test32 (push) Has been cancelled
test / test_highlevel (push) Has been cancelled
support publishing AV1/H265 with OBS 30 (#2217) (#2234)
2023-08-22 22:56:23 +02:00

29 lines
643 B
Go

package message
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
)
// ExtendedSequenceEnd is a sequence end extended message.
type ExtendedSequenceEnd struct {
FourCC FourCC
}
// Unmarshal implements Message.
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
}
// Marshal implements Message.
func (m ExtendedSequenceEnd) Marshal() (*rawmessage.Message, error) {
return nil, fmt.Errorf("TODO")
}