pleora: add support for sending/receiving KLV metadata as chunk data

This attemps to partially implement MISB ST1608.1, "Transport of Motion
Imagery and Metadata over GigE Vision". This relies on GstKLVMeta, which
is currently a merge request 124 for gst-plugins-base. For now we
include it here. Currently all KLVMeta is packed into one chunk, no
special handling of timestamps is done. Testing has only been done
between pleorasink and pleorasrc, no other MISB-compliant stream.
This commit is contained in:
Joshua M. Doe
2019-11-21 11:47:42 -05:00
parent f6509a1b4d
commit a92281c965
9 changed files with 674 additions and 10 deletions

View File

@@ -41,6 +41,18 @@ public:
void GetHeightInfo (uint32_t & aMin, uint32_t & aMax, uint32_t & aInc) const;
PvResult GetSupportedPixelType (int aIndex, PvPixelType & aPixelType) const;
PvResult GetSupportedChunk (int aIndex, uint32_t &aID, PvString &aName) const;
bool GetChunkEnable (uint32_t aChunkID) const;
PvResult SetChunkEnable (uint32_t aChunkID, bool aEnabled);
bool GetChunkModeActive() const { return mChunkModeActive; }
PvResult SetChunkModeActive( bool aEnabled ) { mChunkModeActive = aEnabled; return PvResult::Code::OK; }
uint32_t GetChunksSize() const { return GetRequiredChunkSize(); }
uint32_t GetRequiredChunkSize () const;
void SetKlvEnabled (gboolean enable = TRUE);
gboolean GetKlvEnabled ();
GByteArray * GetKlvByteArray (GstBuffer * buf);
private:
GstPleoraSink * mSink;
PvBuffer *mAcquisitionBuffer;
@@ -50,4 +62,9 @@ private:
gint mWidth;
gint mHeight;
PvPixelType mPixelType;
bool mChunkModeActive;
bool mChunkKlvEnabled;
gint mKlvChunkSize;
};