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#include <vector>
44
45namespace cli {
46
47struct opts_t {
49 std::string inputPath{};
51 std::string outputPath{};
53 size_t nbFrames{};
55 size_t inputGeoPrecision = 0;
57 size_t startFrame = std::numeric_limits<size_t>::max();
59 size_t threads{};
63 bool help = false;
65 bool version = false;
67 size_t nbLoops = 1;
69 bool dummyRun = false;
71 std::string dstAddress{};
73 std::vector<uint16_t> dstPort{};
75 std::string sdpOutdir{};
76};
77
78bool opts_parse(cli::opts_t& opts, const int& argc, const std::span<const char* const>& args);
79
80void print_usage(void);
81void print_version(void);
82void print_help(void);
83
84} // namespace cli
Definition cli.cpp:49
void print_version(void)
Print the version of the uvgVPCCenc library.
Definition cli.cpp:278
bool opts_parse(cli::opts_t &opts, const int &argc, const std::span< const char *const > &args)
Parse command line options.
Definition cli.cpp:128
void print_help(void)
Print the help message of the application.
Definition cli.cpp:282
void print_usage(void)
Print the default usage of the application.
Definition cli.cpp:271
Definition cli.hpp:47
bool version
Print version.
Definition cli.hpp:65
std::string inputPath
Input filename.
Definition cli.hpp:49
std::vector< uint16_t > dstPort
Destination port for rtp streams.
Definition cli.hpp:73
std::string uvgvpccParametersString
Encoder configuration.
Definition cli.hpp:61
std::string outputPath
Output filename.
Definition cli.hpp:51
size_t nbLoops
Whether to loop input.
Definition cli.hpp:67
size_t nbFrames
Number of frames to encode.
Definition cli.hpp:53
size_t startFrame
Frame number to start the encoding.
Definition cli.hpp:57
bool help
Print help.
Definition cli.hpp:63
bool dummyRun
If dummyRun is true, config is verified but no encoding is done.
Definition cli.hpp:69
std::string sdpOutdir
Output directory for SDP files.
Definition cli.hpp:75
size_t inputGeoPrecision
Input geometry precision.
Definition cli.hpp:55
size_t threads
Maximum number of threads to be used.
Definition cli.hpp:59
std::string dstAddress
Destination address for rtp streams.
Definition cli.hpp:71