mirror of
https://github.com/owncast/owncast.git
synced 2024-12-19 07:44:26 +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)
|
||
|
}()
|
||
|
}
|