Pipe to transcoder instead of file
This commit is contained in:
parent
96b9895735
commit
77c36a689a
1 changed files with 3 additions and 3 deletions
|
@ -4,15 +4,15 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
"stream_server/transcoder"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewWriter(stream_key string) (io.WriteCloser, error) {
|
func NewWriter(stream_key string) (io.WriteCloser, error) {
|
||||||
base_dir, _ := os.UserHomeDir()
|
transcoder_in, err := transcoder.NewTranscoder(stream_key)
|
||||||
file, err := os.Create(base_dir + "/live/" + stream_key + "/rawdump.ts")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return file, nil
|
return transcoder_in, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckStreamID(stream_id []byte) (io.WriteCloser, bool) {
|
func CheckStreamID(stream_id []byte) (io.WriteCloser, bool) {
|
||||||
|
|
Loading…
Reference in a new issue