VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMetadataElement.h
Go to the documentation of this file.
1 // /******************************************************************************
2 // ** Copyright (c) 2012 VT-MAK Technologies, Inc.
3 // ** All rights reserved.
4 // ******************************************************************************/
5 
9 
10 #pragma once
12 
13 #include <vector>
14 
15 namespace makVrv
16 {
17  class DtMetadataPublisher;
18 
23  {
24  public:
27 
29  virtual ~DtMetadataElement();
30 
32  virtual void setPublisher( DtMetadataPublisher* publisher );
33 
35  virtual unsigned int encodedLength() = 0;
36 
38  virtual unsigned char* encode( unsigned char* buffer ) = 0;
39 
42  virtual void decode( unsigned char* buffer, unsigned int length ) = 0;
43 
45  virtual bool timeForUpdate();
46 
48  virtual void tick(double dt);
49 
52  virtual void setFrequency( float timeInSeconds );
53 
55  virtual void addChild( DtMetadataElement* element );
56 
58  virtual DtKlvKey& key();
59 
62  virtual bool isMetadataSynchronous() const;
63 
66  virtual void setIsMetadataSynchronous(bool isMetadataSynchronous);
67 
68 
69  protected:
72  virtual void update() = 0;
73 
76  virtual unsigned int encodedLengthChildren();
77 
78  protected:
80  std::vector<DtMetadataElement*> myChildren;
82 
83  double myLastUpdate;
84  double myNextUpdate;
85  bool myIsDirty;
87 
88  float myFrequency;
90 
93  };
94 }
A DtKlvKey instance represents a KLV (Key-Length-Value) Key field.
Definition: DtKlvKey.h:20
float myFrequency
Definition: DtMetadataElement.h:88
double myNextUpdate
Definition: DtMetadataElement.h:84
bool myTimeToUpdate
Definition: DtMetadataElement.h:89
DtMetadataPublisher defines the interface for all metadata publishers, as well as the implementation ...
Definition: DtMetadataPublisher.h:36
#define DT_DLL_VRVVIDEOSTREAM
Definition: vrvVideoStream.h:20
DtKlvKey myKey
Definition: DtMetadataElement.h:86
DtMetadataElement * myParent
Definition: DtMetadataElement.h:79
bool myIsMetadataSynchronous
Is the metadata send synchronisly or async.
Definition: DtMetadataElement.h:92
bool myIsDirty
Definition: DtMetadataElement.h:85
double myLastUpdate
Definition: DtMetadataElement.h:83
DtMetadataElement is an abstract class that defines the interface common to all metadata elements...
Definition: DtMetadataElement.h:22
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer.
std::vector< DtMetadataElement * > myChildren
Definition: DtMetadataElement.h:80
DtMetadataPublisher * myPublisher
Definition: DtMetadataElement.h:81
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
Contains the DtKlvKey class declaration.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)