|
NvNmos
|
Classes | |
| struct | _NvNmosNodeConfig |
| struct | _NvNmosAssetConfig |
| struct | _NvNmosReceiverConfig |
| struct | _NvNmosSenderConfig |
| struct | _NvNmosNetworkServicesConfig |
| struct | _NvNmosNodeServer |
Macros | |
| #define | NVNMOS_API |
| #define | NVNMOS_ID_LEN 37 |
Typedefs | |
| typedef struct _NvNmosNodeServer | NvNmosNodeServer |
| typedef enum _NvNmosTransport | NvNmosTransport |
| typedef enum _NvNmosSide | NvNmosSide |
| typedef bool(* | nmos_connection_activation_callback) (NvNmosNodeServer *server, NvNmosSide side, const char *name, const char *transport_file) |
| typedef void(* | nmos_logging_callback) (NvNmosNodeServer *server, const char *categories, int level, const char *message) |
| typedef struct _NvNmosAssetConfig | NvNmosAssetConfig |
| typedef struct _NvNmosReceiverConfig | NvNmosReceiverConfig |
| typedef struct _NvNmosSenderConfig | NvNmosSenderConfig |
| typedef struct _NvNmosNetworkServicesConfig | NvNmosNetworkServicesConfig |
| typedef struct _NvNmosNodeConfig | NvNmosNodeConfig |
Enumerations | |
| enum | _NvNmosTransport { NVNMOS_TRANSPORT_RTP = 0 , NVNMOS_TRANSPORT_MXL = 1 } |
| enum | _NvNmosSide { NVNMOS_SIDE_SENDER = 0 , NVNMOS_SIDE_RECEIVER = 1 } |
| enum | { NVNMOS_LOG_DEVEL = -40 , NVNMOS_LOG_VERBOSE = -10 , NVNMOS_LOG_INFO = 0 , NVNMOS_LOG_WARNING = 10 , NVNMOS_LOG_ERROR = 20 , NVNMOS_LOG_SEVERE = 30 , NVNMOS_LOG_FATAL = 40 } |
Functions | |
| NVNMOS_API bool | create_nmos_node_server (const NvNmosNodeConfig *config, NvNmosNodeServer *server) |
| NVNMOS_API bool | destroy_nmos_node_server (NvNmosNodeServer *server) |
| NVNMOS_API bool | add_nmos_receiver_to_node_server (NvNmosNodeServer *server, const NvNmosReceiverConfig *config) |
| NVNMOS_API bool | remove_nmos_receiver_from_node_server (NvNmosNodeServer *server, const char *receiver_name) |
| NVNMOS_API bool | add_nmos_sender_to_node_server (NvNmosNodeServer *server, const NvNmosSenderConfig *config) |
| NVNMOS_API bool | remove_nmos_sender_from_node_server (NvNmosNodeServer *server, const char *sender_name) |
| 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 | 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 | nmos_get_node_id (const NvNmosNodeServer *server, char *out, size_t out_len) |
| NVNMOS_API bool | nmos_get_sender_id (const NvNmosNodeServer *server, const char *sender_name, char *out, size_t out_len) |
| NVNMOS_API bool | nmos_get_receiver_id (const NvNmosNodeServer *server, const char *receiver_name, char *out, size_t out_len) |
Defines the NVIDIA NMOS utility library (NvNmos) API.
The NvNmos utility library provides the APIs to create, destroy and internally manage an NMOS Node for a Media Node application.
The library can automatically discover and register with an NMOS Registry on the network using the AMWA IS-04 Registration API.
The library provides callbacks for NMOS events such as AMWA IS-05 Connection API requests from an NMOS Controller. These callbacks can be used to update running DeepStream pipelines with new transport parameters, for example.
NvNmos currently supports Senders and Receivers for video, audio, and ancillary data flows over RTP (i.e., SMPTE ST 2110-20, -22, -30, and -40 streams) and over the Media eXchange Layer (MXL).
The NvNmos library supports the following specifications, using the Sony nmos-cpp implementation:
| #define NVNMOS_ID_LEN 37 |
Buffer size, in bytes, that is always sufficient to hold an NMOS resource id (a UUID in canonical 8-4-4-4-12 hex form) including the terminating null character. Callers may pass buffers of this size or larger to the id accessor functions defined below.
| typedef bool(* nmos_connection_activation_callback) (NvNmosNodeServer *server, NvNmosSide side, const char *name, const char *transport_file) |
Type for a callback from NvNmos library when an IS-05 Connection API activation occurs.
| [in] | server | A pointer to the server issuing the callback. |
| [in] | side | Whether the activation is for a Sender or a Receiver. |
| [in] | name | The caller-chosen name for the sender or receiver to be activated or deactivated. This is the same name originally supplied via the configuration's transport file (see NvNmosSenderConfig::transport_file and NvNmosReceiverConfig::transport_file). Unique for the given side on the Node. |
| [in] | transport_file | The updated transport file data for the sender or receiver, or a null pointer when the sender or receiver is being deactivated. |
For an RTP sender or receiver this is an SDP file. The 'inactive' media-level attribute is used to indicate a disabled leg. The 'x-nvnmos-name' session-level attribute specifies the name of the sender or receiver, name. For a receiver, the 'x-nvnmos-iface-ip' media-level attribute is used to specify the interface IP address on which the stream is received. For a sender, the 'x-nvnmos-src-port' media-level attribute is used to specify the source port from which the stream is transmitted.
For an MXL sender or receiver this is an MXL flow definition (JSON). The 'urn:x-nvnmos:tag:name' tag in the 'tags' property specifies the name of the sender or receiver, name; the 'mxl_domain_id' and 'mxl_flow_id' IS-05 transport parameters are reflected in the 'urn:x-nvnmos:tag:mxl-domain-id' tag (also in 'tags') and the JSON document's top-level 'id' field respectively. The application is expected to dispatch on (side, name) (both of which it specified) to determine the transport, if needed.
| typedef void(* nmos_logging_callback) (NvNmosNodeServer *server, const char *categories, int level, const char *message) |
Type for a callback from NvNmos library for log messages.
| [in] | server | A pointer to the server issuing the callback. |
| [in] | categories | A comma separated list of topics, indicating e.g. the submodule originating the log message. |
| [in] | level | The severity/verbosity level. Values greater than zero are warnings and errors. Values less than zero are debugging or trace messages. |
| [in] | message | The message itself. |
| typedef struct _NvNmosAssetConfig NvNmosAssetConfig |
Defines asset distinguishing information for BCP-002-02 tags in an NvNmosNodeServer.
| typedef struct _NvNmosNetworkServicesConfig NvNmosNetworkServicesConfig |
Defines configuration settings for network services to use in an NvNmosNodeServer. The structure should be zero initialized.
| typedef struct _NvNmosNodeConfig NvNmosNodeConfig |
Defines configuration settings used to create an NvNmosNodeServer. The structure should be zero initialized.
| typedef struct _NvNmosNodeServer NvNmosNodeServer |
Holds the implementation details of a running NvNmos server. The structure should be zero initialized, with the possible exception of the user_data member.
| typedef struct _NvNmosReceiverConfig NvNmosReceiverConfig |
Defines configuration settings used to create receivers in an NvNmosNodeServer.
| typedef struct _NvNmosSenderConfig NvNmosSenderConfig |
Defines configuration settings used to create senders in an NvNmosNodeServer.
| typedef enum _NvNmosSide NvNmosSide |
Identifies a resource as either a Sender or a Receiver. Used by nmos_connection_activate and nmos_connection_activation_callback to disambiguate a name that may be shared between a Sender and a Receiver on the same Node (caller-chosen names are unique within a given side on a Node, but a Sender and a Receiver are permitted to use the same name).
| typedef enum _NvNmosTransport NvNmosTransport |
Identifies the transport used by an NvNmos Sender or Receiver. Stored in NvNmosSenderConfig::transport and NvNmosReceiverConfig::transport, it corresponds to the base URN of the transport of the NMOS Sender or Receiver resource.
| anonymous enum |
Defines some common severity/logging levels for log messages from the NvNmos library.
| enum _NvNmosSide |
Identifies a resource as either a Sender or a Receiver. Used by nmos_connection_activate and nmos_connection_activation_callback to disambiguate a name that may be shared between a Sender and a Receiver on the same Node (caller-chosen names are unique within a given side on a Node, but a Sender and a Receiver are permitted to use the same name).
| Enumerator | |
|---|---|
| NVNMOS_SIDE_SENDER | An NMOS Sender. |
| NVNMOS_SIDE_RECEIVER | An NMOS Receiver. |
| enum _NvNmosTransport |
Identifies the transport used by an NvNmos Sender or Receiver. Stored in NvNmosSenderConfig::transport and NvNmosReceiverConfig::transport, it corresponds to the base URN of the transport of the NMOS Sender or Receiver resource.
| NVNMOS_API bool add_nmos_receiver_to_node_server | ( | NvNmosNodeServer * | server, |
| const NvNmosReceiverConfig * | config | ||
| ) |
Add an NMOS Receiver to an NMOS Node server according to the specified configuration settings.
The receiver may be removed using remove_nmos_receiver_from_node_server.
| [in] | server | Pointer to the server to update. |
| [in] | config | Pointer to the configuration settings. |
| NVNMOS_API bool add_nmos_sender_to_node_server | ( | NvNmosNodeServer * | server, |
| const NvNmosSenderConfig * | config | ||
| ) |
Add an NMOS Sender to an NMOS Node server according to the specified configuration settings.
The sender may be removed using remove_nmos_sender_from_node_server.
| [in] | server | Pointer to the server to update. |
| [in] | config | Pointer to the configuration settings. |
| NVNMOS_API bool create_nmos_node_server | ( | const NvNmosNodeConfig * | config, |
| NvNmosNodeServer * | server | ||
| ) |
Initialize and start an NMOS Node server according to the specified configuration settings.
The server should be deinitialized using destroy_nmos_node_server.
| [in] | config | Pointer to the configuration settings. |
| [in] | server | Pointer to the server to be initialized. |
| NVNMOS_API bool destroy_nmos_node_server | ( | NvNmosNodeServer * | server | ) |
Stop and deinitialize an NMOS Node server.
The server should have been successfully initialized using create_nmos_node_server.
| [in] | server | Pointer to the server to be deinitialized. |
| NVNMOS_API bool nmos_connection_activate | ( | NvNmosNodeServer * | server, |
| NvNmosSide | side, | ||
| const char * | name, | ||
| const char * | transport_file | ||
| ) |
Report that a sender or receiver has been activated or deactivated out of band.
Used when the application's data plane has activated (or deactivated) a sender or receiver by some means other than an IS-05 Connection API patch, so that the IS-04 Node API and IS-05 Connection API model can be updated to reflect the new state. The library does not initiate any activation on the application's behalf.
The application's nmos_connection_activation_callback is not invoked as a result of this call.
| [in] | server | A pointer to the server to be updated. |
| [in] | side | Whether the sender or receiver is a Sender or a Receiver. |
| [in] | name | The caller-chosen name of the sender or receiver whose state has changed. The transport is inferred from the existing sender or receiver of side with this name. |
| [in] | transport_file | The new transport file data reflecting the active state of the sender or receiver, or a null pointer when the sender or receiver has been deactivated. The new data only updates the transport parameters of the sender or receiver, not the media format. See NvNmosSenderConfig::transport_file and NvNmosReceiverConfig::transport_file for the recognised format (SDP for RTP, MXL flow definition JSON for MXL) and the supported NvNmos extensions. |
| NVNMOS_API bool nmos_get_node_id | ( | const NvNmosNodeServer * | server, |
| char * | out, | ||
| size_t | out_len | ||
| ) |
Get the NMOS Node resource id (the '/self' UUID) of a running NvNmosNodeServer.
| [in] | server | Pointer to a server previously initialised by create_nmos_node_server. |
| [out] | out | Buffer to receive the id. |
| [in] | out_len | Size of out, at least NVNMOS_ID_LEN. |
out. | NVNMOS_API bool nmos_get_receiver_id | ( | const NvNmosNodeServer * | server, |
| const char * | receiver_name, | ||
| char * | out, | ||
| size_t | out_len | ||
| ) |
Get the NMOS Receiver resource id of a receiver currently registered with the specified server.
Looks the receiver up by its name. Returns false (without writing to out) if no receiver with the given receiver_name has been added to the server.
| [in] | server | Pointer to the server. |
| [in] | receiver_name | The caller-chosen name of the receiver (see NvNmosReceiverConfig::transport_file). Must not be null. |
| [out] | out | Buffer to receive the id. |
| [in] | out_len | Size of out, at least NVNMOS_ID_LEN. |
out. | NVNMOS_API bool nmos_get_sender_id | ( | const NvNmosNodeServer * | server, |
| const char * | sender_name, | ||
| char * | out, | ||
| size_t | out_len | ||
| ) |
Get the NMOS Sender resource id of a sender currently registered with the specified server.
Looks the sender up by its name. Returns false (without writing to out) if no sender with the given sender_name has been added to the server.
| [in] | server | Pointer to the server. |
| [in] | sender_name | The caller-chosen name of the sender (see NvNmosSenderConfig::transport_file). Must not be null. |
| [out] | out | Buffer to receive the id. |
| [in] | out_len | Size of out, at least NVNMOS_ID_LEN. |
out. | NVNMOS_API bool nmos_make_node_id | ( | const char * | seed, |
| char * | out, | ||
| size_t | out_len | ||
| ) |
Compute the NMOS Node resource id (the '/self' UUID) that an NvNmosNodeServer created with the given seed will use.
Pure function of seed. The id is generated deterministically by the library, so calling this before create_nmos_node_server yields the same value as nmos_get_node_id on the resulting server. Useful for tooling that needs to pre-compute an id without standing up a server.
| [in] | seed | Seed string. Must not be null. The same string used in NvNmosNodeConfig::seed. |
| [out] | out | Buffer to receive the id as a null-terminated ASCII string in canonical UUID form. |
| [in] | out_len | Size of out in bytes. Must be at least NVNMOS_ID_LEN. |
out. | NVNMOS_API bool nmos_make_receiver_id | ( | const char * | seed, |
| const char * | receiver_name, | ||
| char * | out, | ||
| size_t | out_len | ||
| ) |
Compute the NMOS Receiver resource id that an NvNmosNodeServer created with the given seed will use for the receiver with the given receiver_name.
Pure function of (seed, receiver_name). See nmos_make_node_id for the contract.
| [in] | seed | Seed string. Must not be null. |
| [in] | receiver_name | The caller-chosen name of the receiver (see NvNmosReceiverConfig::transport_file). Must not be null. |
| [out] | out | Buffer to receive the id. |
| [in] | out_len | Size of out, at least NVNMOS_ID_LEN. |
out. | NVNMOS_API bool nmos_make_sender_id | ( | const char * | seed, |
| const char * | sender_name, | ||
| char * | out, | ||
| size_t | out_len | ||
| ) |
Compute the NMOS Sender resource id that an NvNmosNodeServer created with the given seed will use for the sender with the given sender_name.
Pure function of (seed, sender_name). See nmos_make_node_id for the contract; the same notes apply.
| [in] | seed | Seed string. Must not be null. |
| [in] | sender_name | The caller-chosen name of the sender (see NvNmosSenderConfig::transport_file). Must not be null. |
| [out] | out | Buffer to receive the id. |
| [in] | out_len | Size of out, at least NVNMOS_ID_LEN. |
out. | NVNMOS_API bool remove_nmos_receiver_from_node_server | ( | NvNmosNodeServer * | server, |
| const char * | receiver_name | ||
| ) |
Remove an NMOS Receiver from an NMOS Node server.
The receiver may have been adding using create_nmos_node_server or add_nmos_receiver_to_node_server.
| [in] | server | Pointer to the server to update. |
| [in] | receiver_name | The caller-chosen name of the receiver to be removed (see NvNmosReceiverConfig::transport_file). |
| NVNMOS_API bool remove_nmos_sender_from_node_server | ( | NvNmosNodeServer * | server, |
| const char * | sender_name | ||
| ) |
Remove an NMOS Sender from an NMOS Node server.
The sender may have been adding using create_nmos_node_server or add_nmos_sender_to_node_server.
| [in] | server | Pointer to the server to update. |
| [in] | sender_name | The caller-chosen name of the sender to be removed (see NvNmosSenderConfig::transport_file). |