diff options
author | Clément Bœsch <clement@stupeflix.com> | 2016-09-09 17:38:21 +0300 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-09-14 10:57:55 +0300 |
commit | ae1dd0c9a61627169b9464ba56d3fea7ba19d4a1 (patch) | |
tree | 9396f19aff845bb8f401ace0f5adbff98d799e3a /libavformat/avformat.h | |
parent | 7f386bbe2a7976e39475360800c54c7484ac2719 (diff) |
lavf: add avformat_transfer_internal_stream_timing_info() and use it in ffmpeg
In lavf we have access to st->internal->avctx so it's a better place
than in ffmpeg*.c and will allow moving to codecpar.
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 43b225bb5a..21e505d2ae 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2895,6 +2895,29 @@ int av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt, AVBitStreamFilterContext *bsfc); #endif +enum AVTimebaseSource { + AVFMT_TBCF_AUTO = -1, + AVFMT_TBCF_DECODER, + AVFMT_TBCF_DEMUXER, +#if FF_API_R_FRAME_RATE + AVFMT_TBCF_R_FRAMERATE, +#endif +}; + +/** + * Transfer internal timing information from one stream to another. + * + * This function is useful when doing stream copy. + * + * @param ofmt target output format for ost + * @param ost output stream which needs timings copy and adjustments + * @param ist reference input stream to copy timings from + * @param copy_tb define from where the stream codec timebase needs to be imported + */ +int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, + AVStream *ost, const AVStream *ist, + enum AVTimebaseSource copy_tb); + /** * @} */ |