Skip to content

Commit 93da71e

Browse files
committed
vcomp/cineform: pretty-print help
1 parent 258414b commit 93da71e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/video_compress/cineform.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
#include "tv.h" // for get_time_in_ns
7272
#include "types.h" // for video_desc, tile, video_frame, UYVY, RGB
7373
#include "utils/macros.h" // for TOSTRING, to_fourcc
74+
#include "utils/color_out.h" // for color_printf
7475
#include "video_codec.h" // for vc_get_linesize, get_codec_name
7576
#include "video_compress.h" // for codec, module_option, encoder, compres...
7677
#include "video_frame.h" // for vf_free, vf_alloc_desc_data, vf_copy_m...
@@ -135,12 +136,18 @@ struct {
135136
};
136137

137138
static void usage() {
138-
printf("Cineform encoder usage:\n");
139-
printf("\t-c cineform[:quality=<quality>][:threads=<num_threads>][:pool_size=<pool_size>]\n");
139+
color_printf(TBOLD("Cineform") " encoder usage:\n");
140+
color_printf("\t" TBOLD(
141+
TRED("-c cineform") "[:quality=<quality>][:threads=<num_threads>][:"
142+
"pool_size=<pool_size>]") "\n");
143+
color_printf("\t" TBOLD("-c cineform:help") "\n");
144+
145+
color_printf("\nOptions:\n");
140146

141147
for(const auto& opt : usage_opts){
142-
printf("\t\t<%s> %s\n", opt.key, opt.description);
148+
color_printf("\t" TBOLD("<%s>") " %s\n", opt.key, opt.description);
143149
}
150+
printf("\n");
144151
}
145152

146153
static int parse_fmt(struct state_video_compress_cineform *s, char *fmt) {

0 commit comments

Comments
 (0)