YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
14#ifndef YARP_FFMPEG_CARRIER_FFMPEGPORTMONITOR_CL_PARAMS_H
15#define YARP_FFMPEG_CARRIER_FFMPEGPORTMONITOR_CL_PARAMS_H
16
17// Standard imports
18#include <string>
19#include <vector>
20#include <map>
21
22// Ffmpeg imports
23extern "C" {
24 #include <libavcodec/avcodec.h>
25}
26
27// YARP imports
28#include <yarp/sig/Image.h>
29
34static const std::vector<std::string> FFMPEGPORTMONITOR_IGNORE_PARAMS {
35 "tcp",
36 "fast_tcp",
37 "udp",
38 "send.portmonitor",
39 "recv.portmonitor",
40 "file.image_compression_ffmpeg",
41 "type.dll"
42};
43
48static const std::string FFMPEGPORTMONITOR_CL_CODEC_KEY = "codec";
49
54static const std::vector<std::string> FFMPEGPORTMONITOR_CL_CODECS {
55 "mpeg2video",
56 "h264",
57 "h265"
58};
59
64static const std::string FFMPEGPORTMONITOR_CL_CUSTOM_ENC_KEY = "custom_enc";
65
70static const std::string FFMPEGPORTMONITOR_CL_CUSTOM_DEC_KEY = "custom_dec";
71
76static const std::string FFMPEGPORTMONITOR_CL_PIXEL_FORMAT_KEY = "pixel_format";
77
82static const std::string FFMPEGPORTMONITOR_CL_FRAME_RATE_KEY = "frame_rate";
83
88static const std::string FFMPEGPORTMONITOR_CL_PRINT_STATISTICS_KEY = "print_statistics";
89
94static const std::vector<int> FFMPEGPORTMONITOR_CODE_CODECS {
95 AV_CODEC_ID_MPEG2VIDEO,
96 AV_CODEC_ID_H264,
97 AV_CODEC_ID_H265
98};
99
104static std::map<int, int> FFMPEGPORTMONITOR_PIXELMAP = {
105 { VOCAB_PIXEL_RGB, AV_PIX_FMT_RGB24 },
106 { VOCAB_PIXEL_RGBA, AV_PIX_FMT_RGBA },
107 { VOCAB_PIXEL_BGR, AV_PIX_FMT_BGR24 },
108 { VOCAB_PIXEL_BGRA, AV_PIX_FMT_BGRA },
109 { VOCAB_PIXEL_YUV_420, AV_PIX_FMT_YUV420P }
110};
111
116static AVPixelFormat FFMPEGPORTMONITOR_DEFAULT_PIXEL_FORMAT = AV_PIX_FMT_YUV420P;
117
118#endif // YARP_FFMPEG_CARRIER_FFMPEGPORTMONITOR_CL_PARAMS_H
@ VOCAB_PIXEL_YUV_420
Definition Image.h:64
@ VOCAB_PIXEL_RGBA
Definition Image.h:45
@ VOCAB_PIXEL_BGRA
Definition Image.h:46
@ VOCAB_PIXEL_BGR
Definition Image.h:49
@ VOCAB_PIXEL_RGB
Definition Image.h:44
static const std::vector< std::string > FFMPEGPORTMONITOR_IGNORE_PARAMS
This vector contains all parameters that have to be ignored while parsing command line string.
Definition constants.h:34
static const std::string FFMPEGPORTMONITOR_CL_CODEC_KEY
This string is the "key" value for the codec parameter.
Definition constants.h:48
static const std::string FFMPEGPORTMONITOR_CL_CUSTOM_DEC_KEY
This string is the "key" value for the custom decoder parameter.
Definition constants.h:70
static const std::vector< std::string > FFMPEGPORTMONITOR_CL_CODECS
This vector contains the only accepted values for the command line parameter "codec".
Definition constants.h:54
static std::map< int, int > FFMPEGPORTMONITOR_PIXELMAP
This structure maps YARP pixel format codec into Ffmpeg pixel format codes.
Definition constants.h:104
static const std::string FFMPEGPORTMONITOR_CL_PIXEL_FORMAT_KEY
This string is the "key" value for the pixel format parameter.
Definition constants.h:76
static const std::string FFMPEGPORTMONITOR_CL_CUSTOM_ENC_KEY
This string is the "key" value for the custom encoder parameter.
Definition constants.h:64
static const std::vector< int > FFMPEGPORTMONITOR_CODE_CODECS
This vector contains the codec ids corresponding to the codecs of the FFMPEGPORTMONITOR_CL_CODECS vec...
Definition constants.h:94
static const std::string FFMPEGPORTMONITOR_CL_FRAME_RATE_KEY
This string is the "key" value for the frame rate parameter.
Definition constants.h:82
static const std::string FFMPEGPORTMONITOR_CL_PRINT_STATISTICS_KEY
This string is the "key" value to enable the print statistics.
Definition constants.h:88
static AVPixelFormat FFMPEGPORTMONITOR_DEFAULT_PIXEL_FORMAT
Default pixel format to be used within ffmpeg.
Definition constants.h:116