Documentation
¶
Index ¶
Constants ¶
const InitSegmentIdx = -1
Variables ¶
This section is empty.
Functions ¶
func GetHandler ¶
Types ¶
type Error ¶
Error represents a handler error. It provides methods for a HTTP status code and embeds the built-in error interface.
type PlaybackSession ¶
type PlaybackSession struct { PlaybackSessionKey TranscodingSession *ffmpeg.TranscodingSession // contains filtered or unexported fields }
func GetPlaybackSession ¶
func GetPlaybackSession( playbackSessionKey PlaybackSessionKey, segmentIdx int) (*PlaybackSession, error)
GetPlaybackSession gets a playback session with the given key and for the given segment index. If the segment index is too far in the future, it will conclude that the user likely skipped ahead and start a new playback session. If segmentIdx == InitSegmentIdx, any session will be returned for the given (StreamKey, representationID). This is useful to get a session to serve the init segment from because it doesn't matter where ffmpeg seeked to, the init segment will always be the same. The returned PlaybackSession must be released after use by calling ReleasePlaybackSession.
func GetPlaybackSessionByID ¶
func GetPlaybackSessionByID(playbackSessionID string) (*PlaybackSession, error)
GetPlaybackSessionByID gets the playback session by its ID. If one with the given ID does not exist, and error is returned. The returned PlaybackSession must be released after use by calling ReleasePlaybackSession.
func NewPlaybackSession ¶
func NewPlaybackSession(playbackSessionKey PlaybackSessionKey, segmentIdx int) (*PlaybackSession, error)
func (*PlaybackSession) CleanupIfRequired ¶
func (s *PlaybackSession) CleanupIfRequired()
func (*PlaybackSession) Release ¶
func (s *PlaybackSession) Release()
type PlaybackSessionKey ¶
type StatusError ¶
StatusError represents an error with an associated HTTP status code.
func (StatusError) Error ¶
func (se StatusError) Error() string
Allows StatusError to satisfy the error interface.