![]() |
Media Controller
A GStreamer implementation using the VideoXpert SDK
|
Manages the GStreamer instance. More...
#include <GstWrapper.h>
Public Member Functions | |
GstWrapper () | |
Constructor. More... | |
~GstWrapper () | |
Destructor. More... | |
void | SetWindowHandle (guintptr winhandle) |
Set the display window using the given window handle. More... | |
void | SetLocation (std::string location) |
Set the stream location. More... | |
void | SetPorts (int rtpPort, int rtcpPort) |
Set the receiver ports. More... | |
void | SetCaps (std::string caps, bool isMjpeg=false) |
Set the stream capabilities. More... | |
void | SetCookie (std::string cookie) |
Set the cookie for MJPEG streams. More... | |
void | SetRtcpHostIP (std::string hostIp) |
Set the RTCP host IP. More... | |
void | SetMulticastAddress (std::string multicastAddress) |
Set the multicast group address. More... | |
void | SetTimestamp (unsigned int seekTime) |
Set the internal timestamp variable. More... | |
unsigned int | GetLastTimestamp () const |
Get the last timestamp received from the stream. More... | |
void | SetMode (Controller::Mode mode) |
Set the playback mode. More... | |
Controller::Mode | GetMode () const |
Get the current playback mode. More... | |
float | GetSpeed () const |
Get the current playback speed. More... | |
bool | IsPipelineActive () const |
Get the status of the pipeline. More... | |
void | AddObserver (TimestampEventCallback observer) |
Add a new subscriber to timestamp events. More... | |
void | RemoveObserver (TimestampEventCallback observer) |
Remove an existing timestamp event subscriber. More... | |
void | ClearObservers () |
Remove all existing timestamp event subscribers. More... | |
void | AddEventData (void *customData) |
Add custom data to be stored in here, which will be send back to caller inside TimestampEvent on TimestampEventCallback. More... | |
void | CreateVideoRtspPipeline (std::string encoding) |
Create the pipeline for an RTSP video stream. More... | |
void | CreateAudioRtspPipeline () |
Create the pipeline for an RTSP audio stream. More... | |
void | CreateMjpegPipeline () |
Create the pipeline for an MJPEG stream. More... | |
void | Play (float speed=1.0f) |
Set the pipeline state to playing and update the speed value for determining the framerate. More... | |
void | Pause () const |
Set the pipeline state to paused. More... | |
void | ClearPipeline () |
Clear the pipeline and display window. More... | |
Private Member Functions | |
void | CreatePipeline () |
void | LinkBinElements () |
Static Private Member Functions | |
static void | Init () |
Private Attributes | |
GstVars | _gstVars |
Manages the GStreamer instance.
Definition at line 13 of file GstWrapper.h.
GstWrapper::GstWrapper | ( | ) |
Constructor.
Definition at line 257 of file GstWrapper.cpp.
GstWrapper::~GstWrapper | ( | ) |
void GstWrapper::AddEventData | ( | void * | customData | ) |
Add custom data to be stored in here, which will be send back to caller inside TimestampEvent on TimestampEventCallback.
customData | Custom data pointer. |
Definition at line 340 of file GstWrapper.cpp.
void GstWrapper::AddObserver | ( | TimestampEventCallback | observer | ) |
Add a new subscriber to timestamp events.
observer | The TimestampEventCallback event handler. |
Definition at line 328 of file GstWrapper.cpp.
void GstWrapper::ClearObservers | ( | ) |
Remove all existing timestamp event subscribers.
Definition at line 336 of file GstWrapper.cpp.
void GstWrapper::ClearPipeline | ( | ) |
Clear the pipeline and display window.
Definition at line 544 of file GstWrapper.cpp.
void GstWrapper::CreateAudioRtspPipeline | ( | ) |
Create the pipeline for an RTSP audio stream.
Definition at line 458 of file GstWrapper.cpp.
void GstWrapper::CreateMjpegPipeline | ( | ) |
Create the pipeline for an MJPEG stream.
Definition at line 485 of file GstWrapper.cpp.
|
private |
Definition at line 344 of file GstWrapper.cpp.
void GstWrapper::CreateVideoRtspPipeline | ( | std::string | encoding | ) |
Create the pipeline for an RTSP video stream.
encoding | The video encoding type. |
Definition at line 412 of file GstWrapper.cpp.
unsigned int GstWrapper::GetLastTimestamp | ( | ) | const |
Get the last timestamp received from the stream.
Definition at line 306 of file GstWrapper.cpp.
|
inline |
Get the current playback mode.
Definition at line 90 of file GstWrapper.h.
|
inline |
Get the current playback speed.
Definition at line 96 of file GstWrapper.h.
|
staticprivate |
Definition at line 265 of file GstWrapper.cpp.
bool GstWrapper::IsPipelineActive | ( | ) | const |
Get the status of the pipeline.
Definition at line 324 of file GstWrapper.cpp.
|
private |
Definition at line 377 of file GstWrapper.cpp.
void GstWrapper::Pause | ( | ) | const |
void GstWrapper::Play | ( | float | speed = 1.0f | ) |
Set the pipeline state to playing and update the speed value for determining the framerate.
Definition at line 531 of file GstWrapper.cpp.
void GstWrapper::RemoveObserver | ( | TimestampEventCallback | observer | ) |
Remove an existing timestamp event subscriber.
observer | The TimestampEventCallback event handler. |
Definition at line 332 of file GstWrapper.cpp.
void GstWrapper::SetCaps | ( | std::string | caps, |
bool | isMjpeg = false |
||
) |
Set the stream capabilities.
caps | The stream capabilities. |
Definition at line 284 of file GstWrapper.cpp.
void GstWrapper::SetCookie | ( | std::string | cookie | ) |
Set the cookie for MJPEG streams.
cookie | The cookie value. |
Definition at line 289 of file GstWrapper.cpp.
void GstWrapper::SetLocation | ( | std::string | location | ) |
Set the stream location.
location | The URI of the new stream location. |
Definition at line 274 of file GstWrapper.cpp.
void GstWrapper::SetMode | ( | Controller::Mode | mode | ) |
Set the playback mode.
mode | The stream Controller::Mode to set. |
Definition at line 319 of file GstWrapper.cpp.
void GstWrapper::SetMulticastAddress | ( | std::string | multicastAddress | ) |
Set the multicast group address.
multicastAddress | The multicast group address. |
Definition at line 297 of file GstWrapper.cpp.
void GstWrapper::SetPorts | ( | int | rtpPort, |
int | rtcpPort | ||
) |
Set the receiver ports.
rtpPort | The port to receive RTP data. |
rtcpPort | The port to receive RTCP data. |
Definition at line 278 of file GstWrapper.cpp.
void GstWrapper::SetRtcpHostIP | ( | std::string | hostIp | ) |
Set the RTCP host IP.
hostIp | The IP of the RTCP host. |
Definition at line 293 of file GstWrapper.cpp.
void GstWrapper::SetTimestamp | ( | unsigned int | seekTime | ) |
Set the internal timestamp variable.
seekTime | A unix timestamp. |
Definition at line 301 of file GstWrapper.cpp.
void GstWrapper::SetWindowHandle | ( | guintptr | winhandle | ) |
Set the display window using the given window handle.
winhandle | The window handle of the display. |
Definition at line 270 of file GstWrapper.cpp.
|
private |
Definition at line 161 of file GstWrapper.h.