![]() |
MediaX v1.0.0rc7 [7e6cb74]
Video streaming for military vehicles
|
Manage an RTP stream. More...
#include <rtp_depayloader.h>
Public Member Functions | |
RtpDepayloader () | |
Construct a new Rtp Depayloader object. | |
virtual | ~RtpDepayloader ()=default |
Destroy the Rtp Stream object. | |
RtpDepayloader (RtpDepayloader const &)=delete | |
Construct a new Rtp Payloader object. | |
RtpDepayloader & | operator= (RtpDepayloader const &)=delete |
Construct a new Rtp Payloader object. | |
virtual void | SetStreamInfo (const ::mediax::rtp::StreamInformation &stream_information)=0 |
Configure at RTP input stream and dont wait for the SAP/SDP announcement. | |
void | RegisterCallback (const ::mediax::rtp::RtpCallback &callback) |
Register a callback for our session_name. | |
virtual bool | Open () |
Open the RTP stream. | |
virtual void | Start () |
Start the stream. | |
virtual void | Stop () |
Stop the stream, can be quickly re-started. | |
virtual void | Close () |
Close the RTP stream. | |
virtual bool | Receive (mediax::rtp::RtpFrameData *data, int32_t timeout=0)=0 |
Recieve a frame or timeout. | |
void | SetSessionName (std::string_view name) |
Set the Session Name attribute. | |
std::string | GetSessionName () |
Get the Session Name attribute. | |
::mediax::rtp::ColourspaceType | GetColourSpace () |
Get the Colour Space object of the incoming stream. | |
void | SetHeight (uint32_t height) |
Set the Height attribute. | |
uint32_t | GetHeight () const |
Get the Height object of the incoming stream. | |
void | SetWidth (uint32_t width) |
Set the Width attribute. | |
uint32_t | GetWidth () const |
Get the Width object of the incoming stream. | |
void | SetFramerate (uint32_t framerate) |
Set the Frame Rate object. | |
uint32_t | GetFrameRate () const |
Get the Frame Rate of the incoming stream. | |
std::string | GetIpAddress () const |
Get the Ip Address of the incoming stream. | |
void | SetIpAddress (std::string_view ip_address) |
Set the Ip Address attribute. | |
void | SetPort (uint32_t port) |
Set the Port object. | |
uint32_t | GetPort () const |
Get the Port of the incoming stream. | |
void | SetColourSpace (::mediax::rtp::ColourspaceType colourspace) |
Set the Colour Space object. | |
bool | SettingsValid () const |
Check if the settings are valid. All stream information was set. | |
::mediax::rtp::ColourspaceType | GetColourSpace () const |
Get the Colour Space object. | |
bool | IsMulticast (std::string_view ip_address) const |
Check if the IP address is a multicast address. | |
bool | CallbackRegistered () const |
Check is a callback is registered. | |
void | UnregisterCallback () |
Unregister the callback. | |
virtual void | Callback (::mediax::rtp::RtpFrameData frame) const =0 |
Call the registered callback. | |
::mediax::rtp::RtpPortType & | GetStream () |
Get the Port Type object. | |
::mediax::rtp::RtpCallback | GetCallback () const |
Get the Callback object. | |
std::vector< uint8_t > & | GetBuffer () |
Get the Buffer object. | |
uint32_t | GetBufferSize () const |
Get the Buffer Size object. | |
void | SetBufferSize (uint32_t size) |
Set the Buffer Size object. | |
::mediax::rtp::StreamState | GetState () const |
Get the State object. | |
Private Attributes | |
::mediax::rtp::StreamState | state_ = ::mediax::rtp::StreamState::kClosed |
Stream state. | |
::mediax::rtp::RtpCallback | callback_ |
The callback to notify when a frame is received. | |
std::vector< uint8_t > | buffer_in_ |
UDP data buffer. | |
bool | callback_registered_ = false |
Indicate if callback has been registered. | |
::mediax::rtp::RtpPortType | ingress_ = {} |
Ingress port. | |
uint32_t | settings_mask_ = 0 |
Settings valid mask. | |
Manage an RTP stream.
|
pure virtual |
Call the registered callback.
frame | the callback frame data |
Implemented in mediax::rtp::av1::gst::RtpAv1GstDepayloader, mediax::rtp::h264::gst::nvidia::RtpH264GstNvidiaDepayloader, mediax::rtp::h264::gst::omx::RtpH264GstOmxDepayloader, mediax::rtp::h264::gst::open::RtpH264GstOpenDepayloader, mediax::rtp::h264::gst::vaapi::RtpH264GstVaapiDepayloader, mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiDepayloader, mediax::rtp::jpeg::gst::RtpJpegGstDepayloader, mediax::rtp::jpeg::gst::vaapi::RtpJpegGstVaapiDepayloader, and mediax::rtp::uncompressed::RtpUncompressedDepayloader.
bool mediax::rtp::RtpDepayloader::CallbackRegistered | ( | ) | const |
Check is a callback is registered.
|
inlinevirtual |
Close the RTP stream.
Reimplemented in mediax::rtp::av1::gst::RtpAv1GstDepayloader, mediax::rtp::h264::gst::nvidia::RtpH264GstNvidiaDepayloader, mediax::rtp::h264::gst::omx::RtpH264GstOmxDepayloader, mediax::rtp::h264::gst::open::RtpH264GstOpenDepayloader, mediax::rtp::h264::gst::vaapi::RtpH264GstVaapiDepayloader, mediax::rtp::h264::vaapi::RtpH264VaapiDepayloader, mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiDepayloader, mediax::rtp::jpeg::gst::RtpJpegGstDepayloader, mediax::rtp::jpeg::gst::vaapi::RtpJpegGstVaapiDepayloader, and mediax::rtp::uncompressed::RtpUncompressedDepayloader.
|
inline |
Get the Buffer object.
|
inline |
Get the Buffer Size object.
|
inline |
Get the Callback object.
mediax::rtp::ColourspaceType mediax::rtp::RtpDepayloader::GetColourSpace | ( | ) |
Get the Colour Space object of the incoming stream.
mediax::rtp::ColourspaceType mediax::rtp::RtpDepayloader::GetColourSpace | ( | ) | const |
Get the Colour Space object.
uint32_t mediax::rtp::RtpDepayloader::GetFrameRate | ( | ) | const |
Get the Frame Rate of the incoming stream.
uint32_t mediax::rtp::RtpDepayloader::GetHeight | ( | ) | const |
Get the Height object of the incoming stream.
std::string mediax::rtp::RtpDepayloader::GetIpAddress | ( | ) | const |
Get the Ip Address of the incoming stream.
uint32_t mediax::rtp::RtpDepayloader::GetPort | ( | ) | const |
Get the Port of the incoming stream.
std::string mediax::rtp::RtpDepayloader::GetSessionName | ( | ) |
Get the Session Name attribute.
|
inline |
Get the State object.
mediax::rtp::RtpPortType & mediax::rtp::RtpDepayloader::GetStream | ( | ) |
Get the Port Type object.
uint32_t mediax::rtp::RtpDepayloader::GetWidth | ( | ) | const |
Get the Width object of the incoming stream.
bool mediax::rtp::RtpDepayloader::IsMulticast | ( | std::string_view | ip_address | ) | const |
Check if the IP address is a multicast address.
ip_address |
|
inlinevirtual |
Open the RTP stream.
Reimplemented in mediax::rtp::av1::gst::RtpAv1GstDepayloader, mediax::rtp::h264::gst::nvidia::RtpH264GstNvidiaDepayloader, mediax::rtp::h264::gst::omx::RtpH264GstOmxDepayloader, mediax::rtp::h264::gst::open::RtpH264GstOpenDepayloader, mediax::rtp::h264::gst::vaapi::RtpH264GstVaapiDepayloader, mediax::rtp::h264::vaapi::RtpH264VaapiDepayloader, mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiDepayloader, mediax::rtp::jpeg::gst::RtpJpegGstDepayloader, mediax::rtp::jpeg::gst::vaapi::RtpJpegGstVaapiDepayloader, and mediax::rtp::uncompressed::RtpUncompressedDepayloader.
|
delete |
Construct a new Rtp Payloader object.
|
pure virtual |
Recieve a frame or timeout.
data | the fame buffer in CPU memory. |
timeout | zero will wait forever or a timeout in milliseconds |
Implemented in mediax::rtp::av1::gst::RtpAv1GstDepayloader, mediax::rtp::h264::vaapi::RtpH264VaapiDepayloader, mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiDepayloader, mediax::rtp::jpeg::gst::RtpJpegGstDepayloader, and mediax::rtp::jpeg::gst::vaapi::RtpJpegGstVaapiDepayloader.
void mediax::rtp::RtpDepayloader::RegisterCallback | ( | const ::mediax::rtp::RtpCallback & | callback | ) |
Register a callback for our session_name.
callback | The callback to notify when a frame is received |
|
inline |
Set the Buffer Size object.
size |
void mediax::rtp::RtpDepayloader::SetColourSpace | ( | ::mediax::rtp::ColourspaceType | colourspace | ) |
Set the Colour Space object.
colourspace |
void mediax::rtp::RtpDepayloader::SetIpAddress | ( | std::string_view | ip_address | ) |
Set the Ip Address attribute.
ip_address | The IPV4 address of the video stream |
void mediax::rtp::RtpDepayloader::SetSessionName | ( | std::string_view | name | ) |
Set the Session Name attribute.
name | The SAP/SDP session name |
|
pure virtual |
Configure at RTP input stream and dont wait for the SAP/SDP announcement.
stream_information | set the stream information |
Implemented in mediax::rtp::av1::gst::RtpAv1GstDepayloader, mediax::rtp::h264::gst::nvidia::RtpH264GstNvidiaDepayloader, mediax::rtp::h264::gst::omx::RtpH264GstOmxDepayloader, mediax::rtp::h264::gst::open::RtpH264GstOpenDepayloader, mediax::rtp::h264::gst::vaapi::RtpH264GstVaapiDepayloader, mediax::rtp::h264::vaapi::RtpH264VaapiDepayloader, mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiDepayloader, mediax::rtp::jpeg::gst::RtpJpegGstDepayloader, mediax::rtp::jpeg::gst::vaapi::RtpJpegGstVaapiDepayloader, and mediax::rtp::uncompressed::RtpUncompressedDepayloader.
bool mediax::rtp::RtpDepayloader::SettingsValid | ( | ) | const |
Check if the settings are valid. All stream information was set.
|
inlinevirtual |
Start the stream.
Reimplemented in mediax::rtp::av1::gst::RtpAv1GstDepayloader, mediax::rtp::h264::gst::nvidia::RtpH264GstNvidiaDepayloader, mediax::rtp::h264::gst::omx::RtpH264GstOmxDepayloader, mediax::rtp::h264::gst::open::RtpH264GstOpenDepayloader, mediax::rtp::h264::gst::vaapi::RtpH264GstVaapiDepayloader, mediax::rtp::h264::vaapi::RtpH264VaapiDepayloader, mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiDepayloader, mediax::rtp::jpeg::gst::RtpJpegGstDepayloader, mediax::rtp::jpeg::gst::vaapi::RtpJpegGstVaapiDepayloader, and mediax::rtp::uncompressed::RtpUncompressedDepayloader.
|
inlinevirtual |
Stop the stream, can be quickly re-started.
Reimplemented in mediax::rtp::av1::gst::RtpAv1GstDepayloader, mediax::rtp::h264::gst::nvidia::RtpH264GstNvidiaDepayloader, mediax::rtp::h264::gst::omx::RtpH264GstOmxDepayloader, mediax::rtp::h264::gst::open::RtpH264GstOpenDepayloader, mediax::rtp::h264::gst::vaapi::RtpH264GstVaapiDepayloader, mediax::rtp::h264::vaapi::RtpH264VaapiDepayloader, mediax::rtp::h265::gst::vaapi::RtpH265GstVaapiDepayloader, mediax::rtp::jpeg::gst::RtpJpegGstDepayloader, mediax::rtp::jpeg::gst::vaapi::RtpJpegGstVaapiDepayloader, and mediax::rtp::uncompressed::RtpUncompressedDepayloader.