You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: extended_frames_x.go
    path of file: ./repos/mediamtx/internal/protocols/rtmp/message
    
    the code of the file until where you have to start completion: package message

import (
	"fmt"
	"time"

	"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)

// ExtendedFramesX is a FramesX extended message.
type ExtendedFramesX struct {
	ChunkStreamID   byte
	DTS             time.Duration
	MessageStreamID uint32
	FourCC          FourCC
	Payload         []byte
}

func (m *ExtendedFra
    
func (m ExtendedFramesX) marshal() (*rawmessage.Message, error) {
	body := make([]byte, m.marshalBodySize())

	body[0] = 0b10000000 | byte(ExtendedTypeFramesX)
	body[1] = uint8(m.FourCC >> 24)
	body[2] = uint8(m.FourCC >> 16)
	body[3] = uint8(m.FourCC >> 8)
	body[4] = uint8(m.FourCC)
	copy(body[5:], m.Payload)

	return &rawmessage.Message{
		ChunkStreamID:   m.ChunkStreamID,
		Timestamp:       m.DTS,
		Type:            uint8(TypeVideo),
		MessageStreamID: m.MessageStreamID,
		Body:            body,
	}, nil
}