nx_server_plugin_sdk 1.0 Server Plugin SDK

ilp_video_packet.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <camera/camera_plugin.h>
6 #include <plugins/plugin_tools.h>
7
8 class ILPVideoPacket
9 :
10 public nxcip::VideoDataPacket
11 {
12 public:
13 ILPVideoPacket(
14 int channelNumber,
15 nxcip::UsecUTCTimestamp _timestamp,
16 unsigned int flags,
17 unsigned int cSeq );
18 virtual ~ILPVideoPacket();
19
21 virtual void* queryInterface( const nxpl::NX_GUID& interfaceID ) override;
23 virtual int addRef() const override;
25 virtual int releaseRef() const override;
26
28 virtual nxcip::UsecUTCTimestamp timestamp() const override;
30 virtual nxcip::DataPacketType type() const override;
32 virtual const void* data() const override;
34 virtual unsigned int dataSize() const override;
36 virtual unsigned int channelNumber() const override;
38 virtual nxcip::CompressionType codecType() const override;
40 virtual unsigned int flags() const override;
42 virtual unsigned int cSeq() const override;
43
45 virtual nxcip::Picture* getMotionData() const override;
46
50 void resizeBuffer( size_t bufSize );
51 void* data();
52
54 void setMotionData( nxcip::Picture* motionData );
55
56 private:
57 nxpt::CommonRefManager m_refManager;
58 const int m_channelNumber;
59 nxcip::UsecUTCTimestamp m_timestamp;
60 void* m_buffer;
61 size_t m_bufSize;
62 unsigned int m_flags;
63 nxcip::Picture* m_motionData;
64 unsigned int m_cSeq;
65 };
ILPVideoPacket::codecType
virtual nxcip::CompressionType codecType() const override
Implementation of nxpl::MediaDataPacket::codecType.
Definition: ilp_video_packet.cpp:108
nxcip::DataPacketType
DataPacketType
Type of packets provided by StreamReader.
Definition: camera_plugin.h:1010
ILPVideoPacket::channelNumber
virtual unsigned int channelNumber() const override
Implementation of nxpl::MediaDataPacket::channelNumber.
Definition: ilp_video_packet.cpp:102
ILPVideoPacket::addRef
virtual int addRef() const override
Implementation of nxpl::PluginInterface::addRef.
Definition: ilp_video_packet.cpp:66
ILPVideoPacket::flags
virtual unsigned int flags() const override
Implementation of nxpl::MediaDataPacket::flags.
Definition: ilp_video_packet.cpp:113
ILPVideoPacket::releaseRef
virtual int releaseRef() const override
Implementation of nxpl::PluginInterface::releaseRef.
Definition: ilp_video_packet.cpp:72
ILPVideoPacket::resizeBuffer
void resizeBuffer(size_t bufSize)
Definition: ilp_video_packet.cpp:131
nxpl::NX_GUID
GUID of plugin interface.
Definition: plugin_api.h:26
ILPVideoPacket::getMotionData
virtual nxcip::Picture * getMotionData() const override
Implementation of nxpl::VideoDataPacket::getMotionData.
Definition: ilp_video_packet.cpp:124
nxcip::Picture
Picture.
Definition: camera_plugin.h:654
ILPVideoPacket
Definition: ilp_video_packet.h:8
nxpt::CommonRefManager
Definition: plugin_tools.h:67
ILPVideoPacket::cSeq
virtual unsigned int cSeq() const override
Implementation of nxpl::MediaDataPacket::cSeq.
Definition: ilp_video_packet.cpp:118
ILPVideoPacket::dataSize
virtual unsigned int dataSize() const override
Implementation of nxpl::MediaDataPacket::dataSize.
Definition: ilp_video_packet.cpp:96
ILPVideoPacket::setMotionData
void setMotionData(nxcip::Picture *motionData)
Adds reference to motionData.
Definition: ilp_video_packet.cpp:162
plugin_tools.h
ILPVideoPacket::type
virtual nxcip::DataPacketType type() const override
Implementation of nxpl::MediaDataPacket::type.
Definition: ilp_video_packet.cpp:84
ILPVideoPacket::queryInterface
virtual void * queryInterface(const nxpl::NX_GUID &interfaceID) override
Implementation of nxpl::PluginInterface::queryInterface.
Definition: ilp_video_packet.cpp:45
nxcip::VideoDataPacket
Video packet. MUST contain complete frame (or field in case of interlaced video)
Definition: camera_plugin.h:1139
ILPVideoPacket::data
virtual const void * data() const override
Implementation of nxpl::MediaDataPacket::data.
Definition: ilp_video_packet.cpp:90
ILPVideoPacket::timestamp
virtual nxcip::UsecUTCTimestamp timestamp() const override
Implementation of nxpl::MediaDataPacket::isKeyFrame.
Definition: ilp_video_packet.cpp:78