uvgVPCCenc 1.2.0
uvgVPCCenc is an open-source real-time V-PCC encoder library written in C++ from scratch.
Loading...
Searching...
No Matches
cli.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 * This file is part of uvgVPCCenc V-PCC encoder.
3 *
4 * Copyright (c) 2024-present, Tampere University, ITU/ISO/IEC, project contributors
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without modification,
8 * are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
9 *
10 * * Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 * * Redistributions in binary form must reproduce the above copyright notice, this
14 * list of conditions and the following disclaimer in the documentation and/or
15 * other materials provided with the distribution.
16 *
17 * * Neither the name of Tampere University, ITU/ISO/IEC nor the names of its
18 * contributors may be used to endorse or promote products derived from
19 * this software without specific prior written permission.
20 *
21 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON
29 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
32 ****************************************************************************/
33
34#pragma once
35
40#include <limits>
41#include <string>
42#include <span>
43#include <cstdint>
44#include <vector>
45
46namespace cli {
47
48struct opts_t {
50 std::string inputPath{};
52 std::string outputPath{};
54 size_t nbFrames{};
56 size_t inputGeoPrecision = 0;
58 size_t startFrame = std::numeric_limits<size_t>::max();
60 size_t threads{};
66 bool help = false;
68 bool version = false;
70 size_t nbLoops = 1;
72 bool dummyRun = false;
74 std::string dstAddress{};
76 std::vector<uint16_t> dstPort{};
78 std::string sdpOutdir{};
80 size_t inputFramePerSecondLimiter = 0; // 0 means no input frame limiter (maxConcurrentFrames can still be a limiter)
81
82};
83
84bool opts_parse(cli::opts_t& opts, const int& argc, const std::span<const char* const>& args);
85
86void print_usage(void);
87void print_version(void);
88void print_help(void);
89
90} // namespace cli
Definition cli.cpp:51
void print_version(void)
Print the version of the uvgVPCCenc library.
Definition cli.cpp:309
bool opts_parse(cli::opts_t &opts, const int &argc, const std::span< const char *const > &args)
Parse command line options.
Definition cli.cpp:148
void print_help(void)
Print the help message of the application.
Definition cli.cpp:313
void print_usage(void)
Print the default usage of the application.
Definition cli.cpp:302
Definition cli.hpp:48
bool version
Print version.
Definition cli.hpp:68
std::string inputPath
Input filename.
Definition cli.hpp:50
std::vector< uint16_t > dstPort
Destination port for rtp streams.
Definition cli.hpp:76
std::string uvgvpccParametersString
Encoder configuration.
Definition cli.hpp:62
std::string uvgformatParametersString
Format library configuration.
Definition cli.hpp:64
std::string outputPath
Output filename.
Definition cli.hpp:52
size_t nbLoops
Whether to loop input.
Definition cli.hpp:70
size_t nbFrames
Number of frames to encode.
Definition cli.hpp:54
size_t inputFramePerSecondLimiter
FPS limit for reading input frames.
Definition cli.hpp:80
size_t startFrame
Frame number to start the encoding.
Definition cli.hpp:58
bool help
Print help.
Definition cli.hpp:66
bool dummyRun
If dummyRun is true, config is verified but no encoding is done.
Definition cli.hpp:72
std::string sdpOutdir
Output directory for SDP files.
Definition cli.hpp:78
size_t inputGeoPrecision
Input geometry precision.
Definition cli.hpp:56
size_t threads
Maximum number of threads to be used.
Definition cli.hpp:60
std::string dstAddress
Destination address for rtp streams.
Definition cli.hpp:74