mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
remove broadcast Config
This commit is contained in:
parent
aa1a3ec413
commit
88c0337a16
@ -20,7 +20,6 @@ func init() {
|
|||||||
neko.Service.Server,
|
neko.Service.Server,
|
||||||
neko.Service.WebRTC,
|
neko.Service.WebRTC,
|
||||||
neko.Service.Remote,
|
neko.Service.Remote,
|
||||||
neko.Service.Broadcast,
|
|
||||||
neko.Service.WebSocket,
|
neko.Service.WebSocket,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,16 +12,14 @@ type BroadcastManager struct {
|
|||||||
logger zerolog.Logger
|
logger zerolog.Logger
|
||||||
pipeline *gst.Pipeline
|
pipeline *gst.Pipeline
|
||||||
remote *config.Remote
|
remote *config.Remote
|
||||||
config *config.Broadcast
|
|
||||||
enabled bool
|
enabled bool
|
||||||
url string
|
url string
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(remote *config.Remote, config *config.Broadcast) *BroadcastManager {
|
func New(remote *config.Remote) *BroadcastManager {
|
||||||
return &BroadcastManager{
|
return &BroadcastManager{
|
||||||
logger: log.With().Str("module", "remote").Logger(),
|
logger: log.With().Str("module", "remote").Logger(),
|
||||||
remote: remote,
|
remote: remote,
|
||||||
config: config,
|
|
||||||
enabled: false,
|
enabled: false,
|
||||||
url: "",
|
url: "",
|
||||||
}
|
}
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
"github.com/spf13/viper"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Broadcast struct {
|
|
||||||
// Enabled bool
|
|
||||||
// AudioParams string
|
|
||||||
// VideoParams string
|
|
||||||
}
|
|
||||||
|
|
||||||
func (Broadcast) Init(cmd *cobra.Command) error {
|
|
||||||
// cmd.PersistentFlags().Bool("broadcast", false, "enable boradcasting")
|
|
||||||
// if err := viper.BindPFlag("broadcast", cmd.PersistentFlags().Lookup("broadcast")); err != nil {
|
|
||||||
// return err
|
|
||||||
// }
|
|
||||||
|
|
||||||
// cmd.PersistentFlags().String("cast_audio", "", "audio codec parameters to use for broadcasting")
|
|
||||||
// if err := viper.BindPFlag("cast_audio", cmd.PersistentFlags().Lookup("cast_audio")); err != nil {
|
|
||||||
// return err
|
|
||||||
// }
|
|
||||||
|
|
||||||
// cmd.PersistentFlags().String("cast_video", "", "video codec parameters to use for broadcasting")
|
|
||||||
// if err := viper.BindPFlag("cast_video", cmd.PersistentFlags().Lookup("cast_video")); err != nil {
|
|
||||||
// return err
|
|
||||||
// }
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *Broadcast) Set() {
|
|
||||||
// s.Enabled = viper.GetBool("broadcast")
|
|
||||||
// s.AudioParams = viper.GetString("cast_audio")
|
|
||||||
// s.VideoParams = viper.GetString("cast_video")
|
|
||||||
}
|
|
@ -62,7 +62,6 @@ func init() {
|
|||||||
Root: &config.Root{},
|
Root: &config.Root{},
|
||||||
Server: &config.Server{},
|
Server: &config.Server{},
|
||||||
Remote: &config.Remote{},
|
Remote: &config.Remote{},
|
||||||
Broadcast: &config.Broadcast{},
|
|
||||||
WebRTC: &config.WebRTC{},
|
WebRTC: &config.WebRTC{},
|
||||||
WebSocket: &config.WebSocket{},
|
WebSocket: &config.WebSocket{},
|
||||||
}
|
}
|
||||||
@ -101,7 +100,6 @@ type Neko struct {
|
|||||||
Version *Version
|
Version *Version
|
||||||
Root *config.Root
|
Root *config.Root
|
||||||
Remote *config.Remote
|
Remote *config.Remote
|
||||||
Broadcast *config.Broadcast
|
|
||||||
Server *config.Server
|
Server *config.Server
|
||||||
WebRTC *config.WebRTC
|
WebRTC *config.WebRTC
|
||||||
WebSocket *config.WebSocket
|
WebSocket *config.WebSocket
|
||||||
@ -120,7 +118,7 @@ func (neko *Neko) Preflight() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (neko *Neko) Start() {
|
func (neko *Neko) Start() {
|
||||||
broadcastManager := broadcast.New(neko.Remote, neko.Broadcast)
|
broadcastManager := broadcast.New(neko.Remote)
|
||||||
|
|
||||||
remoteManager := remote.New(neko.Remote, broadcastManager)
|
remoteManager := remote.New(neko.Remote, broadcastManager)
|
||||||
remoteManager.Start()
|
remoteManager.Start()
|
||||||
|
Loading…
Reference in New Issue
Block a user