Understand extensions folder
The nyra_packages/extension directory houses the extension modules, with each module implemented as an independent package in Python, Golang, or C++.
Typically, the folder name of an extension corresponds to the extension module's name. However, the exact module name can also be found within the manifest.json file located in the extension's folder. This module name is used in the addon property of the property.json configuration file.
Extension Common Files
manifest.json: This file defines the extension's metadata, including its name, version, properties, and supported APIs (e.g., data, audio_frame, video_frame).
property.json: This file specifies the default settings for the extension, outlining its initial configuration and default properties.
Python Extension
extension.py: This file serves as the core of the extension, housing its primary logic and implementation. It contains the main code that drives the extension's functionality.
requirements.txt: This file lists the Python dependencies essential for the extension to operate. When executing
task use, the dependencies specified here are automatically installed.
Golang Extension
_extension.go: This file encapsulates the core logic of the extension, implementing its primary functionality and serving as the central component of the codebase.
go.mod: This file defines the Go module for the extension, specifying the module's name and managing its dependencies, including versioning and compatibility.
C++ Extension
src/main.cc: This file serves as the primary implementation unit for the extension, containing its core logic and main functional entry point.
BUILD.gn: This file defines the build configuration for the extension, specifying the target name, build rules, and dependency graph required for compilation and linking.
Last updated