![]() |
Media Controller
A GStreamer implementation using the VideoXpert SDK
|
Establishes and controls an RTSP stream. More...
#include <RtspCommands.h>
Public Member Functions | |
| Commands (const std::string &streamUri, bool isVideo) | |
| Constructor. More... | |
| ~Commands () | |
| Destructor. More... | |
| bool | Options () |
| Send the OPTIONS method and read the server response. More... | |
| bool | GetParameter () |
| Send the GET_PARAMETER method and read the server response. More... | |
| bool | Describe (bool firstAttempt=false) |
| Send the DESCRIBE method and read the server response. More... | |
| bool | Setup (bool firstAttempt=false) |
| Send the SETUP method and read the server response. More... | |
| void | Pause () |
| Send the PAUSE method and read the server response. More... | |
| bool | SetupStream (GstWrapper *gstwrapper, float speed=0, unsigned int unixTime=0) |
| Send the PLAY method with a Range header and read the server response. More... | |
| void | PlayStream (GstWrapper *gstwrapper) |
| Create a pipe line More... | |
| void | Teardown () |
| Send the TEARDOWN method and read the server response. More... | |
| void | ResetPath (const std::string &streamUri) |
| Reset the RTSP stream location. More... | |
| std::string | GetSessionId () const |
| Get the current session ID for the video stream. More... | |
Private Member Functions | |
| void | GetSocket (const std::string &uriString, int bindPort) |
| Get the existing socket connection or return a new socket. More... | |
| void | ClearSocket () |
| Clear any existing socket connections. More... | |
Private Attributes | |
| std::string | _sessionId |
| std::string | _baseUri |
| std::string | _controlUri |
| std::string | _uuid |
| SdpParser | _sdp |
| int | _dataPort |
| int | _rtcpPort |
| int | _cSeqNum |
| boost::asio::io_service | _ioService |
| boost::asio::ip::tcp::socket | _pSocket |
| boost::asio::ip::tcp::socket | _rSocket |
| bool | _isVideo |
Establishes and controls an RTSP stream.
Definition at line 13 of file RtspCommands.h.
| Commands::Commands | ( | const std::string & | streamUri, |
| bool | isVideo | ||
| ) |
Constructor.
| streamUri | The location of the RTSP stream. |
| isVideo | Specifies wheather this command handles audio or video. |
Definition at line 20 of file RtspCommands.cpp.
|
inline |
Destructor.
Definition at line 26 of file RtspCommands.h.
|
private |
Clear any existing socket connections.
Definition at line 394 of file RtspCommands.cpp.
| bool Commands::Describe | ( | bool | firstAttempt = false | ) |
Send the DESCRIBE method and read the server response.
Definition at line 97 of file RtspCommands.cpp.
| bool Commands::GetParameter | ( | ) |
Send the GET_PARAMETER method and read the server response.
Definition at line 71 of file RtspCommands.cpp.
|
inline |
Get the current session ID for the video stream.
Definition at line 83 of file RtspCommands.h.
|
private |
Get the existing socket connection or return a new socket.
| uriString | The location of the media. |
| bindPort | The initial port to bind to. |
Definition at line 347 of file RtspCommands.cpp.
| bool Commands::Options | ( | ) |
Send the OPTIONS method and read the server response.
Definition at line 31 of file RtspCommands.cpp.
| void Commands::Pause | ( | ) |
Send the PAUSE method and read the server response.
Definition at line 279 of file RtspCommands.cpp.
| void Commands::PlayStream | ( | MediaController::GstWrapper * | gstwrapper | ) |
Create a pipe line
Definition at line 252 of file RtspCommands.cpp.
| void Commands::ResetPath | ( | const std::string & | streamUri | ) |
Reset the RTSP stream location.
| streamUri | The location of the RTSP stream. |
Definition at line 332 of file RtspCommands.cpp.
| bool Commands::Setup | ( | bool | firstAttempt = false | ) |
Send the SETUP method and read the server response.
Definition at line 140 of file RtspCommands.cpp.
| bool Commands::SetupStream | ( | MediaController::GstWrapper * | gstwrapper, |
| float | speed = 0, |
||
| unsigned int | unixTime = 0 |
||
| ) |
Send the PLAY method with a Range header and read the server response.
| 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. |
Definition at line 181 of file RtspCommands.cpp.
| void Commands::Teardown | ( | ) |
Send the TEARDOWN method and read the server response.
Definition at line 302 of file RtspCommands.cpp.
|
private |
Definition at line 89 of file RtspCommands.h.
|
private |
Definition at line 90 of file RtspCommands.h.
|
private |
Definition at line 95 of file RtspCommands.h.
|
private |
Definition at line 93 of file RtspCommands.h.
|
private |
Definition at line 96 of file RtspCommands.h.
|
private |
Definition at line 99 of file RtspCommands.h.
|
private |
Definition at line 97 of file RtspCommands.h.
|
private |
Definition at line 98 of file RtspCommands.h.
|
private |
Definition at line 94 of file RtspCommands.h.
|
private |
Definition at line 92 of file RtspCommands.h.
|
private |
Definition at line 88 of file RtspCommands.h.
|
private |
Definition at line 91 of file RtspCommands.h.