diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-06 16:40:53 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-10 07:30:31 +0200 |
commit | d78838414b8362a7aa7c27abacee1f6ca036199c (patch) | |
tree | 5685c2949db1ed148c3df2bb42952c0d8e7274e8 /libavformat/mux.h | |
parent | 533836b8e0e5693b3d3e8403666ce216687d51b3 (diff) |
avformat/utils: Move creation-time functions to mux_utils
Only used by muxers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mux.h')
-rw-r--r-- | libavformat/mux.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libavformat/mux.h b/libavformat/mux.h index c220738942..246101f0c8 100644 --- a/libavformat/mux.h +++ b/libavformat/mux.h @@ -103,4 +103,24 @@ enum AVWriteUncodedFrameFlags { */ int ff_format_shift_data(AVFormatContext *s, int64_t read_start, int shift_size); +/** + * 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); + #endif /* AVFORMAT_MUX_H */ |