diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-02-13 12:01:11 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-02-21 10:27:20 +0100 |
commit | 8f592eb35f4ba42c8516fe296d75e7589edb0359 (patch) | |
tree | 24006c57d556eb935409eadf9e72884fef5c4d9a /fftools/ffmpeg.h | |
parent | 09438d6529978f636fdfa0bd2b96687aa771506d (diff) | |
download | ffmpeg-8f592eb35f4ba42c8516fe296d75e7589edb0359.tar.gz |
fftools/ffmpeg_filter: compute input trim start/end in demuxer
The computation is based on demuxer properties, so that is the more
appropriate place for it. Filter code just receives the desired
start time/duration.
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r-- | fftools/ffmpeg.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index c394f60962..ca9ffb08af 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -250,6 +250,11 @@ typedef struct OptionsContext { SpecifierOptList mux_stats_fmt; } OptionsContext; +typedef struct InputFilterOptions { + int64_t trim_start_us; + int64_t trim_end_us; +} InputFilterOptions; + typedef struct InputFilter { struct FilterGraph *graph; uint8_t *name; @@ -394,15 +399,12 @@ typedef struct InputFile { int64_t ts_offset; /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */ int64_t start_time; - int64_t recording_time; /* streams that ffmpeg is aware of; * there may be extra streams in ctx that are not mapped to an InputStream * if new streams appear dynamically during demuxing */ InputStream **streams; int nb_streams; - - int accurate_seek; } InputFile; enum forced_keyframes_const { @@ -790,7 +792,8 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch); void ifile_close(InputFile **f); int ist_output_add(InputStream *ist, OutputStream *ost); -int ist_filter_add(InputStream *ist, InputFilter *ifilter, int is_simple); +int ist_filter_add(InputStream *ist, InputFilter *ifilter, int is_simple, + InputFilterOptions *opts); /** * Find an unused input stream of given type. |