diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-19 18:44:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-19 19:23:37 +0200 |
commit | 72a242c99832b9ef312222ac9181634f14963107 (patch) | |
tree | 8adc3da12c6b1fc9b7db909efec365111cc99582 /libswresample/swresample.h | |
parent | f88f705abcb925cede3ffa392156489956e8c0b9 (diff) | |
download | ffmpeg-72a242c99832b9ef312222ac9181634f14963107.tar.gz |
swr: add swr_next_pts()
parameter descriptions partly reuse text from af_asyncts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.h')
-rw-r--r-- | libswresample/swresample.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libswresample/swresample.h b/libswresample/swresample.h index e027f5619c..85a337abbe 100644 --- a/libswresample/swresample.h +++ b/libswresample/swresample.h @@ -30,7 +30,7 @@ #include "libavutil/samplefmt.h" #define LIBSWRESAMPLE_VERSION_MAJOR 0 -#define LIBSWRESAMPLE_VERSION_MINOR 14 +#define LIBSWRESAMPLE_VERSION_MINOR 15 #define LIBSWRESAMPLE_VERSION_MICRO 100 #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ @@ -133,6 +133,21 @@ int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in , int in_count); /** + * Convert the next timestamp from input to output + * timestampe are in 1/(in_sample_rate * out_sample_rate) units. + * + * @note There are 2 slightly differently behaving modes. + * First is when automatic timestamp compensation is not used, (min_compensation >= FLT_MAX) + * in this case timestamps will be passed through with delays compensated + * Second is when automatic timestamp compensation is used, (min_compensation < FLT_MAX) + * in this case the output timestamps will match output sample numbers + * + * @param pts timstamp for the next input sample, INT64_MIN if unknown + * @returns the output timestamp for the next output sample + */ +int64_t swr_next_pts(struct SwrContext *s, int64_t pts); + +/** * Activate resampling compensation. */ int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance); |