![]() |
MediaX v1.1.2 [a0bc647]
Video streaming for military vehicles
|
RTP utility functions. More...
#include "rtp/rtp_utils.h"#include "rtp/rtp_types.h"#include <algorithm>#include <cmath>#include <iomanip>#include <iostream>#include <random>#include <string>#include <thread>
Data Structures | |
| struct | Ball |
| A simple bouncing ball test card. Ball position struct. More... | |
Namespaces | |
| namespace | mediax |
| The Astute Systems (MediaX) library for video streaming. | |
Functions | |
| void | mediax::InitRtp (int argc, char *argv[]) |
| Initialize the RTP library, mainly needed for GStreamer support. | |
| bool | mediax::IsRtpInitialised () |
| Check if the RTP library has been initialized. | |
| void | mediax::RtpCleanup () |
| Finalise the RTP library, mainly needed for GStreamer support. | |
| std::string | mediax::ColourspaceTypeToString (rtp::ColourspaceType) |
| Convert enum to string. | |
| rtp::ColourspaceType | mediax::ColourspaceTypeFromString (std::string_view) |
| Convert string to enum. | |
| uint8_t | mediax::BitsPerPixel (rtp::ColourspaceType mode) |
| Get the number of bits per pixel for a given colour space. | |
| uint8_t | mediax::BytesPerPixel (rtp::ColourspaceType mode) |
| Get the number of bytes per pixel for a given colour space. | |
| void | EndianSwap32 (uint32_t *data, unsigned int length) |
| Swap the endianness of a 32-bit integer. | |
| void | EndianSwap16 (uint16_t *data, unsigned int length) |
| Swap the endianness of a 16-bit integer. | |
| void | DumpHex (const void *data, size_t size) |
| Dump a hex representation of a buffer. | |
| void | PackRgb (uint8_t *data, uint64_t pixel, mediax::rtp::Rgb rgb, mediax::rtp::ColourspaceType colourspace) |
| Pack Red/Green/Blue values into a buffer. | |
| void | CreateColourBarEbuTestCard (uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace) |
| Create a Colour Bar Ebu Test Card object. | |
| void | CreateColourBarTestCard (uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace) |
| Create a Colour Bar Test Card object. | |
| void | CreateGreyScaleBarTestCard (uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace) |
| Create a Grey Scale Bar Test Card object. | |
| void | CreateQuadTestCard (uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace) |
| Create a Smtpe Test Card object. | |
| void | CreateCheckeredTestCard (uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace) |
| Create a Checkerd Test Card object. | |
| 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. | |
| void | CreateWhiteNoiseTestCard (uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace) |
| Create a White Noise Test Card object. | |
| void | CreateBouncingBallTestCard (uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType colourspace) |
| Create a Bouncing Ball Test Card object. | |
RTP utility functions.
| void CreateBouncingBallTestCard | ( | uint8_t * | data, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Create a Bouncing Ball Test Card object.
| data | the buffer to write the test card to |
| width | the image width in pixels |
| height | the image height in pixels |
| colourspace | The colourspace to use |
| void CreateCheckeredTestCard | ( | uint8_t * | data, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Create a Checkerd Test Card object.
| data | the buffer to write the test card to |
| width | the image width in pixels |
| height | the image height in pixels |
| colourspace | The colourspace to use |
| void CreateColourBarEbuTestCard | ( | uint8_t * | data, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Create a Colour Bar Ebu Test Card object.
| data | |
| width | |
| height | |
| colourspace |
| void CreateColourBarTestCard | ( | uint8_t * | data, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Create a Colour Bar Test Card object.
| data | the buffer to write the test card to |
| width | the image width in pixels |
| height | the image height in pixels |
| colourspace | The colourspace to use |
| void CreateGreyScaleBarTestCard | ( | uint8_t * | data, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Create a Grey Scale Bar Test Card object.
| data | the buffer to write the test card to |
| width | the image width in pixels |
| height | the image height in pixels |
| colourspace | The colourspace to use |
| void CreateQuadTestCard | ( | uint8_t * | data, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Create a Smtpe Test Card object.
| data | the buffer to write the test card to |
| width | the image width in pixels |
| height | the image height in pixels |
| colourspace | The colourspace to use |
| 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.
| data | the buffer to write the test card to |
| width | the image width in pixels |
| height | the image height in pixels |
| red | RGB value |
| green | RGB value |
| blue | RGB value |
| colourspace | The colourspace to use |
| void CreateWhiteNoiseTestCard | ( | uint8_t * | data, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Create a White Noise Test Card object.
| data | the buffer to write the test card to |
| width | the image width in pixels |
| height | the image height in pixels |
| colourspace | The colourspace to use |
| void DumpHex | ( | const void * | data, |
| size_t | size | ||
| ) |
Dump a hex representation of a buffer.
| data | the buffer to write the test card to |
| size | the size of the buffer |
| void EndianSwap16 | ( | uint16_t * | data, |
| unsigned int | length | ||
| ) |
Swap the endianness of a 16-bit integer.
| data | A pointer to the data |
| length | The length of the data |
| void EndianSwap32 | ( | uint32_t * | data, |
| unsigned int | length | ||
| ) |
Swap the endianness of a 32-bit integer.
| data | A pointer to the data |
| length | The length of the data |
| void PackRgb | ( | uint8_t * | data, |
| uint64_t | pixel, | ||
| mediax::rtp::Rgb | rgb, | ||
| mediax::rtp::ColourspaceType | colourspace | ||
| ) |
Pack Red/Green/Blue values into a buffer.
| data | the buffer to pack into |
| pixel | the pixel number |
| rgb | red/green/blue values |
| colourspace | the colourspace to use |