Documentation ¶
Index ¶
- Variables
- func AddVideoSuffix(suffixes ...string)
- func ApplyEnv()
- func ClearCache() error
- func ConvertToMP4(videoFile string, outputFile string, fmp4 ...bool) error
- func EncodingArgs(videoFile string, segment int64, res int64) []string
- func FilenameLooksLikeVideo(name string) bool
- func GetFFMPEGJson(path string) (map[string]interface{}, error)
- func GetRawFFMPEGInfo(path string) ([]byte, error)
- func IsSupportedComSkip() bool
- func IsSupportedFFMPEG() bool
- func IsSupportedFFProbe() bool
- func IsUnsupported(err error) bool
- func Reset()
- func ServeJson(status int, data interface{}, w http.ResponseWriter)
- type Empty
- type Encoder
- type EncodingRequest
- type FrameHandler
- type HttpCommandHandler
- type InfoHandler
- type ListHandler
- type ListResponse
- type ListResponseFolder
- type ListResponseVideo
- type PlaylistHandler
- type StreamHandler
- type VideoInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HomeDir = ".gohls" FFProbePath = "ffprobe" FFMPEGPath = "ffmpeg" //ComSkipINI comskip's ini file path ComSkipINI = "" ComSkipPath = "comskip" )
View Source
var ErrCreateCacheDir = errors.New("Could not create cache dir")
View Source
var (
ErrUnsupported = errors.New("unsupported")
)
View Source
var VideoSuffixes = []string{".mp4", ".rmvb", ".avi", ".mkv", ".flv", ".wmv", ".mov", ".mpg"}
Functions ¶
func AddVideoSuffix ¶
func AddVideoSuffix(suffixes ...string)
func ClearCache ¶
func ClearCache() error
func FilenameLooksLikeVideo ¶
func GetFFMPEGJson ¶
func GetRawFFMPEGInfo ¶
func IsSupportedComSkip ¶
func IsSupportedComSkip() bool
func IsSupportedFFMPEG ¶
func IsSupportedFFMPEG() bool
func IsSupportedFFProbe ¶
func IsSupportedFFProbe() bool
func IsUnsupported ¶
func ServeJson ¶
func ServeJson(status int, data interface{}, w http.ResponseWriter)
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func (*Encoder) Encode ¶
func (e *Encoder) Encode(r EncodingRequest)
func (*Encoder) GetCacheFile ¶
func (e *Encoder) GetCacheFile(r EncodingRequest) string
func (*Encoder) GetFromCache ¶
func (e *Encoder) GetFromCache(r EncodingRequest) ([]byte, error)
type EncodingRequest ¶
type EncodingRequest struct {
// contains filtered or unexported fields
}
func NewEncodingRequest ¶
func NewEncodingRequest(file string, segment int64, res int64) *EncodingRequest
func NewWarmupEncodingRequest ¶
func NewWarmupEncodingRequest(file string, segment int64, res int64) *EncodingRequest
type FrameHandler ¶
type FrameHandler struct {
// contains filtered or unexported fields
}
func NewFrameHandler ¶
func NewFrameHandler(idx fileindex.Index, rootUri string) *FrameHandler
func (*FrameHandler) ServeHTTP ¶
func (s *FrameHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HttpCommandHandler ¶
type HttpCommandHandler struct {
// contains filtered or unexported fields
}
func NewHttpCommandHandler ¶
func NewHttpCommandHandler(workerCount int, cacheDir string) *HttpCommandHandler
func (*HttpCommandHandler) ServeCommand ¶
type InfoHandler ¶
type InfoHandler struct {
// contains filtered or unexported fields
}
func NewInfoHandler ¶
func NewInfoHandler(idx fileindex.Index, title string, rootUri string) *InfoHandler
func (*InfoHandler) ServeHTTP ¶
func (s *InfoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ListHandler ¶
type ListHandler struct {
// contains filtered or unexported fields
}
func NewListHandler ¶
func NewListHandler(idx fileindex.Index, name string, rootUri string) *ListHandler
func (*ListHandler) ServeHTTP ¶
func (s *ListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ListResponse ¶
type ListResponse struct { Error error `json:"error"` Name string `json:"name"` Path string `json:"path"` Parents *[]*ListResponseFolder `json:"parents"` Folders []*ListResponseFolder `json:"folders"` Videos []*ListResponseVideo `json:"videos"` }
type ListResponseFolder ¶
type ListResponseVideo ¶
type PlaylistHandler ¶
type PlaylistHandler struct {
// contains filtered or unexported fields
}
func NewPlaylistHandler ¶
func NewPlaylistHandler(idx fileindex.Index, rootUri string, segmentsPath string) *PlaylistHandler
func (*PlaylistHandler) ServeHTTP ¶
func (s *PlaylistHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type StreamHandler ¶
type StreamHandler struct {
// contains filtered or unexported fields
}
func NewStreamHandler ¶
func NewStreamHandler(idx fileindex.Index, rootUri string) *StreamHandler
func (*StreamHandler) ServeHTTP ¶
func (s *StreamHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.