![]() |
C++ Samples
Demonstrates how to create a C++ application using the VideoXpert SDK
|
This plugin sample streams the video in live More...
#include <DataSourceLiveStreaming.h>
Public Member Functions | |
| DataSourceLiveStreaming (const std::string description, bool isPlayBack) | |
| ~DataSourceLiveStreaming () | |
| CppSamples::Common::Plugin * | Run (CppSamples::Common::DataModel *dataModel) override |
| Streams a video in live. More... | |
Public Member Functions inherited from CppSamples::Common::Plugin | |
| Plugin (const std::string description) | |
| virtual | ~Plugin () |
| std::string | GetDescription () const |
| Gets the description of this plugin. More... | |
| Plugin * | GetParent () const |
| Gets the reference to the parent of this plugin. More... | |
| void | SetParent (Plugin *parent) |
| Sets the reference to the parent of this plugin. More... | |
Protected Member Functions | |
| void | DoLiveStreaming (VxSdk::VxCollection< VxSdk::IVxDataSource ** > dataSources) |
| Streams a video in live. More... | |
| bool | StartStreamingForDataSource (VxSdk::IVxDataSource *dataSource, VxSdk::IVxDataInterface *dataInterface, time_t seekTime) |
| Initiate streaming for selected datasource. This method checks the parameter isMjpegEnabled to determine whether streaming is RTSP or MJPEG Also, it will automatically invoke playback method, if seekTime is given a value; otherwise live streaming will be invoked More... | |
Static Protected Member Functions | |
| static void | DisplayPlayerOptionsToConsole (bool isPtzEnabled, bool isLive, bool isRecording) |
| Display the options that can be entered by user when a stream is playing More... | |
| static MediaController::IController * | GetController (VxSdk::IVxDataSource *dataSource, VxSdk::IVxDataInterface *dataInterface) |
| Get an instance of IController for the given data source and data interface. More... | |
| static VxSdk::VxCollection< VxSdk::IVxDataSource ** > | GetDataSources (VxSdk::IVxSystem *vxSystem) |
| Get a collection of data source from the given VideoExpert system. More... | |
| static void | ShowDataSourceDetails (VxSdk::IVxDataSource *dataSource) |
| Print the details of the given data source to the screen. More... | |
| static void | TimestampCallback (MediaController::TimestampEvent *timeEvent) |
| Callback fired from MediaController class for updating the timestamp of currently playing stream More... | |
Private Attributes | |
| bool | _isPlayBack |
This plugin sample streams the video in live
Definition at line 16 of file DataSourceLiveStreaming.h.
Inherits CppSamples::Common::Plugin.
|
inline |
Definition at line 21 of file DataSourceLiveStreaming.h.
|
inline |
Definition at line 22 of file DataSourceLiveStreaming.h.
|
staticprotected |
Display the options that can be entered by user when a stream is playing
| isPtzEnabled | True indicates PTZ options to be displayed else player controls only |
| isLive | True indicates to show live options only else include playback options also |
| isRecording | True indicates the camera is in recording state |
Definition at line 53 of file DataSourceLiveStreaming.cpp.
|
protected |
Streams a video in live.
| dataSources | collection of data source. |
Definition at line 81 of file DataSourceLiveStreaming.cpp.
|
staticprotected |
Get an instance of IController for the given data source and data interface.
| dataSource | Instance of VxSdk::IVxDataSource. |
| dataInterface | Instance of VxSdk::IVxDataInterface. |
Definition at line 151 of file DataSourceLiveStreaming.cpp.
|
staticprotected |
Get a collection of data source from the given VideoExpert system.
| vxSystem | Pointer to the VideoExpert system. |
Definition at line 165 of file DataSourceLiveStreaming.cpp.
|
overridevirtual |
Streams a video in live.
| dataModel | Instance of data model. |
Implements CppSamples::Common::Plugin.
Definition at line 27 of file DataSourceLiveStreaming.cpp.
|
staticprotected |
Print the details of the given data source to the screen.
| dataSource | The data source to be printed. |
Definition at line 182 of file DataSourceLiveStreaming.cpp.
|
protected |
Initiate streaming for selected datasource. This method checks the parameter isMjpegEnabled to determine whether streaming is RTSP or MJPEG Also, it will automatically invoke playback method, if seekTime is given a value; otherwise live streaming will be invoked
| dataSource | Selected datasource |
| dataInterface | Selected dataInterface |
| seekTime | nullptr for live; otherwise pass time in "yyyymmddThhmmssZ-" format |
Definition at line 218 of file DataSourceLiveStreaming.cpp.
|
staticprotected |
Callback fired from MediaController class for updating the timestamp of currently playing stream
| timeEvent | Contains time info |
Definition at line 311 of file DataSourceLiveStreaming.cpp.
|
private |
Definition at line 18 of file DataSourceLiveStreaming.h.