Documentation ¶
Overview ¶
Package fake implements a fake camera which always returns the same image with a user specified resolution.
Index ¶
- Variables
- func NewCamera(ctx context.Context, _ resource.Dependencies, conf resource.Config, ...) (camera.Camera, error)
- type Camera
- func (c *Camera) Close(ctx context.Context) error
- func (c *Camera) NextPointCloud(ctx context.Context) (pointcloud.PointCloud, error)
- func (c *Camera) Read(ctx context.Context) (image.Image, func(), error)
- func (c *Camera) SubscribeRTP(ctx context.Context, bufferSize int, packetsCB rtppassthrough.PacketCallback) (rtppassthrough.Subscription, error)
- func (c *Camera) Unsubscribe(ctx context.Context, id rtppassthrough.SubscriptionID) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Model is the model of the fake buildin camera. Model = resource.DefaultModelFamily.WithModel("fake") // ErrRTPPassthroughNotEnabled indicates that rtp_passthrough is not enabled. ErrRTPPassthroughNotEnabled = errors.New("rtp_passthrough not enabled") )
Functions ¶
Types ¶
type Camera ¶
type Camera struct { resource.Named resource.AlwaysRebuild Model *transform.PinholeCameraModel Width int Height int Animated bool RTPPassthrough bool // contains filtered or unexported fields }
Camera is a fake camera that always returns the same image.
func (*Camera) NextPointCloud ¶
func (c *Camera) NextPointCloud(ctx context.Context) (pointcloud.PointCloud, error)
NextPointCloud always returns a pointcloud of a yellow to blue gradient, with the depth determined by the intensity of blue.
func (*Camera) SubscribeRTP ¶ added in v0.27.0
func (c *Camera) SubscribeRTP( ctx context.Context, bufferSize int, packetsCB rtppassthrough.PacketCallback, ) (rtppassthrough.Subscription, error)
SubscribeRTP begins a subscription to receive RTP packets.
func (*Camera) Unsubscribe ¶ added in v0.27.0
func (c *Camera) Unsubscribe(ctx context.Context, id rtppassthrough.SubscriptionID) error
Unsubscribe terminates the subscription.
Click to show internal directories.
Click to hide internal directories.