-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SBC pod launcher JSON based configuration parser #40
base: main
Are you sure you want to change the base?
SBC pod launcher JSON based configuration parser #40
Conversation
903d39f
to
ed430bc
Compare
ed430bc
to
c24ffc0
Compare
c24ffc0
to
f79239e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building with ./compile.sh --unit_testing is resulting in missing include errors. Please investigate and resolve the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide a usage example demonstrating how to run the full pipeline, starting from the Dockerfile entrypoint (ffmpeg_wrapper_service)
f79239e
to
978ce19
Compare
This change doesn't affect the way of running the full pipeline. so from Dockerfile entrypoint still need just to run as it is in short words, the pipeline can run the same with and without this change. |
8ccaddb
to
039c41c
Compare
define expected json entries by their key name and assign a handling function for each. this gives a flexibility for either update the key table or the function that handles the entry. Signed-off-by: Aly, Walid <[email protected]>
parsing functions - ffmpeg json based config parser add the CMakeLists.txt for building the parser. Signed-off-by: Aly, Walid <[email protected]>
ffmpeg json based config parser - integrate to service class the call to the parsing function here isn't the best option but this can be considered when the final idea about the service is setteled. however, it's required to defined the configuration file path as a environment variable. Signed-off-by: Aly, Walid <[email protected]>
039c41c
to
9465564
Compare
Description :
Prerequisite :
before launching the pod service, an environment variable
CONFIG_FILE
is expected to be set to hold the absolute path for the json configuration file i.e/tmp/config.json
Functionality :
1 - Reading the Configuration File:
It opens and reads the content of the specified JSON configuration file.
2- Parsing the JSON Configuration:
It extracts the appParams section from the ffmpegPipelineDefinition object within the JSON structure.
3 - Processing Configuration Parameters:
The application defines a set of handler functions to process specific keys in the appParams section.
Each handler function prints the key and value, performs any necessary processing, and returns a formatted string in the format "-key value".
The handleKeyValue function handles generic key-value pairs, while the handleFrameRate function specifically handles the frame_rate key by calculating the frame rate from its numerator and denominator values.
4 - Constructing the Command String:
6 - Error Handling:
Compilation and usage :
it compiles as part of the whole cmake project in gRPC folder. so just compiling gRPC service will be enough for compilation and linking :
./compile.sh
Example JSON file :