YARP
Yet Another Robot Platform
constants.h File Reference

File containing constans used in FfmpegPortmonitor.cpp. More...

#include <string>
#include <vector>
#include <map>
#include <libavcodec/avcodec.h>
#include <yarp/sig/Image.h>
+ Include dependency graph for constants.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

static const std::vector< std::string > FFMPEGPORTMONITOR_IGNORE_PARAMS
 This vector contains all parameters that have to be ignored while parsing command line string. More...
 
static const std::string FFMPEGPORTMONITOR_CL_CODEC_KEY = "codec"
 This string is the "key" value for the codec parameter. More...
 
static const std::vector< std::string > FFMPEGPORTMONITOR_CL_CODECS
 This vector contains the only accepted values for the command line parameter "codec". More...
 
static const std::vector< int > FFMPEGPORTMONITOR_CODE_CODECS
 This vector contains the codec ids corresponding to the codecs of the FFMPEGPORTMONITOR_CL_CODECS vector. More...
 
static std::map< int, int > FFMPEGPORTMONITOR_PIXELMAP
 This structure maps YARP pixel format codec into Ffmpeg pixel format codes. More...
 
static std::map< int, int > FFMPEGPORTMONITOR_CODECPIXELMAP
 This structure maps Ffmpeg video codecs with their needed Ffmpeg pixel format code. More...
 

Detailed Description

File containing constans used in FfmpegPortmonitor.cpp.

Author
Giulia Martino, Fabio Valla
Version
1.0
Date
2021-01-04

Definition in file constants.h.

Variable Documentation

◆ FFMPEGPORTMONITOR_CL_CODEC_KEY

const std::string FFMPEGPORTMONITOR_CL_CODEC_KEY = "codec"
static

This string is the "key" value for the codec parameter.

Definition at line 51 of file constants.h.

◆ FFMPEGPORTMONITOR_CL_CODECS

const std::vector<std::string> FFMPEGPORTMONITOR_CL_CODECS
static
Initial value:
{
"mpeg2video",
"h264",
"h265"
}

This vector contains the only accepted values for the command line parameter "codec".

Definition at line 57 of file constants.h.

◆ FFMPEGPORTMONITOR_CODE_CODECS

const std::vector<int> FFMPEGPORTMONITOR_CODE_CODECS
static
Initial value:
{
AV_CODEC_ID_MPEG2VIDEO,
AV_CODEC_ID_H264,
AV_CODEC_ID_H265
}

This vector contains the codec ids corresponding to the codecs of the FFMPEGPORTMONITOR_CL_CODECS vector.

Definition at line 67 of file constants.h.

◆ FFMPEGPORTMONITOR_CODECPIXELMAP

std::map<int, int> FFMPEGPORTMONITOR_CODECPIXELMAP
static
Initial value:
= {
{ AV_CODEC_ID_H264, AV_PIX_FMT_YUV420P },
{ AV_CODEC_ID_H265, AV_PIX_FMT_YUV420P },
{ AV_CODEC_ID_MPEG2VIDEO, AV_PIX_FMT_YUV420P }
}

This structure maps Ffmpeg video codecs with their needed Ffmpeg pixel format code.

Definition at line 89 of file constants.h.

◆ FFMPEGPORTMONITOR_IGNORE_PARAMS

const std::vector<std::string> FFMPEGPORTMONITOR_IGNORE_PARAMS
static
Initial value:
{
"tcp",
"fast_tcp",
"udp",
"send.portmonitor",
"recv.portmonitor",
"file.libffmpeg",
"type.dll"
}

This vector contains all parameters that have to be ignored while parsing command line string.

Definition at line 37 of file constants.h.

◆ FFMPEGPORTMONITOR_PIXELMAP

std::map<int, int> FFMPEGPORTMONITOR_PIXELMAP
static
Initial value:
= {
{ VOCAB_PIXEL_RGB, AV_PIX_FMT_RGB24 },
{ VOCAB_PIXEL_RGBA, AV_PIX_FMT_RGBA },
{ VOCAB_PIXEL_BGR, AV_PIX_FMT_BGR24 },
{ VOCAB_PIXEL_BGRA, AV_PIX_FMT_BGRA },
{ VOCAB_PIXEL_YUV_420, AV_PIX_FMT_YUV420P }
}
@ VOCAB_PIXEL_YUV_420
Definition: Image.h:70
@ VOCAB_PIXEL_RGBA
Definition: Image.h:51
@ VOCAB_PIXEL_BGRA
Definition: Image.h:52
@ VOCAB_PIXEL_BGR
Definition: Image.h:55
@ VOCAB_PIXEL_RGB
Definition: Image.h:50

This structure maps YARP pixel format codec into Ffmpeg pixel format codes.

Definition at line 77 of file constants.h.