appcamera

package
v0.0.0-...-b5c3593 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Aborted = "ABORTED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CameraFeatures

type CameraFeatures struct {
	PTZ        bool       `json:"PTZ"`
	Zoom       bool       `json:"Zoom"`
	CameraType CameraType `json:"CameraType"`
}

type CameraManagementApp

type CameraManagementApp struct {
	// contains filtered or unexported fields
}

func NewCameraManagementApp

func NewCameraManagementApp(service interfaces.ApplicationService) *CameraManagementApp

func (*CameraManagementApp) Run

func (app *CameraManagementApp) Run() error

type CameraType

type CameraType string
const (
	USB     CameraType = "USB"
	Onvif   CameraType = "Onvif"
	Unknown CameraType = "Unknown"
)

type CustomConfig

type CustomConfig struct {
	OnvifDeviceServiceName string
	USBDeviceServiceName   string
	EvamBaseUrl            string
	MqttAddress            string
	MqttTopic              string
	DefaultPipelineName    string
	DefaultPipelineVersion string
}

CustomConfig holds the values for the app configuration

type Destination

type Destination struct {
	Metadata Metadata `json:"metadata"`
	Frame    Frame    `json:"frame"`
}

type Frame

type Frame struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

type Metadata

type Metadata struct {
	Type  string `json:"type"`
	Host  string `json:"host"`
	Topic string `json:"topic"`
}

type OnvifPipelineConfig

type OnvifPipelineConfig struct {
	ProfileToken string `json:"profile_token"`
}

type PTZRange

type PTZRange struct {
	XRange float64 `json:"XRange"`
	YRange float64 `json:"YRange"`
	ZRange float64 `json:"ZRange"`
}

type PipelineInfo

type PipelineInfo struct {
	// Id is the instance_id assigned by the pipeline server once it is started
	Id string `json:"id,omitempty"`
	// Name is the first part of the pipeline's full name. In the case of 'object_detection/person_vehicle_bike'
	// the name is 'object_detection'
	Name string `json:"name,omitempty"`
	// Version is the second part of the pipeline's full name. In the case of 'object_detection/person_vehicle_bike'
	// the version is 'person_vehicle_bike'
	Version string `json:"version,omitempty"`
}

type PipelineInfoStatus

type PipelineInfoStatus struct {
	Camera string       `json:"camera"`
	Info   PipelineInfo `json:"info"`
	Status interface{}  `json:"status"`
}

type PipelineInformationResponse

type PipelineInformationResponse struct {
	Id            string `json:"id"`
	LaunchCommand string `json:"launch_command"`
	Request       struct {
		AutoSource  string `json:"auto_source"`
		Destination struct {
			Frame struct {
				CacheLength         int    `json:"cache-length"`
				Class               string `json:"class"`
				EncodeQuality       int    `json:"encode-quality"`
				Path                string `json:"path"`
				SyncWithDestination bool   `json:"sync-with-destination"`
				SyncWithSource      bool   `json:"sync-with-source"`
				Type                string `json:"type"`
			} `json:"frame"`
			Metadata struct {
				Host  string `json:"host"`
				Topic string `json:"topic"`
				Type  string `json:"type"`
			} `json:"metadata"`
		} `json:"destination"`
		Parameters struct {
			DetectionDevice string `json:"detection-device"`
		} `json:"parameters"`
		Pipeline struct {
			Name    string `json:"name"`
			Version string `json:"version"`
		} `json:"pipeline"`
		Source struct {
			Element string `json:"element"`
			Type    string `json:"type"`
			Uri     string `json:"uri"`
		} `json:"source"`
	} `json:"request"`
	Type string `json:"type"`
}

type PipelineRequest

type PipelineRequest struct {
	Source      Source      `json:"source"`
	Destination Destination `json:"destination"`
}

type PipelineStatus

type PipelineStatus struct {
	AvgFps             float64 `json:"avg_fps"`
	AvgPipelineLatency float64 `json:"avg_pipeline_latency,omitempty"`
	ElapsedTime        float64 `json:"elapsed_time"`
	Id                 string  `json:"id"`
	StartTime          float64 `json:"start_time"`
	State              string  `json:"state"`
}

type ServiceConfig

type ServiceConfig struct {
	AppCustom CustomConfig
}

ServiceConfig a struct that wraps CustomConfig which holds the values for driver configuration

func (*ServiceConfig) UpdateFromRaw

func (c *ServiceConfig) UpdateFromRaw(rawConfig interface{}) bool

UpdateFromRaw updates the service's full configuration from raw data received from the Service Provider.

type Source

type Source struct {
	URI  string `json:"uri"`
	Type string `json:"type"`
}

type StartPipelineRequest

type StartPipelineRequest struct {
	Onvif           *OnvifPipelineConfig      `json:"onvif,omitempty"`
	USB             *USBStartStreamingRequest `json:"usb,omitempty"`
	PipelineName    string                    `json:"pipeline_name"`
	PipelineVersion string                    `json:"pipeline_version"`
}

type StreamSetup

type StreamSetup struct {
	Stream    string    `json:"Stream"`
	Transport Transport `json:"Transport"`
}

type StreamUriRequest

type StreamUriRequest struct {
	StreamSetup  StreamSetup `json:"StreamSetup"`
	ProfileToken string      `json:"ProfileToken"`
}

type StreamingStatusResponse

type StreamingStatusResponse struct {
	Error              string `json:"Error"`
	InputFps           string `json:"InputFps"`
	InputImageSize     string `json:"InputImageSize"`
	IsStreaming        bool   `json:"IsStreaming"`
	OutputAspect       string `json:"OutputAspect"`
	OutputFps          string `json:"OutputFps"`
	OutputFrames       string `json:"OutputFrames"`
	OutputImageSize    string `json:"OutputImageSize"`
	OutputVideoQuality string `json:"OutputVideoQuality"`
}

type Transport

type Transport struct {
	Protocol string `json:"Protocol"`
}

type USBStartStreamingRequest

type USBStartStreamingRequest struct {
	InputFps           string `json:"InputFps,omitempty"`
	InputImageSize     string `json:"InputImageSize,omitempty"`
	InputPixelFormat   string `json:"InputPixelFormat,omitempty"`
	OutputFrames       string `json:"OutputFrames,omitempty"`
	OutputFps          string `json:"OutputFps,omitempty"`
	OutputImageSize    string `json:"OutputImageSize,omitempty"`
	OutputAspect       string `json:"OutputAspect,omitempty"`
	OutputVideoCodec   string `json:"OutputVideoCodec,omitempty"`
	OutputVideoQuality string `json:"OutputVideoQuality,omitempty"`
}

Jump to

Keyboard shortcuts

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