Blue Brain BioExplorer
DeflectParameters.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2024, EPFL/Blue Brain Project
3  * All rights reserved. Do not distribute without permission.
4  *
5  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
6  *
7  * This library is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Lesser General Public License version 3.0 as published
9  * by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #include "DeflectParameters.h"
22 #include "utils.h"
23 
24 #include <deflect/Stream.h>
25 
26 namespace core
27 {
29  : _props("Deflect plugin parameters")
30 {
31  // clang-format off
32  _props.setProperty(
33  {PARAM_ENABLED, true,
34  Property::MetaData{"Enable streaming", "Enable/disable streaming"}});
35  _props.setProperty(
36  {PARAM_ID, std::string(),
37  {"Stream ID", "The ID/name of the stream, equivalent to DEFLECT_ID"}});
38  _props.setProperty({PARAM_HOSTNAME, std::string(),
39  {"Stream hostname", "Hostname of Deflect server"}});
40  _props.setProperty({PARAM_PORT, (int32_t)deflect::Stream::defaultPortNumber,
41  1, 65535, {"Stream port", "Port of Deflect server"}});
42  _props.setProperty({PARAM_COMPRESSION, true,
43  {"Use JPEG compression", "Use JPEG compression"}});
44  _props.setProperty({PARAM_TOP_DOWN, false,
45  {"Stream image top-down",
46  "Top-down image orientation instead of bottom-up"}});
47  _props.setProperty(
48  {PARAM_RESIZING, true,
49  {"Allow resizing",
50  "Allow resizing of framebuffers from EVT_VIEW_SIZE_CHANGED"}});
51  _props.setProperty(
52  {PARAM_QUALITY, (int32_t)80, 1, 100, {"JPEG quality", "JPEG quality"}});
53  _props.setProperty(
54  {PARAM_USE_PIXEL_OP, false,
55  {"Use per-tile direct streaming", "Use per-tile direct streaming"}});
57  int32_t(deflect::ChromaSubsampling::YUV444),
58  enumNames<deflect::ChromaSubsampling>(),
59  {"Chroma subsampling",
60  "Chroma subsampling modes: yuv444, yuv422, yuv420"}});
61  // clang-format on
62 }
63 } // namespace core
void setProperty(const Property &newProperty)
Definition: PropertyMap.h:307
constexpr auto PARAM_RESIZING
constexpr auto PARAM_QUALITY
constexpr auto PARAM_ID
constexpr auto PARAM_ENABLED
constexpr auto PARAM_TOP_DOWN
constexpr auto PARAM_HOSTNAME
constexpr auto PARAM_CHROMA_SUBSAMPLING
constexpr auto PARAM_COMPRESSION
constexpr auto PARAM_USE_PIXEL_OP
constexpr auto PARAM_PORT