VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWebSocketTaskElement.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
16 #include <string>
17 
18 #include <libwebsockets.h>
19 
20 namespace makVrv
21 {
28  : public DtImageTaskElement
29  {
30  public:
34 
35  virtual ~DtWebSocketTaskElement();
36 
38  virtual void setFromRecord( const makArchives::DtImageTaskRecord& config );
39 
41  virtual bool configure();
42 
43  DtLocklessQueue<std::string>& queue() {return *myCommandQueue;}
44 
46  virtual const int port() const;
47 
50  virtual const std::string& htmlFileNameToServe() const;
51 
55  virtual void setTxPacketSize( unsigned int size );
56  virtual unsigned int txPacketSize();
57  protected:
60 
62  void handlePreFrame();
63 
65  void handleProcessFrame(DtVideoFrameBuffer* frame);
66 
68  bool generateAndWriteHtml();
69 
71  void buildProtocols();
72  protected:
73  lws_context* myContext;
74  lws_vhost* myVHost;
75  struct lws_protocols myProtocols[3];
77  int myPort;
78  unsigned int myTxPacketSize;
79  std::string myHTMLFileNameToServe;
80  };
81 
88  {
89  public:
91  friend class DtVideoStreamManager;
92 
95 
98 
99  protected:
101  virtual DtImageTaskElement* create( DtDe& de, DtProcessImageTask* owningTask );
102  };
103 }
int myPort
Definition: DtWebSocketTaskElement.h:77
std::string myHTMLFileNameToServe
Definition: DtWebSocketTaskElement.h:79
DtLocklessQueue< std::string > * myCommandQueue
Definition: DtWebSocketTaskElement.h:76
Contains DLL export macros.
voidpf void uLong size
Definition: ioapi.h:39
Record for a sensor definition.
Definition: DtImageTaskRecord.h:20
#define DT_DLL_VRVWEBSOCKET
Definition: vrvWebSocket.h:20
lws_context * myContext
Definition: DtWebSocketTaskElement.h:73
A DtWebSocketTaskElementCreator instance is registered with the image task element factory to create ...
Definition: DtWebSocketTaskElement.h:86
unsigned int myTxPacketSize
Definition: DtWebSocketTaskElement.h:78
DtVideoStreamManager is a singleton class that manages DtVideoStreams in VR-Vantage.
Definition: DtVideoStreamManager.h:35
The DtImageTaskElement is an abstract base class for all image task elements. It defines the common i...
Definition: DtImageTaskElement.h:25
A DtWebSocketTaskElement instance will create a pipeline element that can listen for an web connectio...
Definition: DtWebSocketTaskElement.h:27
DtImageTaskElementCreator is the common base class for all image task element creators.
Definition: DtImageTaskElement.h:95
DtProcessImageTask creates and manages all the process image pipeline elements.
Definition: DtProcessImageTask.h:35
Contains declarations needed to initialize the freeImage library.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
DtLocklessQueue< std::string > & queue()
Definition: DtWebSocketTaskElement.h:43
lws_vhost * myVHost
Definition: DtWebSocketTaskElement.h:74
The image as initially captured from the camera is placed into a DtVideoFrameBuffer. Instances of DtVideoFrameBuffer are placed on a queue for further processing by the process image task elements.
Definition: DtVideoFrameBuffer.h:20

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)