NVIDIA DeepStream SDK API Reference

6.4 Release
Networked Media Open Specifications (NMOS) API

Detailed Description

Defines the DeepStream NMOS utility library (NvDsNmos) API.

The NvDsNmos utility library provides the APIs to create, destroy and internally manage an NMOS Node for a DeepStream 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.

NvDsNmos currently supports Senders and Receivers for uncompressed Video and Audio, i.e., SMPTE ST 2110-20 and SMPTE ST 2110-30 streams.

The NvDsNmos library supports the following specifications, using the Sony nmos-cpp implementation:

Data Structures

struct  _NvDsNmosNodeConfig
 Defines configuration settings used to create an NvDsNmosNodeServer. More...
 
struct  _NvDsNmosAssetConfig
 Defines asset distinguishing information for BCP-002-02 tags in an NvDsNmosNodeServer. More...
 
struct  _NvDsNmosReceiverConfig
 Defines configuration settings used to create receivers in an NvDsNmosNodeServer. More...
 
struct  _NvDsNmosSenderConfig
 Defines configuration settings used to create senders in an NvDsNmosNodeServer. More...
 
struct  _NvDsNmosNodeServer
 Holds the implementation details of a running NvDsNmos server. More...
 

Macros

#define NVDSNMOS_API
 

Typedefs

typedef struct _NvDsNmosNodeServer NvDsNmosNodeServer
 Holds the implementation details of a running NvDsNmos server. More...
 
typedef bool(* nmos_connection_rtp_activation_callback) (NvDsNmosNodeServer *server, const char *id, const char *sdp)
 Type for a callback from NvDsNmos library when an IS-05 Connection API activation occurs. More...
 
typedef void(* nmos_logging_callback) (NvDsNmosNodeServer *server, const char *categories, int level, const char *message)
 Type for a callback from NvDsNmos library for log messages. More...
 
typedef struct _NvDsNmosAssetConfig NvDsNmosAssetConfig
 Defines asset distinguishing information for BCP-002-02 tags in an NvDsNmosNodeServer. More...
 
typedef struct _NvDsNmosReceiverConfig NvDsNmosReceiverConfig
 Defines configuration settings used to create receivers in an NvDsNmosNodeServer. More...
 
typedef struct _NvDsNmosSenderConfig NvDsNmosSenderConfig
 Defines configuration settings used to create senders in an NvDsNmosNodeServer. More...
 
typedef struct _NvDsNmosNodeConfig NvDsNmosNodeConfig
 Defines configuration settings used to create an NvDsNmosNodeServer. More...
 

Enumerations

enum  {
  NVDSNMOS_LOG_DEVEL = -40,
  NVDSNMOS_LOG_VERBOSE = -10,
  NVDSNMOS_LOG_INFO = 0,
  NVDSNMOS_LOG_WARNING = 10,
  NVDSNMOS_LOG_ERROR = 20,
  NVDSNMOS_LOG_SEVERE = 30,
  NVDSNMOS_LOG_FATAL = 40
}
 Defines some common severity/logging levels for log messages from the NvDsNmos library. More...
 

Functions

NVDSNMOS_API bool create_nmos_node_server (const NvDsNmosNodeConfig *config, NvDsNmosNodeServer *server)
 Initialize and start an NMOS Node server according to the specified configuration settings. More...
 
NVDSNMOS_API bool destroy_nmos_node_server (NvDsNmosNodeServer *server)
 Stop and deinitialize an NMOS Node server. More...
 
NVDSNMOS_API bool add_nmos_receiver_to_node_server (NvDsNmosNodeServer *server, const NvDsNmosReceiverConfig *config)
 Add an NMOS Receiver to an NMOS Node server according to the specified configuration settings. More...
 
NVDSNMOS_API bool remove_nmos_receiver_from_node_server (NvDsNmosNodeServer *server, const char *id)
 Remove an NMOS Receiver from an NMOS Node server. More...
 
NVDSNMOS_API bool add_nmos_sender_to_node_server (NvDsNmosNodeServer *server, const NvDsNmosSenderConfig *config)
 Add an NMOS Sender to an NMOS Node server according to the specified configuration settings. More...
 
NVDSNMOS_API bool remove_nmos_sender_from_node_server (NvDsNmosNodeServer *server, const char *id)
 Remove an NMOS Sender from an NMOS Node server. More...
 
NVDSNMOS_API bool nmos_connection_rtp_activate (NvDsNmosNodeServer *server, const char *id, const char *sdp)
 Update the configuration settings of a sender or receiver. More...
 

Macro Definition Documentation

◆ NVDSNMOS_API

#define NVDSNMOS_API

Definition at line 76 of file nvdsnmos.h.

Typedef Documentation

◆ nmos_connection_rtp_activation_callback

typedef bool(* nmos_connection_rtp_activation_callback) (NvDsNmosNodeServer *server, const char *id, const char *sdp)

Type for a callback from NvDsNmos library when an IS-05 Connection API activation occurs.

Parameters
[in]serverA pointer to the server issuing the callback.
[in]idThe unique identifier for the sender or receiver to be activated or deactivated.
[in]sdpThe updated Session Description Protocol data for the sender or receiver, or a null pointer when the sender or receiver is being deactivated. The new data only updates the transport parameters of the sender or receiver, not the media format. The 'inactive' media-level attribute is used to indicate a disabled leg. The 'x-nvds-id' session-level attribute specifies the unique identifier for the sender or receiver, id. For a receiver, the 'x-nvds-iface-ip' media-level attribute is used to specify the interface IP address on which the stream is received. For a sender, the 'x-nvds-src-port' media-level attribute is used to specify the source port from which the stream is transmitted.
Returns
Whether the activation could be applied.

