dvrip

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 14 Imported by: 0

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