mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
ffprobe: rename print_{int,str}_f callbacks to print_{integer,string}.
Renamed for consistency. Also, since print_int() and print_str() are already defined as macros, the long name version is preferred.
This commit is contained in:
parent
3fdf519e4b
commit
5ad01decef
20
ffprobe.c
20
ffprobe.c
@ -139,8 +139,8 @@ struct writer {
|
|||||||
void (*print_section_end) (const char *, int);
|
void (*print_section_end) (const char *, int);
|
||||||
void (*print_header)(const char *);
|
void (*print_header)(const char *);
|
||||||
void (*print_footer)(const char *);
|
void (*print_footer)(const char *);
|
||||||
void (*print_int_f)(const char *, int);
|
void (*print_integer)(const char *, int);
|
||||||
void (*print_str_f)(const char *, const char *);
|
void (*print_string)(const char *, const char *);
|
||||||
void (*show_tags)(struct writer *w, AVDictionary *dict);
|
void (*show_tags)(struct writer *w, AVDictionary *dict);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ fail:
|
|||||||
|
|
||||||
#define print_fmt0(k, f, ...) do { \
|
#define print_fmt0(k, f, ...) do { \
|
||||||
if (fast_asprintf(&pbuf, f, __VA_ARGS__)) \
|
if (fast_asprintf(&pbuf, f, __VA_ARGS__)) \
|
||||||
w->print_str_f(k, pbuf.s); \
|
w->print_string(k, pbuf.s); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define print_fmt( k, f, ...) do { \
|
#define print_fmt( k, f, ...) do { \
|
||||||
if (w->item_sep) \
|
if (w->item_sep) \
|
||||||
@ -295,7 +295,7 @@ fail:
|
|||||||
print_fmt0(k, f, __VA_ARGS__); \
|
print_fmt0(k, f, __VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define print_int0(k, v) w->print_int_f(k, v)
|
#define print_int0(k, v) w->print_integer(k, v)
|
||||||
#define print_int( k, v) do { \
|
#define print_int( k, v) do { \
|
||||||
if (w->item_sep) \
|
if (w->item_sep) \
|
||||||
printf("%s", w->item_sep); \
|
printf("%s", w->item_sep); \
|
||||||
@ -522,12 +522,12 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define WRITER_FUNC(func) \
|
#define WRITER_FUNC(func) \
|
||||||
.print_header = func ## _print_header, \
|
.print_header = func ## _print_header, \
|
||||||
.print_footer = func ## _print_footer, \
|
.print_footer = func ## _print_footer, \
|
||||||
.print_int_f = func ## _print_int, \
|
.print_integer = func ## _print_int, \
|
||||||
.print_str_f = func ## _print_str, \
|
.print_string = func ## _print_str, \
|
||||||
.show_tags = func ## _show_tags
|
.show_tags = func ## _show_tags
|
||||||
|
|
||||||
static struct writer writers[] = {{
|
static struct writer writers[] = {{
|
||||||
.name = "default",
|
.name = "default",
|
||||||
|
Loading…
Reference in New Issue
Block a user