NvMedia APIs and Thread Safety#
NvMedia APIs are not designed to be thread safe. It is the responsibility of the application to maintain thread safety. To ensure thread safety:
NvMedia components can be created and used in any thread, but the APIs cannot be used from different threads concurrently.
Different instances of the same component can be used in parallel from different threads. The same instance of a component should not be used from a different thread.
Encoders are designed to be fed from one thread and receive the encoded bitstream from another thread.