Documentation ¶
Overview ¶
Package media contains the media stream definition.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Direction ¶ added in v2.1.0
type Direction string
Direction is the direction of a media stream.
type Media ¶
type Media struct { // Media type. Type Type // Direction of the stream. Direction Direction // Control attribute. Control string // Formats contained into the media. Formats []format.Format }
Media is a media stream. It contains one or more formats.
func (Media) FindFormat ¶
FindFormat finds a certain format among all the formats in the media.
func (Media) Marshal ¶
func (m Media) Marshal() *psdp.MediaDescription
Marshal encodes the media in SDP format.
type Medias ¶
type Medias []*Media
Medias is a list of media streams.
func (Medias) FindFormat ¶
FindFormat finds a certain format among all the formats in all the medias. If the format is found, it is inserted into forma, and its media is returned.
func (Medias) Marshal ¶
func (ms Medias) Marshal(multicast bool) *sdp.SessionDescription
Marshal encodes the medias in SDP format.
func (Medias) SetControls ¶
func (ms Medias) SetControls()
SetControls sets the control attribute of all medias in the list.
Click to show internal directories.
Click to hide internal directories.