mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
19 lines
398 B
Go
19 lines
398 B
Go
package transcoder
|
|
|
|
type Transcoder struct {
|
|
// All file streams currently running, index is file path
|
|
streams map[string]FileStream
|
|
}
|
|
|
|
func (t *Transcoder) GetMaster(path string, client string) (string, error) {
|
|
stream, ok := t.streams[path]
|
|
if !ok {
|
|
stream, err := NewFileStream(path)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
t.streams[path] = *stream
|
|
}
|
|
return stream.GetMaster(), nil
|
|
}
|