From: Matthieu Bouron Date: Thu, 23 Jun 2016 20:02:31 +0000 (+0200) Subject: Merge commit 'e1eb0fc960163402bbb4e630185790488f7d28ed' X-Git-Tag: n3.1~59 X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/b1e1da52fe2e7320363fdaa0cdd276847e25bf53 Merge commit 'e1eb0fc960163402bbb4e630185790488f7d28ed' * commit 'e1eb0fc960163402bbb4e630185790488f7d28ed': movenc: Use packets in interleaving queues for the duration at the end of fragments Merged-by: Matthieu Bouron --- b1e1da52fe2e7320363fdaa0cdd276847e25bf53 diff --cc libavformat/internal.h index 99015271b6,bbdfd2f719..6b7f677950 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@@ -568,56 -441,14 +568,66 @@@ int ffio_open2_wrapper(struct AVFormatC */ void ff_format_io_close(AVFormatContext *s, AVIOContext **pb); +/** + * Parse creation_time in AVFormatContext metadata if exists and warn if the + * parsing fails. + * + * @param s AVFormatContext + * @param timestamp parsed timestamp in microseconds, only set on successful parsing + * @param return_seconds set this to get the number of seconds in timestamp instead of microseconds + * @return 1 if OK, 0 if the metadata was not present, AVERROR(EINVAL) on parse error + */ +int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds); + +/** + * Standardize creation_time metadata in AVFormatContext to an ISO-8601 + * timestamp string. + * + * @param s AVFormatContext + * @return <0 on error + */ +int ff_standardize_creation_time(AVFormatContext *s); + +#define CONTAINS_PAL 2 +/** + * Reshuffles the lines to use the user specified stride. + * + * @param ppkt input and output packet + * @return negative error code or + * 0 if no new packet was allocated + * non-zero if a new packet was allocated and ppkt has to be freed + * CONTAINS_PAL if in addition to a new packet the old contained a palette + */ +int ff_reshuffle_raw_rgb(AVFormatContext *s, AVPacket **ppkt, AVCodecParameters *par, int expected_stride); + +/** + * Retrieves the palette from a packet, either from side data, or + * appended to the video data in the packet itself (raw video only). + * It is commonly used after a call to ff_reshuffle_raw_rgb(). + * + * Use 0 for the ret parameter to check for side data only. + * + * @param pkt pointer to packet before calling ff_reshuffle_raw_rgb() + * @param ret return value from ff_reshuffle_raw_rgb(), or 0 + * @param palette pointer to palette buffer + * @return negative error code or + * 1 if the packet has a palette, else 0 + */ +int ff_get_packet_palette(AVFormatContext *s, AVPacket *pkt, int ret, uint32_t *palette); + +/** + * Finalize buf into extradata and set its size appropriately. + */ +int ff_bprint_to_codecpar_extradata(AVCodecParameters *par, struct AVBPrint *buf); + + /** + * Find the next packet in the interleaving queue for the given stream. + * The packet is not removed from the interleaving queue, but only + * a pointer to it is returned. + * + * @return a pointer to the next packet, or NULL if no packet is queued + * for this stream. + */ + const AVPacket *ff_interleaved_peek(AVFormatContext *s, int stream); + #endif /* AVFORMAT_INTERNAL_H */ diff --cc libavformat/movenc.h index 1090085a5a,6c922fb5df..c4fded89bb --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@@ -115,9 -106,10 +115,10 @@@ typedef struct MOVTrack int64_t start_dts; int64_t start_cts; int64_t end_pts; + int end_reliable; int hint_track; ///< the track that hints this track, -1 if no hint track is set - int src_track; ///< the track that this hint track describes + int src_track; ///< the track that this hint (or tmcd) track describes AVFormatContext *rtp_ctx; ///< the format context for the hinting rtp muxer uint32_t prev_rtp_ts; int64_t cur_rtp_ts_unwrapped; diff --cc libavformat/version.h index 543afbb166,1e1105fe5c..544d4363eb --- a/libavformat/version.h +++ b/libavformat/version.h @@@ -29,11 -29,9 +29,11 @@@ #include "libavutil/version.h" -#define LIBAVFORMAT_VERSION_MAJOR 57 -#define LIBAVFORMAT_VERSION_MINOR 7 -#define LIBAVFORMAT_VERSION_MICRO 1 +// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) +// Also please add any ticket numbers that you belive might be affected here +#define LIBAVFORMAT_VERSION_MAJOR 57 +#define LIBAVFORMAT_VERSION_MINOR 40 - #define LIBAVFORMAT_VERSION_MICRO 100 ++#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \