Documentation ¶
Overview ¶
Package paparazzogo implements a caching proxy for serving MJPEG-stream as JPG-images.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mjpegproxy ¶
type Mjpegproxy struct {
// contains filtered or unexported fields
}
A Mjpegproxy implements http.Handler interface and generates JPG-images from a MJPEG-stream.
func NewMjpegproxy ¶
func NewMjpegproxy() *Mjpegproxy
NewMjpegproxy returns a new Mjpegproxy with default values.
func (*Mjpegproxy) CloseStream ¶
func (m *Mjpegproxy) CloseStream()
CloseStream stops and closes MJPEG-stream.
func (*Mjpegproxy) GetRunning ¶
func (m *Mjpegproxy) GetRunning() bool
GetRunning returns state of openstream.
func (*Mjpegproxy) OpenStream ¶
func (m *Mjpegproxy) OpenStream(mjpegStream, user, pass string, timeout time.Duration)
OpenStream creates a go-routine of openstream.
func (*Mjpegproxy) ServeHTTP ¶
func (m *Mjpegproxy) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP uses w to serve current last MJPEG-frame as JPG. It also reopens MJPEG-stream if it was closed by idle timeout.
Click to show internal directories.
Click to hide internal directories.