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_CL_CODECS {
35 "mpeg2video",
36 "h264",
37 "h265"
38};
39
44static const std::string FFMPEGPORTMONITOR_CL_ENCODER_KEY = "encoder";
45
50static const std::string FFMPEGPORTMONITOR_CL_DECODER_KEY = "decoder";
51
56static const std::string FFMPEGPORTMONITOR_CL_PIXEL_FORMAT_KEY = "pixel_format";
57
62static const std::string FFMPEGPORTMONITOR_CL_FRAME_RATE_KEY = "frame_rate";
63
68static const std::string FFMPEGPORTMONITOR_CL_PRINT_STATISTICS_KEY = "print_statistics";
69
74static const std::vector<int> FFMPEGPORTMONITOR_CODE_CODECS {
75 AV_CODEC_ID_MPEG2VIDEO,
76 AV_CODEC_ID_H264,
77 AV_CODEC_ID_H265
78};
79
84static std::map<int, int> FFMPEGPORTMONITOR_PIXELMAP = {
85 { VOCAB_PIXEL_RGB, AV_PIX_FMT_RGB24 },
86 { VOCAB_PIXEL_RGBA, AV_PIX_FMT_RGBA },
87 { VOCAB_PIXEL_BGR, AV_PIX_FMT_BGR24 },
88 { VOCAB_PIXEL_BGRA, AV_PIX_FMT_BGRA },
89 { VOCAB_PIXEL_YUV_420, AV_PIX_FMT_YUV420P }
90};
91
96static AVPixelFormat FFMPEGPORTMONITOR_DEFAULT_PIXEL_FORMAT = AV_PIX_FMT_YUV420P;
97
98#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_CL_CODECS
This vector contains the only accepted values for the command line parameter "codec".
Definition constants.h:34
static std::map< int, int > FFMPEGPORTMONITOR_PIXELMAP
This structure maps YARP pixel format codec into Ffmpeg pixel format codes.
Definition constants.h:84
static const std::string FFMPEGPORTMONITOR_CL_PIXEL_FORMAT_KEY
This string is the "key" value for the pixel format parameter.
Definition constants.h:56
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:74
static const std::string FFMPEGPORTMONITOR_CL_FRAME_RATE_KEY
This string is the "key" value for the frame rate parameter.
Definition constants.h:62
static const std::string FFMPEGPORTMONITOR_CL_DECODER_KEY
This string is the "key" value for the custom decoder parameter.
Definition constants.h:50
static const std::string FFMPEGPORTMONITOR_CL_PRINT_STATISTICS_KEY
This string is the "key" value to enable the print statistics.
Definition constants.h:68
static AVPixelFormat FFMPEGPORTMONITOR_DEFAULT_PIXEL_FORMAT
Default pixel format to be used within ffmpeg.
Definition constants.h:96
static const std::string FFMPEGPORTMONITOR_CL_ENCODER_KEY
This string is the "key" value for the custom encoder parameter.
Definition constants.h:44