VR-Vantage API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Tutorials
File List
File Members
include
vrvVideoStream
DtMetadataPublisher.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
11
12
#include <
vrvVideoStream/vrvVideoStream.h
>
13
14
#include <
vrvVideoStream/DtMetadataElement.h
>
15
16
#include <
vrvCore/DtUniqueID.h
>
17
18
#include <
vrvUtil/DtUnicode.h
>
19
20
#include <matrix/vlVector.h>
21
22
#include <vector>
23
24
namespace
makArchives
25
{
26
class
DtMetadataPublisherRecord;
27
}
28
29
namespace
makVrv
30
{
31
class
DtObserver;
32
class
DtDe;
33
class
DtVideoStream;
34
class
DtSceneObject;
35
39
class
DT_DLL_VRVVIDEOSTREAM
DtMetadataPublisher
40
{
41
public
:
43
friend
class
DtMetadataPublisherCreator
;
44
46
virtual
~
DtMetadataPublisher
();
47
49
virtual
void
realize(
const
makArchives::DtMetadataPublisherRecord
& metadataConfig );
50
52
virtual
void
setObserverName(
const
DtUnicode
& observerName );
53
56
virtual
bool
isAttached();
57
59
virtual
void
attachEntity(
makVrv::DtUniqueID
entity );
60
63
virtual
void
detach();
64
68
virtual
void
addMetadataElement(
DtMetadataElement
* element );
69
71
virtual
void
tick(
double
dt );
72
73
// Get the total number of bytes currently in the publisher's buffer
74
virtual
int
numBytes();
75
77
virtual
unsigned
char
* getBytes();
78
83
virtual
const
DtVideoStream
& videoStream();
84
91
virtual
const
DtSceneObject
& attachedEntitySceneObject();
92
100
virtual
const
DtObserver
& observer();
101
105
virtual
bool
haveValidTargetPoint()
const
;
106
109
virtual
DtVector targetPoint()
const
;
110
115
virtual
DtDe
& de();
116
117
protected
:
118
120
DtMetadataPublisher
(
DtDe
& de,
const
DtVideoStream
& videoStream );
121
123
virtual
void
slot_attachToChanged(
makVrv::DtObserver
* obs );
124
127
virtual
DtSceneObject
* findSceneObjectFromElement(
const
DtElementID
&
id
);
128
131
virtual
void
updateTargetPoint();
132
133
private
:
134
136
DtMetadataPublisher
();
137
139
DtMetadataPublisher
(
const
DtMetadataPublisher
& orig );
140
142
DtMetadataPublisher
& operator=(
const
DtMetadataPublisher
& rhs );
143
144
protected
:
145
DtDe
&
myDe
;
146
const
DtVideoStream
&
myVideoStream
;
147
std::vector<DtMetadataElement*>
myElements
;
148
DtObserver
*
myObserver
;
149
150
DtSceneObject
*
myAttachedEntitySceneObject
;
151
bool
myIsAttached
;
152
makVrv::DtUniqueID
myAttachedEntity
;
153
154
unsigned
char
*
myBuffer
;
155
int
myBufferLength
;
156
bool
myValidTargetPoint
;
157
DtVector
myTargetPoint
;
158
};
159
160
class
DT_DLL_VRVVIDEOSTREAM
DtMetadataPublisherCreator
161
{
162
public
:
163
DtMetadataPublisherCreator
();
164
virtual
~
DtMetadataPublisherCreator
();
165
166
virtual
DtMetadataPublisher
* create(
DtDe
& de,
const
DtVideoStream
& videoStream ) = 0;
167
};
168
}
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)