move gst and broadcast under capture.

This commit is contained in:
Miroslav Šedivý 2022-09-12 22:16:08 +02:00
parent de4f6b45e5
commit c0ca073b2d
6 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,4 @@
package broadcast package capture
import ( import (
"sync" "sync"
@ -6,7 +6,7 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"m1k1o/neko/internal/gst" "m1k1o/neko/internal/capture/gst"
"m1k1o/neko/internal/types/config" "m1k1o/neko/internal/types/config"
) )
@ -20,7 +20,7 @@ type BroadcastManager struct {
url string url string
} }
func New(capture *config.Capture, config *config.Broadcast) *BroadcastManager { func NewBroadcast(capture *config.Capture, config *config.Broadcast) *BroadcastManager {
return &BroadcastManager{ return &BroadcastManager{
logger: log.With().Str("module", "broadcast").Logger(), logger: log.With().Str("module", "broadcast").Logger(),
capture: capture, capture: capture,

View File

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"time" "time"
"m1k1o/neko/internal/capture/gst"
"m1k1o/neko/internal/desktop/xorg" "m1k1o/neko/internal/desktop/xorg"
"m1k1o/neko/internal/gst"
"m1k1o/neko/internal/types" "m1k1o/neko/internal/types"
"m1k1o/neko/internal/types/config" "m1k1o/neko/internal/types/config"

View File

@ -6,7 +6,6 @@ import (
"os/signal" "os/signal"
"runtime" "runtime"
"m1k1o/neko/internal/broadcast"
"m1k1o/neko/internal/capture" "m1k1o/neko/internal/capture"
"m1k1o/neko/internal/desktop" "m1k1o/neko/internal/desktop"
"m1k1o/neko/internal/http" "m1k1o/neko/internal/http"
@ -114,7 +113,7 @@ type Neko struct {
sessionManager *session.SessionManager sessionManager *session.SessionManager
captureManager *capture.CaptureManagerCtx captureManager *capture.CaptureManagerCtx
desktopManager *desktop.DesktopManagerCtx desktopManager *desktop.DesktopManagerCtx
broadcastManager *broadcast.BroadcastManager broadcastManager *capture.BroadcastManager
webRTCManager *webrtc.WebRTCManager webRTCManager *webrtc.WebRTCManager
webSocketHandler *websocket.WebSocketHandler webSocketHandler *websocket.WebSocketHandler
} }
@ -124,7 +123,7 @@ func (neko *Neko) Preflight() {
} }
func (neko *Neko) Start() { func (neko *Neko) Start() {
broadcastManager := broadcast.New(neko.Capture, neko.Broadcast) broadcastManager := capture.NewBroadcast(neko.Capture, neko.Broadcast)
desktopManager := desktop.New(neko.Desktop, broadcastManager) desktopManager := desktop.New(neko.Desktop, broadcastManager)
desktopManager.Start() desktopManager.Start()