History

avfilter/avfilter: add sample_count_in and sample_count_out

Paul B Mahol committed 6 years ago

Commit c3178621 parent 82123e12 files · +7 −0Browse files

Unified · Split

2 files
  1. libavfilter/avfilter.c +2 −0
  2. libavfilter/avfilter.h +5 −0
libavfilter/avfilter.c+2−0
@@ -1013,6 +1013,7 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame) · 1012 unmodified lines
1013 1013
1014 link->frame_blocked_in = link->frame_wanted_out = 0;1014 link->frame_blocked_in = link->frame_wanted_out = 0;
1015 link->frame_count_in++;1015 link->frame_count_in++;
1016 link->sample_count_in += frame->nb_samples;
1016 filter_unblock(link->dst);1017 filter_unblock(link->dst);
1017 ret = ff_framequeue_add(&link->fifo, frame);1018 ret = ff_framequeue_add(&link->fifo, frame);
1018 if (ret < 0) {1019 if (ret < 0) {
@@ -1372,6 +1373,7 @@ static void consume_update(AVFilterLink *link, const AVFrame *frame) · 353 unmodified lines
1372 ff_inlink_process_commands(link, frame);1373 ff_inlink_process_commands(link, frame);
1373 link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame);1374 link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame);
1374 link->frame_count_out++;1375 link->frame_count_out++;
1376 link->sample_count_out += frame->nb_samples;
1375}1377}
1376 1378
1377int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)1379int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
libavfilter/avfilter.h+5−0
@@ -584,6 +584,11 @@ struct AVFilterLink { · 583 unmodified lines
584 */584 */
585 int64_t frame_count_in, frame_count_out;585 int64_t frame_count_in, frame_count_out;
586 586
587 /**
588 * Number of past samples sent through the link.
589 */
590 int64_t sample_count_in, sample_count_out;
591
587 /**592 /**
588 * A pointer to a FFFramePool struct.593 * A pointer to a FFFramePool struct.
589 */594 */

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