![]() |
C++/CLI Sample
Demonstrates how to create a C++/CLI library using the VideoXpert SDK
|
The MediaControl class creates a controller object that provides the ability to create and control video streams. More...
#include <MediaControl.h>
Public Types | |
| enum | Modes { Modes::Stopped, Modes::Live, Modes::Playback } |
| Values that represent the different playback modes. More... | |
Public Member Functions | |
| delegate void | TimestampCallbackDelegate (MediaController::TimestampEvent *timeEvent) |
| The native event callback delegate. More... | |
| delegate void | TimestampEventDelegate (MediaEvent^ mediaEvent) |
| The managed event delegate. More... | |
| MediaControl (DataSource^ videoSource, DataInterface^ videoInterface, DataSource^ audioSource, DataInterface^ audioInterface) | |
| Constructor. More... | |
| virtual | ~MediaControl () |
| Virtual destructor. More... | |
| !MediaControl () | |
| Finaliser. More... | |
| void | GoToLive () |
| Call GoToLive on the stream. More... | |
| void | Pause () |
| Call Pause on the stream. More... | |
| bool | Play (float speed) |
| Call Play on the stream. More... | |
| bool | Seek (System::DateTime time, float speed) |
| Call Play on the stream with the supplied start time, resulting in a playback stream. More... | |
| void | SetDataSource (DataSource^ videoDataSource, DataInterface^ videoDataInterface, DataSource^ audioDataSource, DataInterface^ audioDataInterface) |
| Set the stream to a new data source. More... | |
| void | SetVideoWindow (System::IntPtr windowHandle) |
| Set the display window using the given window handle. More... | |
| void | Stop () |
| Call TearDown on the stream. More... | |
Package Functions | |
| void | _FireTimestampEvent (MediaController::TimestampEvent *timeEvent) |
Package Attributes | |
| MediaController::IController * | _control |
| TimestampCallbackDelegate^ | _timestampCallback |
| TimestampEventDelegate^ | _timestampEvent |
| DataSource^ | _currentdataSource |
Properties | |
| DataSource^ | CurrentDataSource [get] |
| Gets the current data source. More... | |
| bool | IsPipelineActive [get] |
| Get the status of the pipeline. More... | |
| Modes | Mode [get] |
| Gets the current playback mode. More... | |
Events | |
| TimestampEventDelegate^ | TimestampEvent [add, remove] |
| TimestampEvent is raised whenever a new timestamp is received from the stream. More... | |
The MediaControl class creates a controller object that provides the ability to create and control video streams.
Definition at line 15 of file MediaControl.h.
|
strong |
Values that represent the different playback modes.
| Enumerator | |
|---|---|
| Stopped |
The stream is stopped. |
| Live |
The stream is playing live video. |
| Playback |
The stream is playing recorded video. |
Definition at line 21 of file MediaControl.h.
| CPPCli::MediaControl::MediaControl | ( | DataSource^ | videoSource, |
| DataInterface^ | videoInterface, | ||
| DataSource^ | audioSource, | ||
| DataInterface^ | audioInterface | ||
| ) |
Constructor.
| videoSource | The data source to use to create the video stream. |
| videoInterface | The data interface to use to create the video stream. |
| audioSource | The data source to use to create the audio stream. |
| audioInterface | The data interface to use to create the audio stream. |
Definition at line 9 of file MediaControl.cpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 58 of file MediaControl.h.
| CPPCli::MediaControl::!MediaControl | ( | ) |
|
package |
Definition at line 99 of file MediaControl.cpp.
| void CPPCli::MediaControl::GoToLive | ( | ) |
Call GoToLive on the stream.
Definition at line 41 of file MediaControl.cpp.
| void CPPCli::MediaControl::Pause | ( | ) |
| bool CPPCli::MediaControl::Play | ( | float | speed | ) |
Call Play on the stream.
| speed | The playback speed. Negative values can be used for reverse playback. |
Definition at line 49 of file MediaControl.cpp.
| bool CPPCli::MediaControl::Seek | ( | System::DateTime | time, |
| float | speed | ||
| ) |
Call Play on the stream with the supplied start time, resulting in a playback stream.
| time | The start time for playback. |
| speed | The playback speed. Negative values can be used for reverse playback. |
Definition at line 53 of file MediaControl.cpp.
| void CPPCli::MediaControl::SetDataSource | ( | DataSource^ | videoDataSource, |
| DataInterface^ | videoDataInterface, | ||
| DataSource^ | audioDataSource, | ||
| DataInterface^ | audioDataInterface | ||
| ) |
Set the stream to a new data source.
| videoDataSource | The data source to use to create the video stream. |
| videoDataInterface | The data interface to use to create the video stream. |
| audioDataSource | The data source to use to create the audio stream. |
| audioDataInterface | The data interface to use to create the audio stream. |
Definition at line 61 of file MediaControl.cpp.
| void CPPCli::MediaControl::SetVideoWindow | ( | System::IntPtr | windowHandle | ) |
Set the display window using the given window handle.
| windowHandle | An IntPtr to the window handle. |
Definition at line 79 of file MediaControl.cpp.
| void CPPCli::MediaControl::Stop | ( | ) |
| delegate void CPPCli::MediaControl::TimestampCallbackDelegate | ( | MediaController::TimestampEvent * | timeEvent | ) |
The native event callback delegate.
| timeEvent | The time event sent from the stream. |
| delegate void CPPCli::MediaControl::TimestampEventDelegate | ( | MediaEvent^ | mediaEvent | ) |
The managed event delegate.
| mediaEvent | The media event sent from the stream as a managed type. |
|
package |
Definition at line 143 of file MediaControl.h.
|
package |
Definition at line 147 of file MediaControl.h.
|
package |
Definition at line 145 of file MediaControl.h.
|
package |
Definition at line 146 of file MediaControl.h.
|
get |
Gets the current data source.
The current data source.
Definition at line 114 of file MediaControl.h.
|
get |
Get the status of the pipeline.
Definition at line 122 of file MediaControl.h.
|
get |
Gets the current playback mode.
The current stream mode.
Definition at line 130 of file MediaControl.h.
|
addremove |
TimestampEvent is raised whenever a new timestamp is received from the stream.
Definition at line 137 of file MediaControl.h.