|
VR-Engage
2.2
|
DtStreamingVideoUpdater manages streaming video capture from specified channels to external formats. It supports toggling streams on and off, selecting video sources, capturing screenshots, and automatically starting streams when channels are created. The component maintains state attributes for UI display and responds to messaging system events for control.
#include <streamingVideoUpdater.h>
Public Member Functions | |
| DtStreamingVideoUpdater () | |
| virtual | ~DtStreamingVideoUpdater () override |
| virtual bool | initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override |
| virtual void | tick (double dt) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
| virtual void | startVideoStream () |
| virtual void | stopVideoStream () |
| virtual void | toggleVideoStream () |
| virtual void | selectVideoSource (const std::string &guiText, const std::string &window, const std::string &channel) |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual bool | postInitialize () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Member Functions | |
| virtual makVre::DtVreMessageResult | handleToggleVideoStream (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleSelectVideoStreamChannel (makVre::DtVreMessage *msg) |
| virtual void | slot_channelAdded (makVrv::DtChannelManager *mgr, makVrv::DtChannel *channel) |
| virtual void | slot_channelToBeRemoved (makVrv::DtChannelManager *mgr, makVrv::DtChannel *channel) |
| virtual bool | channelExists (const std::string &windowName, const std::string &channelName) |
| virtual makVre::DtVreMessageResult | handleScreenCapture (makVre::DtVreMessage *msg) |
| virtual void | updateStreamFilename (makVrv::DtVideoStream *stream) |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
Protected Attributes | |
| std::string | myStreamName |
| std::string | myReadBuffer |
| bool | myAutoStartStream |
| std::string | myStreamOutputFilenameOverride |
| bool | myRetryAutoStart |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
| DtStreamingVideoUpdater::DtStreamingVideoUpdater | ( | ) |
Constructor for DtStreamingVideoUpdater.
Initializes the component with default stream settings
|
overridevirtual |
Virtual destructor for DtStreamingVideoUpdater.
|
overridevirtual |
Initializes the streaming video updater component.
| player | Pointer to the player station this component belongs to |
| config | Configuration table containing streaming settings |
Reads configuration settings including stream name, read buffer type, default source channel, and auto-start options. Sets up message handlers and channel connection signals.
Reimplemented from makVre::DtPlayerComponent.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Called every frame to update the streaming state.
| dt | Delta time since the last frame in seconds |
Attempts auto-start of video streaming if the retry flag is set
Implements makVre::DtPlayerComponent.
|
overridevirtual |
Shuts down the streaming video updater component.
Stops active video streams and removes message handlers and channel signals
Reimplemented from makVre::DtPlayerComponent.
|
overridevirtual |
Returns the type identifier for this component.
Implements makVre::DtPlayerComponent.
|
virtual |
Starts the configured video stream.
Configures and activates the video stream with the current settings, applying any filename overrides if specified
|
virtual |
Stops the active video stream.
Halts the current video stream and updates the stream state attribute
|
virtual |
Toggles the video stream on or off.
Starts the stream if it's stopped or stops it if it's running
|
virtual |
Selects a new video source for streaming.
| guiText | Display name for the source in the UI |
| window | Name of the window containing the source channel |
| channel | Name of the channel to capture |
Updates the video stream to use a different source channel, handling stream restart if necessary and updating state attributes
|
protectedvirtual |
Handles toggle video stream messages.
| msg | Toggle video stream message |
Processes messages to toggle the video stream state
|
protectedvirtual |
Handles video source selection messages.
| msg | Select video source message |
Processes messages to change the video stream source channel
|
protectedvirtual |
Slot called when a channel is added to the system.
| mgr | Pointer to the channel manager |
| channel | Pointer to the newly added channel |
Updates stream state when a new channel is added, enabling auto-start if the channel matches the current stream source
|
protectedvirtual |
Slot called when a channel is about to be removed.
| mgr | Pointer to the channel manager |
| channel | Pointer to the channel being removed |
Stops streaming and updates state when the current source channel is removed
|
protectedvirtual |
Checks if a specified channel exists.
| windowName | Name of the window |
| channelName | Name of the channel |
Verifies whether a specified window and channel combination exists in the system
|
protectedvirtual |
Handles screen capture messages.
| msg | Screen capture message |
Processes messages to capture a screenshot of the current video source
|
protectedvirtual |
Updates the output filename for a video stream.
| stream | Pointer to the video stream to update |
Modifies the stream's output filename based on the override setting, supporting timestamp substitution with [t] in the filename
|
protected |
Name of the video stream configuration to use.
|
protected |
Buffer type to read for streaming (back, front, back_hardware, front_hardware)
Determines whether to include graphical overlays in the stream
|
protected |
Flag indicating whether to automatically start streaming when the channel appears.
|
protected |
Optional override for the stream output filename.
If not empty, replaces the filename in the stream configuration
|
protected |
Flag indicating to retry auto-starting the stream on the next tick.