NvNmos
Loading...
Searching...
No Matches
nvnmos.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
62#ifndef NVNMOS_H
63#define NVNMOS_H
64
65#if defined(NVNMOS_EXPORTS)
66
67#if defined(_WIN32) || defined(__CYGWIN__)
68#define NVNMOS_API __declspec(dllexport)
69#elif defined(__GNUC__) && (__GNUC__ >= 4)
70#define NVNMOS_API __attribute__ ((visibility("default")))
71#else
72#define NVNMOS_API
73#endif
74
75#elif defined(NVNMOS_STATIC)
76
77#define NVNMOS_API
78
79#else
80
81#if defined(_WIN32) || defined(__CYGWIN__)
82#define NVNMOS_API __declspec(dllimport)
83#elif defined(__GNUC__) && (__GNUC__ >= 4)
84#define NVNMOS_API
85#else
86#define NVNMOS_API
87#endif
88
89#endif
90
91#include <stdbool.h>
92#include <stddef.h>
93
94#ifdef __cplusplus
95extern "C"
96{
97#endif
98
105#define NVNMOS_ID_LEN 37
106
108
126
142
190 NvNmosNodeServer *server,
191 NvNmosSide side,
192 const char *name,
193 const char *transport_file);
194
199enum {
215
227typedef void (* nmos_logging_callback)(
228 NvNmosNodeServer *server,
229 const char *categories,
230 int level,
231 const char *message);
232
237
303
308typedef struct _NvNmosAssetConfig
309{
311 const char* manufacturer;
313 const char* product;
316 const char* instance_id;
319 const char** functions;
321 unsigned int num_functions;
323
379
431
437{
440 const char* domain;
441
449 unsigned int registration_port;
454
458 const char* system_address;
462 unsigned int system_port;
466 const char* system_version;
468
474typedef struct _NvNmosNodeServer
475{
485 void *impl;
487
498NVNMOS_API
500 const NvNmosNodeConfig *config,
501 NvNmosNodeServer *server);
502
512NVNMOS_API
514 NvNmosNodeServer *server);
515
526NVNMOS_API
528 NvNmosNodeServer *server,
529 const NvNmosReceiverConfig* config);
530
542NVNMOS_API
544 NvNmosNodeServer *server,
545 const char* receiver_name);
546
557NVNMOS_API
559 NvNmosNodeServer *server,
560 const NvNmosSenderConfig* config);
561
573NVNMOS_API
575 NvNmosNodeServer *server,
576 const char* sender_name);
577
612NVNMOS_API
614 NvNmosNodeServer *server,
615 NvNmosSide side,
616 const char *name,
617 const char *transport_file);
618
637NVNMOS_API
639 const char *seed,
640 char *out,
641 size_t out_len);
642
659NVNMOS_API
661 const char *seed,
662 const char *sender_name,
663 char *out,
664 size_t out_len);
665
682NVNMOS_API
684 const char *seed,
685 const char *receiver_name,
686 char *out,
687 size_t out_len);
688
699NVNMOS_API
701 const NvNmosNodeServer *server,
702 char *out,
703 size_t out_len);
704
721NVNMOS_API
723 const NvNmosNodeServer *server,
724 const char *sender_name,
725 char *out,
726 size_t out_len);
727
744NVNMOS_API
746 const NvNmosNodeServer *server,
747 const char *receiver_name,
748 char *out,
749 size_t out_len);
750
751#ifdef __cplusplus
752}
753#endif
754
755#endif
756
struct _NvNmosNetworkServicesConfig NvNmosNetworkServicesConfig
Definition nvnmos.h:236
NVNMOS_API bool nmos_get_node_id(const NvNmosNodeServer *server, char *out, size_t out_len)
NVNMOS_API bool nmos_connection_activate(NvNmosNodeServer *server, NvNmosSide side, const char *name, const char *transport_file)
NVNMOS_API bool nmos_make_node_id(const char *seed, char *out, size_t out_len)
NVNMOS_API bool remove_nmos_receiver_from_node_server(NvNmosNodeServer *server, const char *receiver_name)
NVNMOS_API bool nmos_make_sender_id(const char *seed, const char *sender_name, char *out, size_t out_len)
NVNMOS_API bool nmos_make_receiver_id(const char *seed, const char *receiver_name, char *out, size_t out_len)
NVNMOS_API bool add_nmos_sender_to_node_server(NvNmosNodeServer *server, const NvNmosSenderConfig *config)
NVNMOS_API bool destroy_nmos_node_server(NvNmosNodeServer *server)
NVNMOS_API bool remove_nmos_sender_from_node_server(NvNmosNodeServer *server, const char *sender_name)
void(* nmos_logging_callback)(NvNmosNodeServer *server, const char *categories, int level, const char *message)
Definition nvnmos.h:227
bool(* nmos_connection_activation_callback)(NvNmosNodeServer *server, NvNmosSide side, const char *name, const char *transport_file)
Definition nvnmos.h:189
struct _NvNmosNodeServer NvNmosNodeServer
Definition nvnmos.h:107
NVNMOS_API bool create_nmos_node_server(const NvNmosNodeConfig *config, NvNmosNodeServer *server)
struct _NvNmosNodeConfig NvNmosNodeConfig
struct _NvNmosReceiverConfig NvNmosReceiverConfig
Definition nvnmos.h:234
NVNMOS_API bool nmos_get_sender_id(const NvNmosNodeServer *server, const char *sender_name, char *out, size_t out_len)
NVNMOS_API bool add_nmos_receiver_to_node_server(NvNmosNodeServer *server, const NvNmosReceiverConfig *config)
enum _NvNmosTransport NvNmosTransport
_NvNmosTransport
Definition nvnmos.h:116
struct _NvNmosAssetConfig NvNmosAssetConfig
Definition nvnmos.h:233
struct _NvNmosSenderConfig NvNmosSenderConfig
Definition nvnmos.h:235
_NvNmosSide
Definition nvnmos.h:136
NVNMOS_API bool nmos_get_receiver_id(const NvNmosNodeServer *server, const char *receiver_name, char *out, size_t out_len)
enum _NvNmosSide NvNmosSide
@ NVNMOS_LOG_SEVERE
Definition nvnmos.h:211
@ NVNMOS_LOG_DEVEL
Definition nvnmos.h:201
@ NVNMOS_LOG_WARNING
Definition nvnmos.h:207
@ NVNMOS_LOG_ERROR
Definition nvnmos.h:209
@ NVNMOS_LOG_VERBOSE
Definition nvnmos.h:203
@ NVNMOS_LOG_FATAL
Definition nvnmos.h:213
@ NVNMOS_LOG_INFO
Definition nvnmos.h:205
@ NVNMOS_TRANSPORT_RTP
Definition nvnmos.h:120
@ NVNMOS_TRANSPORT_MXL
Definition nvnmos.h:124
@ NVNMOS_SIDE_RECEIVER
Definition nvnmos.h:140
@ NVNMOS_SIDE_SENDER
Definition nvnmos.h:138
Definition nvnmos.h:309
const char * manufacturer
Definition nvnmos.h:311
const char * instance_id
Definition nvnmos.h:316
const char * product
Definition nvnmos.h:313
unsigned int num_functions
Definition nvnmos.h:321
const char ** functions
Definition nvnmos.h:319
Definition nvnmos.h:437
const char * system_address
Definition nvnmos.h:458
unsigned int registration_port
Definition nvnmos.h:449
const char * domain
Definition nvnmos.h:440
const char * registration_version
Definition nvnmos.h:453
unsigned int system_port
Definition nvnmos.h:462
const char * registration_address
Definition nvnmos.h:445
const char * system_version
Definition nvnmos.h:466
Definition nvnmos.h:243
NvNmosSenderConfig * senders
Definition nvnmos.h:280
nmos_connection_activation_callback connection_activated
Definition nvnmos.h:286
int log_level
Definition nvnmos.h:292
unsigned int num_host_addresses
Definition nvnmos.h:254
unsigned int http_port
Definition nvnmos.h:257
const char * seed
Definition nvnmos.h:271
const char ** host_addresses
Definition nvnmos.h:252
NvNmosReceiverConfig * receivers
Definition nvnmos.h:275
const char * description
Definition nvnmos.h:264
const char * label
Definition nvnmos.h:261
unsigned int num_senders
Definition nvnmos.h:282
const char * host_name
Definition nvnmos.h:247
nmos_logging_callback log_callback
Definition nvnmos.h:289
unsigned int num_log_categories
Definition nvnmos.h:297
unsigned int num_receivers
Definition nvnmos.h:277
const char ** log_categories
Definition nvnmos.h:295
NvNmosAssetConfig * asset_tags
Definition nvnmos.h:267
NvNmosNetworkServicesConfig * network_services
Definition nvnmos.h:301
Definition nvnmos.h:475
void * impl
Definition nvnmos.h:485
void * user_data
Definition nvnmos.h:481
Definition nvnmos.h:329
NvNmosTransport transport
Definition nvnmos.h:333
const char * transport_file
Definition nvnmos.h:377
Definition nvnmos.h:385
const char * transport_file
Definition nvnmos.h:429
NvNmosTransport transport
Definition nvnmos.h:389