dvrip

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SignalStreamStop = iota
	SignalCodecUpdate
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	CodecData           []av.CodecData
	OutgoingPacketQueue chan *av.Packet
	Signals             chan int
	// contains filtered or unexported fields
}

func Dial

func Dial(options ClientOptions) (*Client, error)

Dial func

func (*Client) Close

func (client *Client) Close() error

Close func

func (*Client) CodecUpdatePCMAlaw

func (client *Client) CodecUpdatePCMAlaw()

func (*Client) CodecUpdatePPS

func (client *Client) CodecUpdatePPS(val []byte)

func (*Client) CodecUpdateSPS

func (client *Client) CodecUpdateSPS(val []byte)

func (*Client) Command

func (client *Client) Command(command requestCode, data interface{}) (*Payload, []byte, error)

Command func

func (*Client) Login

func (client *Client) Login() error

func (*Client) Monitor

func (client *Client) Monitor()

Monitor func

func (*Client) SetKeepAlive

func (client *Client) SetKeepAlive() error

SetKeepAlive func

func (*Client) SetTime

func (client *Client) SetTime() error

type ClientOptions

type ClientOptions struct {
	Debug            bool
	URL              string
	DialTimeout      time.Duration
	ReadWriteTimeout time.Duration
	DisableAudio     bool
}

type Frame

type Frame struct {
	Data []byte
	Meta MetaInfo
}

type LoginResp

type LoginResp struct {
	AliveInterval int    `json:"AliveInterval"`
	ChannelNum    int    `json:"ChannelNum"`
	DeviceType    string `json:"DeviceType "`
	ExtraChannel  int    `json:"ExtraChannel"`
	Ret           int    `json:"Ret"`
	SessionID     string `json:"SessionID"`
}

type MetaInfo

type MetaInfo struct {
	Width    int
	Height   int
	Datetime time.Time
	FPS      int
	Frame    string
	Type     string
}

type Payload

type Payload struct {
	Head    byte
	Version byte

	Session        int32
	SequenceNumber int32

	MsgID      int16
	BodyLength int32
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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