Documentation ¶
Index ¶
- Constants
- Variables
- func ValidateRequest(ctx context.Context, conf *config.Config, request *livekit.StartEgressRequest) (*livekit.EgressInfo, error)
- type AudioParams
- type EgressType
- type FileExtension
- type FileParams
- type Manifest
- type MimeType
- type OutputType
- type Params
- func (p *Params) GetManifest() ([]byte, error)
- func (p *Params) GetSegmentOutputType() OutputType
- func (p *Params) GetSessionTimeout() time.Duration
- func (p *Params) UpdateFileInfoFromSDK(fileIdentifier string, replacements map[string]string) error
- func (p *Params) UpdatePlaylistNamesFromSDK(replacements map[string]string)
- func (p *Params) UpdatePrefixAndPlaylist(identifier string, replacements map[string]string) error
- func (p *Params) VerifyUrl(url string) error
- type Profile
- type SegmentedFileParams
- type SourceParams
- type StreamParams
- type UploadParams
- type VideoParams
Constants ¶
View Source
const ( // input types MimeTypeAAC MimeType = "audio/aac" MimeTypeOpus MimeType = "audio/opus" MimeTypeRaw MimeType = "audio/x-raw" MimeTypeH264 MimeType = "video/h264" MimeTypeVP8 MimeType = "video/vp8" // video profiles ProfileBaseline Profile = "baseline" ProfileMain Profile = "main" ProfileHigh Profile = "high" // egress types EgressTypeStream EgressType = "stream" EgressTypeWebsocket EgressType = "websocket" EgressTypeFile EgressType = "file" EgressTypeSegmentedFile EgressType = "segments" // output types OutputTypeRaw OutputType = "audio/x-raw" OutputTypeOGG OutputType = "audio/ogg" OutputTypeIVF OutputType = "video/x-ivf" OutputTypeMP4 OutputType = "video/mp4" OutputTypeTS OutputType = "video/mp2t" OutputTypeWebM OutputType = "video/webm" OutputTypeRTMP OutputType = "rtmp" OutputTypeHLS OutputType = "application/x-mpegurl" // file extensions FileExtensionRaw = ".raw" FileExtensionOGG = ".ogg" FileExtensionIVF = ".ivf" FileExtensionMP4 = ".mp4" FileExtensionTS = ".ts" FileExtensionWebM = ".webm" FileExtensionM3U8 = ".m3u8" )
Variables ¶
View Source
var ( DefaultAudioCodecs = map[OutputType]MimeType{ OutputTypeRaw: MimeTypeRaw, OutputTypeOGG: MimeTypeOpus, OutputTypeMP4: MimeTypeAAC, OutputTypeTS: MimeTypeAAC, OutputTypeWebM: MimeTypeOpus, OutputTypeRTMP: MimeTypeAAC, OutputTypeHLS: MimeTypeAAC, } DefaultVideoCodecs = map[OutputType]MimeType{ OutputTypeIVF: MimeTypeVP8, OutputTypeMP4: MimeTypeH264, OutputTypeTS: MimeTypeH264, OutputTypeWebM: MimeTypeVP8, OutputTypeRTMP: MimeTypeH264, OutputTypeHLS: MimeTypeH264, } FileExtensions = map[FileExtension]struct{}{ FileExtensionRaw: {}, FileExtensionOGG: {}, FileExtensionIVF: {}, FileExtensionMP4: {}, FileExtensionTS: {}, FileExtensionWebM: {}, FileExtensionM3U8: {}, } FileExtensionForOutputType = map[OutputType]FileExtension{ OutputTypeRaw: FileExtensionRaw, OutputTypeOGG: FileExtensionOGG, OutputTypeIVF: FileExtensionIVF, OutputTypeMP4: FileExtensionMP4, OutputTypeTS: FileExtensionTS, OutputTypeWebM: FileExtensionWebM, OutputTypeHLS: FileExtensionM3U8, } )
Functions ¶
func ValidateRequest ¶ added in v1.0.5
func ValidateRequest(ctx context.Context, conf *config.Config, request *livekit.StartEgressRequest) (*livekit.EgressInfo, error)
Types ¶
type AudioParams ¶
type EgressType ¶
type EgressType string
type FileExtension ¶
type FileExtension string
type FileParams ¶
type Manifest ¶ added in v1.4.3
type Manifest struct { EgressID string `json:"egress_id,omitempty"` RoomID string `json:"room_id,omitempty"` RoomName string `json:"room_name,omitempty"` StartedAt int64 `json:"started_at,omitempty"` EndedAt int64 `json:"ended_at,omitempty"` PublisherIdentity string `json:"publisher_identity,omitempty"` TrackID string `json:"track_id,omitempty"` TrackKind string `json:"track_kind,omitempty"` TrackSource string `json:"track_source,omitempty"` AudioTrackID string `json:"audio_track_id,omitempty"` VideoTrackID string `json:"video_track_id,omitempty"` SegmentCount int64 `json:"segment_count,omitempty"` }
type OutputType ¶
type OutputType string
type Params ¶
type Params struct { Logger logger.Logger Info *livekit.EgressInfo GstReady chan struct{} SourceParams AudioParams VideoParams EgressType OutputType MutedChan chan bool StreamParams FileParams SegmentedFileParams UploadParams // contains filtered or unexported fields }
func GetPipelineParams ¶
func (*Params) GetManifest ¶ added in v1.4.3
func (*Params) GetSegmentOutputType ¶ added in v1.0.4
func (p *Params) GetSegmentOutputType() OutputType
func (*Params) GetSessionTimeout ¶ added in v1.2.0
func (*Params) UpdateFileInfoFromSDK ¶ added in v1.4.3
used for sdk input source
func (*Params) UpdatePlaylistNamesFromSDK ¶ added in v1.4.3
func (*Params) UpdatePrefixAndPlaylist ¶ added in v1.4.3
type SegmentedFileParams ¶ added in v1.0.4
type SegmentedFileParams struct { SegmentsInfo *livekit.SegmentsInfo LocalFilePrefix string StoragePathPrefix string PlaylistFilename string SegmentDuration int }
func (*SegmentedFileParams) GetStorageFilepath ¶ added in v1.3.0
func (p *SegmentedFileParams) GetStorageFilepath(filename string) string
type SourceParams ¶
type StreamParams ¶
type StreamParams struct { WebsocketUrl string StreamUrls []string StreamInfo map[string]*livekit.StreamInfo }
type UploadParams ¶ added in v1.0.4
type UploadParams struct { UploadConfig interface{} DisableManifest bool }
Click to show internal directories.
Click to hide internal directories.