14#ifndef WRAPPERS_RTP_SAP_WRAPPER_H_
15#define WRAPPERS_RTP_SAP_WRAPPER_H_
50 RtpSapTransmit(std::string_view hostname, uint16_t port, std::string_view session_name, uint16_t height,
51 uint16_t width, uint16_t framerate, std::string_view encoding) {
53 .hostname = std::string(hostname),
57 .framerate = framerate,
86 uint32_t size = width * height * (
BitsPerPixel(encoding) /
static_cast<double>(8));
123 uint32_t pattern = 0) {
172 return GetBuffer(width, height, encoding);
194 auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() -
200 std::this_thread::sleep_for(std::chrono::milliseconds(interval - elapsed));
235 RtpSapRecieve(std::string_view hostname, uint16_t port, std::string_view session_name, uint16_t height,
236 uint16_t width, uint16_t framerate, std::string_view encoding) {
238 .hostname = std::string(hostname),
242 .framerate = framerate,
268 std::cout <<
"Address this2 " << rtp << std::endl;
270 if (rtp->stream_info_.deleted ==
true) {
271 rtp->stream_info_ = SapToStreamInformation(*sdp);
272 rtp->stream_info_.deleted =
false;
273 rtp->rtp_depayloader_.SetStreamInfo(rtp->stream_info_);
274 rtp->rtp_depayloader_.Open();
275 rtp->rtp_depayloader_.Start();
301 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
Functions to convert between different colour spaces.
RTP streaming video types.
void CreateWhiteNoiseTestCard(uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace)
Create a White Noise Test Card object.
Definition rtp_utils.cc:472
void CreateColourBarTestCard(uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace)
Create a Colour Bar Test Card object.
Definition rtp_utils.cc:340
void CreateCheckeredTestCard(uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace)
Create a Checkerd Test Card object.
Definition rtp_utils.cc:439
void CreateColourBarEbuTestCard(uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace)
Create a Colour Bar Ebu Test Card object.
Definition rtp_utils.cc:281
void CreateSolidTestCard(uint8_t *data, uint32_t width, uint32_t height, uint8_t red, uint8_t green, uint8_t blue, mediax::rtp::ColourspaceType colourspace)
Create a Solid Test Card object.
Definition rtp_utils.cc:462
void CreateBouncingBallTestCard(uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace)
Create a Bouncing Ball Test Card object.
Definition rtp_utils.cc:500
void CreateGreyScaleBarTestCard(uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace)
Create a Grey Scale Bar Test Card object.
Definition rtp_utils.cc:390
RTP streaming video types.
The buffer structure.
Definition capture_yuyv.c:81