mirror of
https://github.com/owncast/owncast.git
synced 2024-11-24 13:50:06 +03:00
27 lines
529 B
Go
27 lines
529 B
Go
|
package core
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
|
||
|
"github.com/owncast/owncast/core/transcoder"
|
||
|
)
|
||
|
|
||
|
func setupVideoComponentsForId(streamId string) {
|
||
|
}
|
||
|
|
||
|
func setupLiveTranscoderForId(streamId string, rtmpOut *io.PipeReader) {
|
||
|
_storage.SetStreamId(streamId)
|
||
|
handler.SetStreamId(streamId)
|
||
|
|
||
|
go func() {
|
||
|
_transcoder = transcoder.NewTranscoder(streamId)
|
||
|
_transcoder.TranscoderCompleted = func(error) {
|
||
|
SetStreamAsDisconnected()
|
||
|
_transcoder = nil
|
||
|
_currentBroadcast = nil
|
||
|
}
|
||
|
_transcoder.SetStdin(rtmpOut)
|
||
|
_transcoder.Start(true)
|
||
|
}()
|
||
|
}
|