Stop rtmp from reaching back into core (#290)
* Stop rtmp from reaching back into core. * Un-export since these functions no longer need to be public
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/owncast/owncast/config"
|
||||
"github.com/owncast/owncast/core/ffmpeg"
|
||||
"github.com/owncast/owncast/core/rtmp"
|
||||
"github.com/owncast/owncast/utils"
|
||||
|
||||
"github.com/grafov/m3u8"
|
||||
@@ -22,8 +23,8 @@ var _offlineCleanupTimer *time.Timer
|
||||
// While a stream takes place cleanup old HLS content every N min.
|
||||
var _onlineCleanupTicker *time.Ticker
|
||||
|
||||
//SetStreamAsConnected sets the stream as connected
|
||||
func SetStreamAsConnected() {
|
||||
//setStreamAsConnected sets the stream as connected
|
||||
func setStreamAsConnected() {
|
||||
_stats.StreamConnected = true
|
||||
_stats.LastConnectTime = utils.NullTime{time.Now(), true}
|
||||
_stats.LastDisconnectTime = utils.NullTime{time.Now(), false}
|
||||
@@ -62,6 +63,8 @@ func SetStreamAsDisconnected() {
|
||||
offlineFilePath := "static/" + offlineFilename
|
||||
|
||||
ffmpeg.StopThumbnailGenerator()
|
||||
rtmp.Disconnect()
|
||||
|
||||
if _yp != nil {
|
||||
_yp.Stop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user