Message ID | MN2PR04MB5981991A876246674D0EBD8BBADE9@MN2PR04MB5981.namprd04.prod.outlook.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | [FFmpeg-devel,v2,1/2] avformat/utils: Add av_stream_get_codec_properties() | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
Quoting Soft Works (2021-09-19 00:08:18) > Signed-off-by: softworkz <softworkz@hotmail.com> > --- > doc/APIchanges | 3 +++ > libavformat/avformat.h | 9 +++++++++ > libavformat/utils.c | 5 +++++ > libavformat/version.h | 2 +- > 4 files changed, 18 insertions(+), 1 deletion(-) > > diff --git a/doc/APIchanges b/doc/APIchanges > index cf6105c99e..fee94ccadd 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -14,6 +14,9 @@ libavutil: 2021-04-27 > > API changes, most recent first: > > +2021-04-27 - xxxxxxxxxx - lavf 59.6.100 - avformat.h > + Add av_stream_get_codec_properties() > + > 2021-09-17 - xxxxxxxxxx - lavu 57.5.101 - buffer.h > Constified the input parameters in av_buffer_replace(), av_buffer_ref(), > and av_buffer_pool_buffer_get_opaque(). > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > index 3a5bc8a06d..89ed984d1d 100644 > --- a/libavformat/avformat.h > +++ b/libavformat/avformat.h > @@ -2763,6 +2763,15 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, > */ > AVRational av_stream_get_codec_timebase(const AVStream *st); > > +/** > + * Get the internal codec properties from a stream. This is a bad idea. We do not want to hardcode "internal codec properties" into the API.
diff --git a/doc/APIchanges b/doc/APIchanges index cf6105c99e..fee94ccadd 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,9 @@ libavutil: 2021-04-27 API changes, most recent first: +2021-04-27 - xxxxxxxxxx - lavf 59.6.100 - avformat.h + Add av_stream_get_codec_properties() + 2021-09-17 - xxxxxxxxxx - lavu 57.5.101 - buffer.h Constified the input parameters in av_buffer_replace(), av_buffer_ref(), and av_buffer_pool_buffer_get_opaque(). diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 3a5bc8a06d..89ed984d1d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2763,6 +2763,15 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, */ AVRational av_stream_get_codec_timebase(const AVStream *st); +/** + * Get the internal codec properties from a stream. + * + * See @ref AVCodecContext.properties. + * + * @param st input stream to extract the timebase from + */ +unsigned av_stream_get_codec_properties(const AVStream *st); + /** * @} */ diff --git a/libavformat/utils.c b/libavformat/utils.c index 2b6208e8dc..76d3b0c85e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1945,6 +1945,11 @@ AVRational av_stream_get_codec_timebase(const AVStream *st) return cffstream(st)->avctx->time_base; } +unsigned av_stream_get_codec_properties(const AVStream *st) +{ + return cffstream(st)->avctx->properties; +} + void ff_format_set_url(AVFormatContext *s, char *url) { av_assert0(url); diff --git a/libavformat/version.h b/libavformat/version.h index 13df244d97..d5dd22059b 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 59 -#define LIBAVFORMAT_VERSION_MINOR 5 +#define LIBAVFORMAT_VERSION_MINOR 6 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
Signed-off-by: softworkz <softworkz@hotmail.com> --- doc/APIchanges | 3 +++ libavformat/avformat.h | 9 +++++++++ libavformat/utils.c | 5 +++++ libavformat/version.h | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-)