![]() |
Media Controller
A GStreamer implementation using the VideoXpert SDK
|
The base class for the different stream types. More...
#include <StreamBase.h>
Public Member Functions | |
virtual | ~StreamBase () |
Virtual destructor. More... | |
bool | Play (float speed=0, unsigned int unixTime=0) override |
Call Play on the stream. More... | |
void | Pause () override |
Call Pause on the stream. More... | |
void | Stop () override |
Call TearDown on the stream. More... | |
void | NewRequest (MediaRequest &request) override |
Set the stream to a new source. More... | |
virtual bool | Resume (float speed=0, unsigned int unixTime=0) |
Send PLAY on an existing stream. More... | |
GstWrapper * | GetGstreamer () const |
Get the current GStreamer wrapper instance. More... | |
unsigned int | GetLastTimestamp () const |
Gets the current time of the stream. More... | |
Mode | GetMode () override |
Get the current playback mode. More... | |
![]() | |
virtual | ~IStream () |
Virtual destructor. More... | |
virtual void | PlayStream (float speed, unsigned int unixTime)=0 |
virtual bool | GoToLive ()=0 |
Set the stream to Live and call Play. More... | |
Public Attributes | |
StreamState * | state |
The current state of the stream. More... | |
VxSdk::VxStreamProtocol::Value | protocol |
The protocol of the stream. More... | |
Protected Member Functions | |
StreamBase (MediaRequest &request) | |
Constructor. More... | |
Protected Attributes | |
MediaRequest | _mediaRequest |
GstWrapper * | _gst |
Private Member Functions | |
StreamBase () | |
Default constructor. More... | |
Additional Inherited Members | |
![]() | |
enum | Mode { kStopped, kLive, kPlayback } |
Values that represent the different playback modes. More... | |
The base class for the different stream types.
Definition at line 14 of file StreamBase.h.
Inherits MediaController::IStream.
Inherited by MediaController::MjpegPull::Stream, and MediaController::Rtsp::Stream.
|
virtual |
|
protected |
|
private |
GstWrapper * StreamBase::GetGstreamer | ( | ) | const |
Get the current GStreamer wrapper instance.
Definition at line 32 of file StreamBase.cpp.
unsigned int StreamBase::GetLastTimestamp | ( | ) | const |
Gets the current time of the stream.
Definition at line 36 of file StreamBase.cpp.
|
overridevirtual |
Get the current playback mode.
Implements MediaController::IStream.
Definition at line 40 of file StreamBase.cpp.
|
overridevirtual |
Set the stream to a new source.
request | The new MediaRequest to reset the stream to. |
Implements MediaController::IStream.
Definition at line 28 of file StreamBase.cpp.
|
overridevirtual |
Call Pause on the stream.
Implements MediaController::IStream.
Definition at line 24 of file StreamBase.cpp.
|
overridevirtual |
Call Play on the stream.
speed | The playback speed. Negative values can be used for reverse playback. A value of 0 will resume a paused stream. |
unixTime | The start time for playback. A value of 0 will start a live stream. |
Implements MediaController::IStream.
Definition at line 22 of file StreamBase.cpp.
|
virtual |
Send PLAY on an existing stream.
speed | The playback speed. Negative values can be used for reverse playback. A value of 0 will resume a paused stream. |
unixTime | The start time for playback. A value of 0 will start a live stream. |
Reimplemented in MediaController::Rtsp::Stream, and MediaController::MjpegPull::Stream.
Definition at line 30 of file StreamBase.cpp.
|
overridevirtual |
Call TearDown on the stream.
Implements MediaController::IStream.
Definition at line 26 of file StreamBase.cpp.
|
protected |
Definition at line 73 of file StreamBase.h.
|
protected |
Definition at line 72 of file StreamBase.h.
VxSdk::VxStreamProtocol::Value MediaController::StreamBase::protocol |
The protocol of the stream.
Definition at line 56 of file StreamBase.h.
StreamState* MediaController::StreamBase::state |
The current state of the stream.
Definition at line 49 of file StreamBase.h.