Definition at line 115 of file nvdsnmos.h.

◆ nmos_logging_callback

typedef void(* nmos_logging_callback) (NvDsNmosNodeServer *server, const char *categories, int level, const char *message)

Type for a callback from NvDsNmos library for log messages.

Parameters
[in]serverA pointer to the server issuing the callback.
[in]categoriesA comma separated list of topics, indicating e.g. the submodule originating the log message.
[in]levelThe severity/verbosity level. Values greater than zero are warnings and errors. Values less than zero are debugging or trace messages.
[in]messageThe message itself.

Definition at line 152 of file nvdsnmos.h.

◆ NvDsNmosAssetConfig

Defines asset distinguishing information for BCP-002-02 tags in an NvDsNmosNodeServer.

Definition at line 158 of file nvdsnmos.h.

◆ NvDsNmosNodeConfig

Defines configuration settings used to create an NvDsNmosNodeServer.

The structure should be zero initialized.

◆ NvDsNmosNodeServer

Holds the implementation details of a running NvDsNmos server.

The structure should be zero initialized, with the possible exception of the user_data member.

Definition at line 88 of file nvdsnmos.h.

◆ NvDsNmosReceiverConfig

Defines configuration settings used to create receivers in an NvDsNmosNodeServer.

Definition at line 159 of file nvdsnmos.h.

◆ NvDsNmosSenderConfig

Defines configuration settings used to create senders in an NvDsNmosNodeServer.

Definition at line 160 of file nvdsnmos.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Defines some common severity/logging levels for log messages from the NvDsNmos library.

Enumerator
NVDSNMOS_LOG_DEVEL 

Low level debugging information.

NVDSNMOS_LOG_VERBOSE 

Chatty messages such as detailed API request/response tracking.

NVDSNMOS_LOG_INFO 

Higher level information about expected API events.

NVDSNMOS_LOG_WARNING 

Minor problems that could be recovered automatically by the library.

NVDSNMOS_LOG_ERROR 

More serious recoverable errors such as rejected requests.

NVDSNMOS_LOG_SEVERE 

Errors which are unlikely to be recoverable without restarting the server.

NVDSNMOS_LOG_FATAL 

Errors which are likely to cause the server to immediately terminate.

Definition at line 124 of file nvdsnmos.h.

Function Documentation

◆ add_nmos_receiver_to_node_server()

NVDSNMOS_API bool add_nmos_receiver_to_node_server ( NvDsNmosNodeServer server,
const NvDsNmosReceiverConfig 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.

Parameters
[in]serverPointer to the server to update.
[in]configPointer to the configuration settings.
Returns
Whether the receiver has been successfully added.

◆ add_nmos_sender_to_node_server()

NVDSNMOS_API bool add_nmos_sender_to_node_server ( NvDsNmosNodeServer server,
const NvDsNmosSenderConfig 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.

Parameters
[in]serverPointer to the server to update.
[in]configPointer to the configuration settings.
Returns
Whether the sender has been successfully added.

◆ create_nmos_node_server()

NVDSNMOS_API bool create_nmos_node_server ( const NvDsNmosNodeConfig config,
NvDsNmosNodeServer server 
)

Initialize and start an NMOS Node server according to the specified configuration settings.

The server should be deinitialized using destroy_nmos_node_server.

Parameters
[in]configPointer to the configuration settings.
[in]serverPointer to the server to be initialized.
Returns
Whether the server has been created and successfully started.

◆ destroy_nmos_node_server()

NVDSNMOS_API bool destroy_nmos_node_server ( NvDsNmosNodeServer server)

Stop and deinitialize an NMOS Node server.

The server should have been successfully initialized using create_nmos_node_server.

Parameters
[in]serverPointer to the server to be deinitialized.
Returns
Whether the server has been successfully stopped and deinitialized.

◆ nmos_connection_rtp_activate()

NVDSNMOS_API bool nmos_connection_rtp_activate ( NvDsNmosNodeServer server,
const char *  id,
const char *  sdp 
)

Update the configuration settings of a sender or receiver.

Parameters
[in]serverA pointer to the server to be updated.
[in]idThe unique identifier for the sender or receiver to be activated or deactivated.
[in]sdpThe updated Session Description Protocol data for the sender or receiver, or a null pointer when the sender or receiver is being deactivated. The new data only updates the transport parameters of the sender or receiver, not the media format. The 'inactive' media-level attribute is used to indicate a disabled leg. For a sender, the 'ts-refclk' attributes are used to specify the node clock. The 'x-nvds-id' session-level attribute specifies the unique identifier for the sender or receiver, id. For a receiver, the 'x-nvds-iface-ip' media-level attribute is used to specify the interface IP address on which the stream is received. For a sender, the 'x-nvds-src-port' media-level attribute is used to specify the source port from which the stream is transmitted.
Returns
Whether the update has been successfully applied.

◆ remove_nmos_receiver_from_node_server()

NVDSNMOS_API bool remove_nmos_receiver_from_node_server ( NvDsNmosNodeServer server,
const char *  id 
)

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.

Parameters
[in]serverPointer to the server to update.
[in]idThe unique identifier for the receiver to be removed.
Returns
Whether the receiver has been successfully removed.

◆ remove_nmos_sender_from_node_server()

NVDSNMOS_API bool remove_nmos_sender_from_node_server ( NvDsNmosNodeServer server,
const char *  id 
)

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.

Parameters
[in]serverPointer to the server to update.
[in]idThe unique identifier for the sender to be removed.
Returns
Whether the receiver has been successfully removed.