Showing the changes to libavfilter (1 of 2 files). Show all
Unified · Split
| @@ -62,6 +62,8 @@ enum { · 61 unmodified lines | |||
| 62 | MODE_SIZE = 1 << 7, | 62 | MODE_SIZE = 1 << 7, |
| 63 | MODE_RATE = 1 << 8, | 63 | MODE_RATE = 1 << 8, |
| 64 | MODE_EOF = 1 << 9, | 64 | MODE_EOF = 1 << 9, |
| 65 | MODE_SCIN = 1 << 10, | ||
| 66 | MODE_SCOUT = 1 << 11, | ||
| 65 | }; | 67 | }; |
| 66 | 68 | ||
| 67 | #define OFFSET(x) offsetof(GraphMonitorContext, x) | 69 | #define OFFSET(x) offsetof(GraphMonitorContext, x) |
| @@ -88,6 +90,8 @@ static const AVOption graphmonitor_options[] = { · 20 unmodified lines | |||
| 88 | { "size", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_SIZE}, 0, 0, VF, "flags" }, | 90 | { "size", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_SIZE}, 0, 0, VF, "flags" }, |
| 89 | { "rate", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_RATE}, 0, 0, VF, "flags" }, | 91 | { "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" }, | 92 | { "eof", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_EOF}, 0, 0, VF, "flags" }, |
| 93 | { "sample_count_in", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_SCOUT}, 0, 0, VF, "flags" }, | ||
| 94 | { "sample_count_out", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_SCIN}, 0, 0, VF, "flags" }, | ||
| 91 | { "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF }, | 95 | { "rate", "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 }, | 96 | { "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF }, |
| 93 | { NULL } | 97 | { NULL } |
| @@ -229,6 +233,16 @@ static void draw_items(AVFilterContext *ctx, AVFrame *out, · 135 unmodified lines | |||
| 229 | drawtext(out, xpos, ypos, buffer, s->white); | 233 | drawtext(out, xpos, ypos, buffer, s->white); |
| 230 | xpos += strlen(buffer) * 8; | 234 | xpos += strlen(buffer) * 8; |
| 231 | } | 235 | } |
| 236 | if (s->flags & MODE_SCIN) { | ||
| 237 | snprintf(buffer, sizeof(buffer)-1, " | sin: %"PRId64, l->sample_count_in); | ||
| 238 | drawtext(out, xpos, ypos, buffer, s->white); | ||
| 239 | xpos += strlen(buffer) * 8; | ||
| 240 | } | ||
| 241 | if (s->flags & MODE_SCOUT) { | ||
| 242 | snprintf(buffer, sizeof(buffer)-1, " | sout: %"PRId64, l->sample_count_out); | ||
| 243 | drawtext(out, xpos, ypos, buffer, s->white); | ||
| 244 | xpos += strlen(buffer) * 8; | ||
| 245 | } | ||
| 232 | if (s->flags & MODE_PTS) { | 246 | if (s->flags & MODE_PTS) { |
| 233 | snprintf(buffer, sizeof(buffer)-1, " | pts: %s", av_ts2str(l->current_pts_us)); | 247 | snprintf(buffer, sizeof(buffer)-1, " | pts: %s", av_ts2str(l->current_pts_us)); |
| 234 | drawtext(out, xpos, ypos, buffer, s->white); | 248 | drawtext(out, xpos, ypos, buffer, s->white); |