This class wraps RawVideoSource and RawLiveSource, handling buffering video, synchronizing with the given PlaybackController and ensuring a uniform return of frames whether live or playback.
More...
|
void | Close (bool wait=false) |
| Close the initialized class. The background thread is flagged to stop, and if the wait parameter is true the method will wait for it to finish, max wait time is 5 seconds.
|
|
void | Init () |
| Initializes the class and starts a background thread.
|
|
void | LiveStart () |
| Start live stream.
|
|
void | LiveStop () |
| Stop live stream.
|
|
void | PlaybackStart () |
| Start playback mode.
|
|
delegate void | RawLiveStatusEventHandler (object sender, EventArgs eventArgs) |
| Event handler for passing changes in live status.
|
|
| RawSource () |
| Constructor.
|
|
delegate void | RawVideoErrorHandler (string error) |
| Event handler for any errors during gathering of frames.
|
|
delegate void | RawVideoSampleEventHandler (DateTime timeStamp, byte[] content, string privacyMask) |
| Event handler for passing frames.
|
|
|
bool | IsInitialized [get] |
| Returns true when Init has been called, and false after Close(bool) has been called.
|
|
Item | Item [get, set] |
| The camera that is streaming or has recorded the video in question.
|
|
FQID | PlaybackFQID [get, set] |
| FQID for the Playback Controller.
|
|
bool | Selected [get, set] |
| Bool determining whether the source has been selected.
|
|
Guid | StreamId [get, set] |
| The id of the stream to be used for the live stream.
|
|
This class wraps RawVideoSource and RawLiveSource, handling buffering video, synchronizing with the given PlaybackController and ensuring a uniform return of frames whether live or playback.
◆ RawSource()
VideoOS.Platform.Client.RawSource.RawSource |
( |
| ) |
|
|
inline |
◆ Close()
void VideoOS.Platform.Client.RawSource.Close |
( |
bool | wait = false | ) |
|
|
inline |
Close the initialized class. The background thread is flagged to stop, and if the wait parameter is true the method will wait for it to finish, max wait time is 5 seconds.
- Parameters
-
wait | If true, the method will wait up to five seconds for the internal threads to finish. |
◆ Init()
void VideoOS.Platform.Client.RawSource.Init |
( |
| ) |
|
|
inline |
Initializes the class and starts a background thread.
This method should only be called once, until Close(bool) has been called.
◆ LiveStart()
void VideoOS.Platform.Client.RawSource.LiveStart |
( |
| ) |
|
|
inline |
◆ LiveStop()
void VideoOS.Platform.Client.RawSource.LiveStop |
( |
| ) |
|
|
inline |
◆ PlaybackStart()
void VideoOS.Platform.Client.RawSource.PlaybackStart |
( |
| ) |
|
|
inline |
◆ RawLiveStatusEventHandler()
delegate void VideoOS.Platform.Client.RawSource.RawLiveStatusEventHandler |
( |
object | sender, |
|
|
EventArgs | eventArgs ) |
Event handler for passing changes in live status.
- Parameters
-
sender | The sender of the event. Can be null |
eventArgs | The containing status. |
◆ RawVideoErrorHandler()
delegate void VideoOS.Platform.Client.RawSource.RawVideoErrorHandler |
( |
string | error | ) |
|
Event handler for any errors during gathering of frames.
- Parameters
-
◆ RawVideoSampleEventHandler()
delegate void VideoOS.Platform.Client.RawSource.RawVideoSampleEventHandler |
( |
DateTime | timeStamp, |
|
|
byte[] | content, |
|
|
string | privacyMask ) |
Event handler for passing frames.
- Parameters
-
timeStamp | Timestamp of the frame |
content | The frame |
privacyMask | Privacy mask information. If no mask on current frame it will be null. It is the consumer of this event who is responsible for how to handle privacy mask. |
◆ LiveStatusEvent
Event for passing changes in live status.
◆ IsInitialized
bool VideoOS.Platform.Client.RawSource.IsInitialized |
|
get |
Returns true when Init has been called, and false after Close(bool) has been called.
◆ Item
Item VideoOS.Platform.Client.RawSource.Item |
|
getset |
The camera that is streaming or has recorded the video in question.
◆ PlaybackFQID
FQID VideoOS.Platform.Client.RawSource.PlaybackFQID |
|
getset |
FQID for the Playback Controller.
◆ Selected
bool VideoOS.Platform.Client.RawSource.Selected |
|
getset |
Bool determining whether the source has been selected.
◆ StreamId
Guid VideoOS.Platform.Client.RawSource.StreamId |
|
getset |
The id of the stream to be used for the live stream.
Default value is Guid.Empty and will provide the default live stream.
When changing the StreamId while a live stream is being shown, call LiveStart to utilize the new StreamId.
◆ ErrorOccuredEvent
Event for passing error messages through.
◆ NewRawVideoSampleEvent
Subscribe to this event to receive each time a frame is available.