uvgVPCCenc 1.0.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, 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
43namespace cli {
44
45struct opts_t {
47 std::string inputPath{};
49 std::string outputPath{};
51 size_t frames{};
53 size_t inputGeoPrecision = 0;
55 size_t startFrame = std::numeric_limits<size_t>::max();
57 size_t threads{};
61 bool help = false;
63 bool version = false;
65 size_t loop_input = 1;
66};
67
68bool opts_parse(cli::opts_t& opts, const int& argc, const std::span<const char* const>& args);
69
70void print_usage(void);
71void print_version(void);
72void print_help(void);
73
74} // namespace cli
Definition cli.cpp:48
void print_version(void)
Print the version of the uvgVPCCenc library.
Definition cli.cpp:235
bool opts_parse(cli::opts_t &opts, const int &argc, const std::span< const char *const > &args)
Parse command line options.
Definition cli.cpp:122
void print_help(void)
Print the help message of the application.
Definition cli.cpp:239
void print_usage(void)
Print the default usage of the application.
Definition cli.cpp:228
Definition cli.hpp:45
size_t loop_input
Whether to loop input.
Definition cli.hpp:65
bool version
Print version.
Definition cli.hpp:63
std::string inputPath
Input filename.
Definition cli.hpp:47
std::string uvgvpccParametersString
Encoder configuration.
Definition cli.hpp:59
std::string outputPath
Output filename.
Definition cli.hpp:49
size_t frames
Number of frames to encode.
Definition cli.hpp:51
size_t startFrame
Frame number to start the encoding.
Definition cli.hpp:55
bool help
Print help.
Definition cli.hpp:61
size_t inputGeoPrecision
Input geometry precision.
Definition cli.hpp:53
size_t threads
Maximum number of threads to be used.
Definition cli.hpp:57