dms

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2021 License: BSD-3-Clause Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MimeTypeByPath

func MimeTypeByPath(filePath string) (ret mimeType, err error)

MimeTypeByPath determines the MIME-type of file at the given path

Types

type Cache

type Cache interface {
	Set(key interface{}, value interface{})
	Get(key interface{}) (value interface{}, ok bool)
}

type FfprobeCacheItem

type FfprobeCacheItem struct {
	Key   ffmpegInfoCacheKey
	Value *ffprobe.Info
}

Public definition so that external modules can persist cache contents.

type Icon

type Icon struct {
	Width, Height, Depth int
	Mimetype             string
	io.ReadSeeker
}

type Server

type Server struct {
	HTTPConn     net.Listener
	FriendlyName string
	Interfaces   []net.Interface

	RootObjectPath string

	FFProbeCache Cache

	// The service SOAP handler keyed by service URN.
	Services   map[string]UPnPService
	LogHeaders bool
	// Disable transcoding, and the resource elements implied in the CDS.
	NoTranscode bool
	// Force transcoding to certain format of the 'transcodes' map
	ForceTranscodeTo string
	// Disable media probing with ffprobe
	NoProbe bool
	Icons   []Icon
	// Stall event subscription requests until they drop. A workaround for
	// some bad clients.
	StallEventSubscribe bool
	// Time interval between SSPD announces
	NotifyInterval time.Duration
	// Ignore hidden files and directories
	IgnoreHidden bool
	// Ingnore unreadable files and directories
	IgnoreUnreadable bool
	// White list of clients
	AllowedIpNets []*net.IPNet
	// contains filtered or unexported fields
}

func (*Server) Close

func (srv *Server) Close() (err error)

func (*Server) IgnorePath

func (server *Server) IgnorePath(path string) (bool, error)

IgnorePath detects if a file/directory should be ignored.

func (*Server) Init

func (srv *Server) Init() (err error)

func (*Server) Run

func (srv *Server) Run() (err error)

func (*Server) Serve deprecated

func (srv *Server) Serve() (err error)

Deprecated: Use Init and then Run. There's a race calling Close on a Server that's had Serve called on it.

type UPnPService

type UPnPService interface {
	Handle(action string, argsXML []byte, r *http.Request) (respArgs map[string]string, err error)
	Subscribe(callback []*url.URL, timeoutSeconds int) (sid string, actualTimeout int, err error)
	Unsubscribe(sid string) error
}

UPnP SOAP service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL