Documentation ¶
Index ¶
- Variables
- func EventNotifyParser(xmlbody string) (string, string, error)
- func GetFriendlyName(ctx context.Context, dmr string) (string, error)
- type DMRextracted
- type Options
- type States
- type TVPayload
- func (p *TVPayload) CreateMRstate(uuid string)
- func (p *TVPayload) DeleteMRstate(uuid string)
- func (p *TVPayload) Gapless() (string, error)
- func (p *TVPayload) GetMuteSoapCall() (string, error)
- func (p *TVPayload) GetPositionInfo() ([]string, error)
- func (p *TVPayload) GetProcessStop(uuid string) (bool, error)
- func (p *TVPayload) GetProtocolInfo() error
- func (p *TVPayload) GetTransportInfo() ([]string, error)
- func (p *TVPayload) GetVolumeSoapCall() (int, error)
- func (p *TVPayload) ListenAddress() string
- func (p *TVPayload) Log() *zerolog.Logger
- func (p *TVPayload) PlayPauseStopSoapCall(action string) error
- func (p *TVPayload) RefreshLoopUUIDSoapCall(uuid, timeout string)
- func (p *TVPayload) SeekSoapCall(reltime string) error
- func (p *TVPayload) SendtoTV(action string) error
- func (p *TVPayload) SetMuteSoapCall(number string) error
- func (p *TVPayload) SetProcessStopTrue(uuid string)
- func (p *TVPayload) SetVolumeSoapCall(v string) error
- func (p *TVPayload) SubscribeSoapCall(uuidInput string) error
- func (p *TVPayload) UnsubscribeSoapCall(uuid string) error
- func (p *TVPayload) UpdateMRstate(previous, new, uuid string) bool
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoMatchingFileType = errors.New("no matching file type") ErrZombieCallbacks = errors.New("zombie callbacks, we should ignore those") )
var (
ErrSetMuteInput = errors.New("setMuteSoapBuild input error. Was expecting 0 or 1.")
)
var (
ErrWrongDMR = errors.New("something broke somewhere - wrong DMR URL?")
)
Functions ¶
func EventNotifyParser ¶
EventNotifyParser parses the Notify messages from the DMR device.
Types ¶
type DMRextracted ¶
type DMRextracted struct { AvtransportControlURL string AvtransportEventSubURL string RenderingControlURL string ConnectionManagerURL string }
DMRextracted stored the services urls
func DMRextractor ¶
func DMRextractor(ctx context.Context, dmrurl string) (*DMRextracted, error)
DMRextractor extracts the services URLs from the main DMR xml.
type TVPayload ¶
type TVPayload struct { Logger zerolog.Logger LogOutput io.Writer CurrentTimers map[string]*time.Timer InitialMediaRenderersStates map[string]bool MediaRenderersStates map[string]*States EventURL string ControlURL string MediaURL string MediaType string MediaPath string SubtitlesURL string CallbackURL string ConnectionManagerURL string RenderingControlURL string Transcode bool Seekable bool // contains filtered or unexported fields }
TVPayload is the heart of Go2TV. We pass that type to the webserver. We need to explicitly initialize it.
func NewTVPayload ¶
func (*TVPayload) DeleteMRstate ¶
DeleteMRstate deletes the state entries for the specific UUID.
func (*TVPayload) GetMuteSoapCall ¶
GetMuteSoapCall returns the mute status for our device
func (*TVPayload) GetPositionInfo ¶
GetPositionInfo .
func (*TVPayload) GetProcessStop ¶
GetProcessStop returns the processStop value of the specific UUID.
func (*TVPayload) GetProtocolInfo ¶
GetProtocolInfo requests our device's protocol info.
func (*TVPayload) GetTransportInfo ¶
GetTransportInfo .
func (*TVPayload) GetVolumeSoapCall ¶
GetVolumeSoapCall returns tue volume level for our device.
func (*TVPayload) ListenAddress ¶
func (*TVPayload) PlayPauseStopSoapCall ¶
PlayPauseStopSoapCall builds and sends the AVTransport actions for Play Pause and Stop.
func (*TVPayload) RefreshLoopUUIDSoapCall ¶
RefreshLoopUUIDSoapCall refreshes the UUID.
func (*TVPayload) SeekSoapCall ¶
SeekSoapCall builds and sends the AVTransport actions for Seek.
func (*TVPayload) SendtoTV ¶
SendtoTV is a higher level method that gracefully handles the various states when communicating with the DMR devices.
func (*TVPayload) SetMuteSoapCall ¶
SetMuteSoapCall returns true if muted and false if not muted.
func (*TVPayload) SetProcessStopTrue ¶
SetProcessStopTrue set the stop process to true
func (*TVPayload) SetVolumeSoapCall ¶
SetVolumeSoapCall sets the desired volume level.
func (*TVPayload) SubscribeSoapCall ¶
SubscribeSoapCall send a SUBSCRIBE request to the DMR device. If we explicitly pass the UUID, then we refresh it instead.
func (*TVPayload) UnsubscribeSoapCall ¶
UnsubscribeSoapCall sends an UNSUBSCRIBE request to the DMR device and cleans up any stored states for the provided UUID.
func (*TVPayload) UpdateMRstate ¶
UpdateMRstate updates the mediaRenderersStates map with the state. Returns true or false to verify that the actual update took place.