uvgVPCCenc 1.1.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 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 the Tampere University or 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 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON
28 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
31 ****************************************************************************/
32
33#pragma once
34
39#include <limits>
40#include <string>
41#include <span>
42#include <cstdint>
43
44namespace cli {
45
46struct opts_t {
48 std::string inputPath{};
50 std::string outputPath{};
52 size_t nbFrames{};
54 size_t inputGeoPrecision = 0;
56 size_t startFrame = std::numeric_limits<size_t>::max();
58 size_t threads{};
62 bool help = false;
64 bool version = false;
66 size_t nbLoops = 1;
68 bool dummyRun = false;
70 std::string dstAddress{};
72 uint16_t dstPort = 0;
73};
74
75bool opts_parse(cli::opts_t& opts, const int& argc, const std::span<const char* const>& args);
76
77void print_usage(void);
78void print_version(void);
79void print_help(void);
80
81} // namespace cli
Definition cli.cpp:48
void print_version(void)
Print the version of the uvgVPCCenc library.
Definition cli.cpp:249
bool opts_parse(cli::opts_t &opts, const int &argc, const std::span< const char *const > &args)
Parse command line options.
Definition cli.cpp:125
void print_help(void)
Print the help message of the application.
Definition cli.cpp:253
void print_usage(void)
Print the default usage of the application.
Definition cli.cpp:242
Definition cli.hpp:46
bool version
Print version.
Definition cli.hpp:64
std::string inputPath
Input filename.
Definition cli.hpp:48
std::string uvgvpccParametersString
Encoder configuration.
Definition cli.hpp:60
std::string outputPath
Output filename.
Definition cli.hpp:50
size_t nbLoops
Whether to loop input.
Definition cli.hpp:66
size_t nbFrames
Number of frames to encode.
Definition cli.hpp:52
uint16_t dstPort
Destination port for rtp streams.
Definition cli.hpp:72
size_t startFrame
Frame number to start the encoding.
Definition cli.hpp:56
bool help
Print help.
Definition cli.hpp:62
bool dummyRun
If dummyRun is true, config is verified but no encoding is done.
Definition cli.hpp:68
size_t inputGeoPrecision
Input geometry precision.
Definition cli.hpp:54
size_t threads
Maximum number of threads to be used.
Definition cli.hpp:58
std::string dstAddress
Destination address for rtp streams.
Definition cli.hpp:70