Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSegmenter = errors.New("SegmenterError")
View Source
var ErrSegmenterTimeout = errors.New("SegmenterTimeout")
View Source
var PlaylistRetryCount = 5
View Source
var PlaylistRetryWait = 500 * time.Millisecond
Functions ¶
This section is empty.
Types ¶
type FFMpegVideoSegmenter ¶
type FFMpegVideoSegmenter struct {
WorkDir string
LocalRtmpUrl string
StrmID string
SegLen time.Duration
// contains filtered or unexported fields
}
FFMpegVideoSegmenter segments a RTMP stream by invoking FFMpeg and monitoring the file system.
func NewFFMpegVideoSegmenter ¶
func NewFFMpegVideoSegmenter(workDir string, strmID string, localRtmpUrl string, opt SegmenterOptions) *FFMpegVideoSegmenter
func (*FFMpegVideoSegmenter) Cleanup ¶
func (s *FFMpegVideoSegmenter) Cleanup()
func (*FFMpegVideoSegmenter) PollPlaylist ¶
func (s *FFMpegVideoSegmenter) PollPlaylist(ctx context.Context) (*VideoPlaylist, error)
PollPlaylist monitors the filesystem and returns a new playlist as it becomes available
func (*FFMpegVideoSegmenter) PollSegment ¶
func (s *FFMpegVideoSegmenter) PollSegment(ctx context.Context) (*VideoSegment, error)
PollSegment monitors the filesystem and returns a new segment as it becomes available
type SegmenterOptions ¶
type VideoPlaylist ¶
type VideoPlaylist struct {
Format stream.VideoFormat
// Data []byte
Data *m3u8.MediaPlaylist
}
type VideoSegment ¶
Click to show internal directories.
Click to hide internal directories.