Documentation ¶
Index ¶
- Variables
- type ErrNoVariable
- type ErrVariableWrongType
- type Event
- type OBSInstanceID
- type OBSState
- type SaveConfigFunc
- type SceneElementIdentifier
- type StreamControllers
- type StreamD
- func (d *StreamD) AddIncomingStream(ctx context.Context, streamID api.StreamID) error
- func (d *StreamD) AddOAuthListenPort(port uint16)
- func (d *StreamD) AddStreamDestination(ctx context.Context, destinationID api.DestinationID, url string, ...) error
- func (d *StreamD) AddStreamForward(ctx context.Context, streamID api.StreamID, destinationID api.DestinationID, ...) error
- func (d *StreamD) AddStreamPlayer(ctx context.Context, streamID streamtypes.StreamID, playerType player.Backend, ...) error
- func (d *StreamD) AddTimer(ctx context.Context, triggerAt time.Time, action api.Action) (api.TimerID, error)
- func (d *StreamD) AddTriggerRule(ctx context.Context, triggerRule *api.TriggerRule) (api.TriggerRuleID, error)
- func (d *StreamD) ApplyProfile(ctx context.Context, platID streamcontrol.PlatformName, ...) error
- func (d *StreamD) BanUser(ctx context.Context, platID streamcontrol.PlatformName, ...) error
- func (d *StreamD) DialContext(ctx context.Context, network string, addr string) (net.Conn, error)
- func (d *StreamD) EXPERIMENTAL_ReinitStreamControllers(ctx context.Context) (_err error)
- func (d *StreamD) EndStream(ctx context.Context, platID streamcontrol.PlatformName) error
- func (d *StreamD) GetBackendInfo(ctx context.Context, platID streamcontrol.PlatformName) (*api.BackendInfo, error)
- func (d *StreamD) GetConfig(ctx context.Context) (*config.Config, error)
- func (d *StreamD) GetLoggingLevel(ctx context.Context) (logger.Level, error)
- func (d *StreamD) GetOAuthListenPorts() []uint16
- func (d *StreamD) GetStreamPlayer(ctx context.Context, streamID streamtypes.StreamID) (*api.StreamPlayer, error)
- func (d *StreamD) GetStreamStatus(ctx context.Context, platID streamcontrol.PlatformName) (*streamcontrol.StreamStatus, error)
- func (d *StreamD) GetVariable(ctx context.Context, key consts.VarKey) ([]byte, error)
- func (d *StreamD) GetVariableHash(ctx context.Context, key consts.VarKey, hashType crypto.Hash) ([]byte, error)
- func (d *StreamD) InitCache(ctx context.Context) error
- func (d *StreamD) InitStreamServer(ctx context.Context) (_err error)
- func (d *StreamD) IsBackendEnabled(ctx context.Context, id streamcontrol.PlatformName) (bool, error)
- func (d *StreamD) ListIncomingStreams(ctx context.Context) ([]api.IncomingStream, error)
- func (d *StreamD) ListStreamDestinations(ctx context.Context) ([]api.StreamDestination, error)
- func (d *StreamD) ListStreamForwards(ctx context.Context) ([]api.StreamForward, error)
- func (d *StreamD) ListStreamPlayers(ctx context.Context) ([]api.StreamPlayer, error)
- func (d *StreamD) ListStreamServers(ctx context.Context) ([]api.StreamServer, error)
- func (d *StreamD) ListTimers(ctx context.Context) ([]api.Timer, error)
- func (d *StreamD) ListTriggerRules(ctx context.Context) (api.TriggerRules, error)
- func (d *StreamD) OBS(ctx context.Context) (obs_grpc.OBSServer, context.CancelFunc, error)
- func (d *StreamD) OBSElementSetShow(ctx context.Context, elID SceneElementIdentifier, shouldShow bool) error
- func (d *StreamD) OBSOLETE_IsGITInitialized(ctx context.Context) (bool, error)
- func (d *StreamD) P2P() p2p.P2P
- func (d *StreamD) RemoveChatMessage(ctx context.Context, platID streamcontrol.PlatformName, ...) error
- func (d *StreamD) RemoveIncomingStream(ctx context.Context, streamID api.StreamID) error
- func (d *StreamD) RemoveOAuthListenPort(port uint16)
- func (d *StreamD) RemoveStreamDestination(ctx context.Context, destinationID api.DestinationID) error
- func (d *StreamD) RemoveStreamForward(ctx context.Context, streamID api.StreamID, destinationID api.DestinationID) error
- func (d *StreamD) RemoveStreamPlayer(ctx context.Context, streamID streamtypes.StreamID) error
- func (d *StreamD) RemoveTimer(ctx context.Context, timerID api.TimerID) error
- func (d *StreamD) RemoveTriggerRule(ctx context.Context, ruleID api.TriggerRuleID) error
- func (d *StreamD) ResetCache(ctx context.Context) error
- func (d *StreamD) Run(ctx context.Context) (_ret error)
- func (d *StreamD) SaveConfig(ctx context.Context) error
- func (d *StreamD) SendChatMessage(ctx context.Context, platID streamcontrol.PlatformName, message string) (_err error)
- func (d *StreamD) SetConfig(ctx context.Context, cfg *config.Config) error
- func (d *StreamD) SetDescription(ctx context.Context, platID streamcontrol.PlatformName, description string) error
- func (d *StreamD) SetLoggingLevel(ctx context.Context, level logger.Level) error
- func (d *StreamD) SetTitle(ctx context.Context, platID streamcontrol.PlatformName, title string) error
- func (d *StreamD) SetVariable(ctx context.Context, key consts.VarKey, value []byte) error
- func (d *StreamD) StartStream(ctx context.Context, platID streamcontrol.PlatformName, title string, ...) (_err error)
- func (d *StreamD) StartStreamServer(ctx context.Context, serverType api.StreamServerType, listenAddr string, ...) error
- func (d *StreamD) StopStreamServer(ctx context.Context, listenAddr string) error
- func (d *StreamD) StreamPlayerClose(ctx context.Context, streamID streamtypes.StreamID) error
- func (d *StreamD) StreamPlayerEndChan(ctx context.Context, streamID streamtypes.StreamID) (<-chan struct{}, error)
- func (d *StreamD) StreamPlayerGetLength(ctx context.Context, streamID streamtypes.StreamID) (time.Duration, error)
- func (d *StreamD) StreamPlayerGetLink(ctx context.Context, streamID streamtypes.StreamID) (string, error)
- func (d *StreamD) StreamPlayerGetPosition(ctx context.Context, streamID streamtypes.StreamID) (time.Duration, error)
- func (d *StreamD) StreamPlayerIsEnded(ctx context.Context, streamID streamtypes.StreamID) (bool, error)
- func (d *StreamD) StreamPlayerOpenURL(ctx context.Context, streamID streamtypes.StreamID, link string) error
- func (d *StreamD) StreamPlayerProcessTitle(ctx context.Context, streamID streamtypes.StreamID) (string, error)
- func (d *StreamD) StreamPlayerSetPause(ctx context.Context, streamID streamtypes.StreamID, pause bool) error
- func (d *StreamD) StreamPlayerSetSpeed(ctx context.Context, streamID streamtypes.StreamID, speed float64) error
- func (d *StreamD) StreamPlayerStop(ctx context.Context, streamID streamtypes.StreamID) error
- func (d *StreamD) SubmitEvent(ctx context.Context, ev event.Event) error
- func (d *StreamD) SubmitOAuthCode(ctx context.Context, req *streamd_grpc.SubmitOAuthCodeRequest) (*streamd_grpc.SubmitOAuthCodeReply, error)
- func (d *StreamD) SubscribeToChatMessages(ctx context.Context) (<-chan api.ChatMessage, error)
- func (d *StreamD) SubscribeToConfigChanges(ctx context.Context) (<-chan api.DiffConfig, error)
- func (d *StreamD) SubscribeToDashboardChanges(ctx context.Context) (<-chan api.DiffDashboard, error)
- func (d *StreamD) SubscribeToIncomingStreamsChanges(ctx context.Context) (<-chan api.DiffIncomingStreams, error)
- func (d *StreamD) SubscribeToStreamDestinationsChanges(ctx context.Context) (<-chan api.DiffStreamDestinations, error)
- func (d *StreamD) SubscribeToStreamForwardsChanges(ctx context.Context) (<-chan api.DiffStreamForwards, error)
- func (d *StreamD) SubscribeToStreamPlayersChanges(ctx context.Context) (<-chan api.DiffStreamPlayers, error)
- func (d *StreamD) SubscribeToStreamServersChanges(ctx context.Context) (<-chan api.DiffStreamServers, error)
- func (d *StreamD) SubscribeToStreamsChanges(ctx context.Context) (<-chan api.DiffStreams, error)
- func (d *StreamD) UpdateStream(ctx context.Context, platID streamcontrol.PlatformName, title string, ...) error
- func (d *StreamD) UpdateStreamDestination(ctx context.Context, destinationID api.DestinationID, url string, ...) error
- func (d *StreamD) UpdateStreamForward(ctx context.Context, streamID api.StreamID, destinationID api.DestinationID, ...) error
- func (d *StreamD) UpdateStreamPlayer(ctx context.Context, streamID streamtypes.StreamID, playerType player.Backend, ...) (_err error)
- func (d *StreamD) UpdateTriggerRule(ctx context.Context, ruleID api.TriggerRuleID, triggerRule *api.TriggerRule) error
- func (d *StreamD) WaitForStreamPublisher(ctx context.Context, streamID api.StreamID) (<-chan struct{}, error)
- type Timer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotChanged = errors.New("not changed")
View Source
var ErrSkipBackend = streamd.ErrSkipBackend
Functions ¶
This section is empty.
Types ¶
type ErrNoVariable ¶
type ErrNoVariable struct{}
func (ErrNoVariable) Error ¶
func (ErrNoVariable) Error() string
type ErrVariableWrongType ¶
type ErrVariableWrongType struct{}
func (ErrVariableWrongType) Error ¶
func (ErrVariableWrongType) Error() string
type OBSInstanceID ¶
type OBSInstanceID = streamtypes.OBSInstanceID
type OBSState ¶
type OBSState = streamtypes.OBSState
type SceneElementIdentifier ¶
type StreamControllers ¶
type StreamD ¶
type StreamD struct { UI ui.UI P2PNetwork p2p.P2P SaveConfigFunc SaveConfigFunc ConfigLock xsync.Gorex Config config.Config CacheLock xsync.Mutex Cache *cache.Cache GitStorage *repository.GIT CancelGitSyncer context.CancelFunc GitSyncerMutex xsync.Mutex GitInitialized bool StreamControllers StreamControllers Variables sync.Map OAuthListenPortsLocker xsync.Mutex OAuthListenPorts map[uint16]struct{} ControllersLocker xsync.RWMutex StreamServerLocker xsync.RWMutex StreamServer streamserver.StreamServer StreamStatusCache *memoize.MemoizeData OBSState OBSState EventBus eventbus.Bus TimersLocker xsync.Mutex NextTimerID uint64 Timers map[api.TimerID]*Timer ImageHash xsync.Map[string, imageHash] // contains filtered or unexported fields }
func (*StreamD) AddIncomingStream ¶
func (*StreamD) AddOAuthListenPort ¶
func (*StreamD) AddStreamDestination ¶
func (*StreamD) AddStreamForward ¶
func (*StreamD) AddStreamPlayer ¶
func (*StreamD) AddTriggerRule ¶
func (d *StreamD) AddTriggerRule( ctx context.Context, triggerRule *api.TriggerRule, ) (api.TriggerRuleID, error)
func (*StreamD) ApplyProfile ¶
func (d *StreamD) ApplyProfile( ctx context.Context, platID streamcontrol.PlatformName, profile streamcontrol.AbstractStreamProfile, customArgs ...any, ) error
func (*StreamD) BanUser ¶
func (d *StreamD) BanUser( ctx context.Context, platID streamcontrol.PlatformName, userID streamcontrol.ChatUserID, reason string, deadline time.Time, ) error
func (*StreamD) DialContext ¶
func (*StreamD) EXPERIMENTAL_ReinitStreamControllers ¶
func (*StreamD) EndStream ¶
func (d *StreamD) EndStream(ctx context.Context, platID streamcontrol.PlatformName) error
func (*StreamD) GetBackendInfo ¶
func (d *StreamD) GetBackendInfo( ctx context.Context, platID streamcontrol.PlatformName, ) (*api.BackendInfo, error)
func (*StreamD) GetLoggingLevel ¶
func (*StreamD) GetOAuthListenPorts ¶
func (*StreamD) GetStreamPlayer ¶
func (d *StreamD) GetStreamPlayer( ctx context.Context, streamID streamtypes.StreamID, ) (*api.StreamPlayer, error)
func (*StreamD) GetStreamStatus ¶
func (d *StreamD) GetStreamStatus( ctx context.Context, platID streamcontrol.PlatformName, ) (*streamcontrol.StreamStatus, error)
func (*StreamD) GetVariable ¶
func (*StreamD) GetVariableHash ¶
func (*StreamD) InitStreamServer ¶
func (*StreamD) IsBackendEnabled ¶
func (d *StreamD) IsBackendEnabled( ctx context.Context, id streamcontrol.PlatformName, ) (bool, error)
func (*StreamD) ListIncomingStreams ¶
func (*StreamD) ListStreamDestinations ¶
func (*StreamD) ListStreamForwards ¶
func (*StreamD) ListStreamPlayers ¶
func (*StreamD) ListStreamServers ¶
func (*StreamD) ListTimers ¶
func (*StreamD) ListTriggerRules ¶
func (*StreamD) OBSElementSetShow ¶
func (*StreamD) OBSOLETE_IsGITInitialized ¶
func (*StreamD) RemoveChatMessage ¶
func (d *StreamD) RemoveChatMessage( ctx context.Context, platID streamcontrol.PlatformName, msgID streamcontrol.ChatMessageID, ) error
func (*StreamD) RemoveIncomingStream ¶
func (*StreamD) RemoveOAuthListenPort ¶
func (*StreamD) RemoveStreamDestination ¶
func (*StreamD) RemoveStreamForward ¶
func (*StreamD) RemoveStreamPlayer ¶
func (*StreamD) RemoveTimer ¶
func (*StreamD) RemoveTriggerRule ¶
func (*StreamD) SendChatMessage ¶
func (d *StreamD) SendChatMessage( ctx context.Context, platID streamcontrol.PlatformName, message string, ) (_err error)
func (*StreamD) SetDescription ¶
func (d *StreamD) SetDescription( ctx context.Context, platID streamcontrol.PlatformName, description string, ) error
func (*StreamD) SetLoggingLevel ¶
func (*StreamD) SetTitle ¶
func (d *StreamD) SetTitle( ctx context.Context, platID streamcontrol.PlatformName, title string, ) error
func (*StreamD) SetVariable ¶
func (*StreamD) StartStream ¶
func (d *StreamD) StartStream( ctx context.Context, platID streamcontrol.PlatformName, title string, description string, profile streamcontrol.AbstractStreamProfile, customArgs ...any, ) (_err error)
func (*StreamD) StartStreamServer ¶
func (d *StreamD) StartStreamServer( ctx context.Context, serverType api.StreamServerType, listenAddr string, opts ...streamportserver.Option, ) error
func (*StreamD) StopStreamServer ¶
func (*StreamD) StreamPlayerClose ¶
func (*StreamD) StreamPlayerEndChan ¶
func (*StreamD) StreamPlayerGetLength ¶
func (*StreamD) StreamPlayerGetLink ¶
func (*StreamD) StreamPlayerGetPosition ¶
func (*StreamD) StreamPlayerIsEnded ¶
func (*StreamD) StreamPlayerOpenURL ¶
func (*StreamD) StreamPlayerProcessTitle ¶
func (*StreamD) StreamPlayerSetPause ¶
func (*StreamD) StreamPlayerSetSpeed ¶
func (*StreamD) StreamPlayerStop ¶
func (*StreamD) SubmitEvent ¶
func (*StreamD) SubmitOAuthCode ¶
func (d *StreamD) SubmitOAuthCode( ctx context.Context, req *streamd_grpc.SubmitOAuthCodeRequest, ) (*streamd_grpc.SubmitOAuthCodeReply, error)
func (*StreamD) SubscribeToChatMessages ¶
func (*StreamD) SubscribeToConfigChanges ¶
func (*StreamD) SubscribeToDashboardChanges ¶
func (*StreamD) SubscribeToIncomingStreamsChanges ¶
func (*StreamD) SubscribeToStreamDestinationsChanges ¶
func (*StreamD) SubscribeToStreamForwardsChanges ¶
func (*StreamD) SubscribeToStreamPlayersChanges ¶
func (*StreamD) SubscribeToStreamServersChanges ¶
func (*StreamD) SubscribeToStreamsChanges ¶
func (*StreamD) UpdateStream ¶
func (d *StreamD) UpdateStream( ctx context.Context, platID streamcontrol.PlatformName, title string, description string, profile streamcontrol.AbstractStreamProfile, customArgs ...any, ) error
func (*StreamD) UpdateStreamDestination ¶
func (*StreamD) UpdateStreamForward ¶
func (*StreamD) UpdateStreamPlayer ¶
func (*StreamD) UpdateTriggerRule ¶
func (d *StreamD) UpdateTriggerRule( ctx context.Context, ruleID api.TriggerRuleID, triggerRule *api.TriggerRule, ) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.