From 77c36a689a1c2c22560dc066039f00782ba0b1fc Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Fri, 22 Sep 2023 12:33:55 +0500 Subject: [PATCH] Pipe to transcoder instead of file --- srt/stream_ids.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srt/stream_ids.go b/srt/stream_ids.go index 88bde45..d6548dc 100644 --- a/srt/stream_ids.go +++ b/srt/stream_ids.go @@ -4,15 +4,15 @@ import ( "os" "io" "strings" + "stream_server/transcoder" ) func NewWriter(stream_key string) (io.WriteCloser, error) { - base_dir, _ := os.UserHomeDir() - file, err := os.Create(base_dir + "/live/" + stream_key + "/rawdump.ts") + transcoder_in, err := transcoder.NewTranscoder(stream_key) if err != nil { return nil, err } - return file, nil + return transcoder_in, nil } func CheckStreamID(stream_id []byte) (io.WriteCloser, bool) {