History

avfilter/f_graphmonitor: also show link EOF status in blue

Paul B Mahol committed 6 years ago

Commit e417f841 parent 57915df2 files · +12 −0Browse files

Showing the changes to libavfilter (1 of 2 files). Show all

Unified · Split

libavfilter/f_graphmonitor.c+9−0
@@ -47,6 +47,7 @@ typedef struct GraphMonitorContext { · 46 unmodified lines
47 uint8_t yellow[4];47 uint8_t yellow[4];
48 uint8_t red[4];48 uint8_t red[4];
49 uint8_t green[4];49 uint8_t green[4];
50 uint8_t blue[4];
50 uint8_t bg[4];51 uint8_t bg[4];
51} GraphMonitorContext;52} GraphMonitorContext;
52 53
@@ -60,6 +61,7 @@ enum { · 7 unmodified lines
60 MODE_FMT = 1 << 6,61 MODE_FMT = 1 << 6,
61 MODE_SIZE = 1 << 7,62 MODE_SIZE = 1 << 7,
62 MODE_RATE = 1 << 8,63 MODE_RATE = 1 << 8,
64 MODE_EOF = 1 << 9,
63};65};
64 66
65#define OFFSET(x) offsetof(GraphMonitorContext, x)67#define OFFSET(x) offsetof(GraphMonitorContext, x)
@@ -85,6 +87,7 @@ static const AVOption graphmonitor_options[] = { · 19 unmodified lines
85 { "format", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_FMT}, 0, 0, VF, "flags" },87 { "format", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_FMT}, 0, 0, VF, "flags" },
86 { "size", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_SIZE}, 0, 0, VF, "flags" },88 { "size", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_SIZE}, 0, 0, VF, "flags" },
87 { "rate", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_RATE}, 0, 0, VF, "flags" },89 { "rate", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_RATE}, 0, 0, VF, "flags" },
90 { "eof", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_EOF}, 0, 0, VF, "flags" },
88 { "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF },91 { "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF },
89 { "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF },92 { "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF },
90 { NULL }93 { NULL }
@@ -236,6 +239,11 @@ static void draw_items(AVFilterContext *ctx, AVFrame *out, · 145 unmodified lines
236 drawtext(out, xpos, ypos, buffer, s->white);239 drawtext(out, xpos, ypos, buffer, s->white);
237 xpos += strlen(buffer) * 8;240 xpos += strlen(buffer) * 8;
238 }241 }
242 if (s->flags & MODE_EOF && ff_outlink_get_status(l)) {
243 snprintf(buffer, sizeof(buffer)-1, " | eof");
244 drawtext(out, xpos, ypos, buffer, s->blue);
245 xpos += strlen(buffer) * 8;
246 }
239}247}
240 248
241static int create_frame(AVFilterContext *ctx, int64_t pts)249static int create_frame(AVFilterContext *ctx, int64_t pts)
@@ -352,6 +360,7 @@ static int config_output(AVFilterLink *outlink) · 110 unmodified lines
352 s->yellow[0] = s->yellow[1] = 255;360 s->yellow[0] = s->yellow[1] = 255;
353 s->red[0] = 255;361 s->red[0] = 255;
354 s->green[1] = 255;362 s->green[1] = 255;
363 s->blue[2] = 255;
355 s->pts = AV_NOPTS_VALUE;364 s->pts = AV_NOPTS_VALUE;
356 s->next_pts = AV_NOPTS_VALUE;365 s->next_pts = AV_NOPTS_VALUE;
357 outlink->w = s->w;366 outlink->w = s->w;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t