mirror of
https://github.com/oscar-davids/lpmsdemo.git
synced 2025-12-24 12:37:59 +08:00
23 lines
552 B
Go
23 lines
552 B
Go
package stream
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"github.com/oscar-davids/lpmsdemo/m3u8"
|
|
)
|
|
|
|
var ErrNotFound = errors.New("Not Found")
|
|
var ErrBadHLSBuffer = errors.New("BadHLSBuffer")
|
|
var ErrEOF = errors.New("ErrEOF")
|
|
|
|
type HLSDemuxer interface {
|
|
PollPlaylist(ctx context.Context) (m3u8.MediaPlaylist, error)
|
|
WaitAndPopSegment(ctx context.Context, name string) ([]byte, error)
|
|
WaitAndGetSegment(ctx context.Context, name string) ([]byte, error)
|
|
}
|
|
|
|
type HLSMuxer interface {
|
|
WriteSegment(seqNo uint64, name string, duration float64, s []byte) error
|
|
}
|