Global: improve support of --help *-format

Also fix some bugs found when refactoring
This commit is contained in:
李通洲
2023-10-07 13:40:40 +08:00
parent 23d2cc3fdc
commit 12208b2c7c
113 changed files with 746 additions and 557 deletions
+11 -1
View File
@@ -75,7 +75,7 @@ void ffPrintPlayer(FFPlayerOptions* options)
void ffInitPlayerOptions(FFPlayerOptions* options)
{
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_PLAYER_MODULE_NAME, ffParsePlayerCommandOptions, ffParsePlayerJsonObject, ffPrintPlayer, ffGeneratePlayerJson);
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_PLAYER_MODULE_NAME, ffParsePlayerCommandOptions, ffParsePlayerJsonObject, ffPrintPlayer, ffGeneratePlayerJson, ffPrintPlayerHelpFormat);
ffOptionInitModuleArg(&options->moduleArgs);
}
@@ -126,3 +126,13 @@ void ffGeneratePlayerJson(FF_MAYBE_UNUSED FFMediaOptions* options, yyjson_mut_do
yyjson_mut_obj_add_strbuf(doc, obj, "playerId", &media->playerId);
yyjson_mut_obj_add_strbuf(doc, obj, "url", &media->url);
}
void ffPrintPlayerHelpFormat(void)
{
ffPrintModuleFormatHelp(FF_PLAYER_MODULE_NAME, "{1}", FF_PLAYER_NUM_FORMAT_ARGS, (const char* []) {
"Pretty player name",
"Player name",
"Player Identifier",
"URL name"
});
}