| 1 | /* |
| 2 | * Copyright 2026 LiveKit, Inc. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef JETSON_RUNTIME_LOADER_H_ |
| 18 | #define JETSON_RUNTIME_LOADER_H_ |
| 19 | |
| 20 | #ifdef __cplusplus |
| 21 | extern "C" { |
| 22 | #endif |
| 23 | |
| 24 | // dlopen callback used by the implib-generated lazy-loading stubs in |
| 25 | // src/lazy_load_deps_for/jetson (see --dlopen-callback in |
| 26 | // generate_implibs.sh). Also usable directly to load a Jetson userspace |
| 27 | // library by name. |
| 28 | void* lk_jetson_dlopen(const char* lib_name); |
| 29 | |
| 30 | // Returns non-zero when the Jetson multimedia userspace libraries |
| 31 | // (libnvbufsurface, libv4l2/libnvv4l2) can be loaded. Must be checked |
| 32 | // before calling into any MMAPI/NvBufSurface code path: those symbols |
| 33 | // are lazily bound and the process aborts if they are invoked while the |
| 34 | // libraries are absent. |
| 35 | int lk_jetson_runtime_libs_available(void); |
| 36 | |
| 37 | #ifdef __cplusplus |
| 38 | } // extern "C" |
| 39 | #endif |
| 40 | |
| 41 | #endif // JETSON_RUNTIME_LOADER_H_ |