nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | List of all members
nxcip::VideoDataPacket Class Referenceabstract

Video packet. MUST contain complete frame (or field in case of interlaced video) More...

`#include <camera_plugin.h>`

Inheritance diagram for nxcip::VideoDataPacket:

## Public Member Functions
virtual Picture * | getMotionData () const =0
| Returns motion data. Can be NULL, if no motion. More...
Public Member Functions inherited from nxcip::MediaDataPacket
virtual UsecUTCTimestamp | timestamp () const =0
| Packet's timestamp (usec (microseconds) since 1970-01-01, UTC)
virtual DataPacketType | type () const =0
| Packet type.
virtual const void * | data () const =0
| Coded media stream data. More...
virtual unsigned int | dataSize () const =0
| Returns size (in bytes) of packet's data. More...
virtual unsigned int | channelNumber () const =0
virtual CompressionType | codecType () const =0
virtual unsigned int | flags () const =0
| Returns combination of values from MediaDataPacket::Flags enumeration.
virtual unsigned int | cSeq () const =0
| Returns sequence number of command this packet belongs to. More...
Public Member Functions inherited from nxpl::PluginInterface
virtual void * | queryInterface (const nxpl::NX_GUID &interfaceID)=0
| Cast to type, specified by interfaceID. More...
virtual int | addRef () const =0
| Increment reference counter. More...
virtual int | releaseRef () const =0
| Decrement reference counter. More...

## Additional Inherited Members
Public Types inherited from nxcip::MediaDataPacket
enum | Flags { fKeyPacket = 0x01, fReverseStream = 0x02, fReverseBlockStart = 0x04, DEPRECATED_fLowQuality = 0x08, fStreamReset = 0x10 }

## Detailed Description

Video packet. MUST contain complete frame (or field in case of interlaced video)

## Member Function Documentation

## ◆ getMotionData()

virtual Picture* nxcip::VideoDataPacket::getMotionData | ( |  | ) | const
| pure virtual

Returns motion data. Can be NULL, if no motion.

Motion data is a monochrome (format nxcip::AV_PIX_FMT_MONOBLACK) picture of size (nxcip::DEFAULT_MOTION_DATA_PICTURE_WIDTH, nxcip::DEFAULT_MOTION_DATA_PICTURE_HEIGHT) pixels, '1' bit designates motion presence in that pixel. It is not required that motion data dimensions same as those of video picture. Motion data just designates regions of video picture where motion has been detected.

Warning
  motion data MUST be rotated by 90 degrees clock-wise! That means, picture returned here is nxcip::DEFAULT_MOTION_DATA_PICTURE_HEIGHT pixels wide and nxcip::DEFAULT_MOTION_DATA_PICTURE_WIDTH pixels height

Returns
  motion data

Note
  size (DEFAULT_MOTION_DATA_PICTURE_WIDTH, DEFAULT_MOTION_DATA_PICTURE_HEIGHT) pixels is required! If picture has greater size, only required region will be used. If picture has less size, considering that missing region contains no motion

Implemented in ILPEmptyPacket, ILPVideoPacket, and rpi_cam::VideoPacket.

The documentation for this class was generated from the following file:

- src/camera/camera_plugin.h