summaryrefslogtreecommitdiff
path: root/libavutil/timecode.h
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-09-05 23:04:28 +0200
committerMarton Balint <cus@passwd.hu>2020-12-03 18:32:54 +0100
commiteca12f4d5a9231b0e6b71f55525518f104877ee6 (patch)
treeb52f3cd54e26eed79027977f2db57fe8c095ccbb /libavutil/timecode.h
parent2d90d51c561c2e4c36a00d1ba666adee5028663c (diff)
downloadffmpeg-eca12f4d5a9231b0e6b71f55525518f104877ee6.tar.gz
avutil/timecode: add av_timecode_init_from_components
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavutil/timecode.h')
-rw-r--r--libavutil/timecode.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavutil/timecode.h b/libavutil/timecode.h
index 697e61180b..060574a172 100644
--- a/libavutil/timecode.h
+++ b/libavutil/timecode.h
@@ -161,6 +161,23 @@ char *av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit);
int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx);
/**
+ * Init a timecode struct from the passed timecode components.
+ *
+ * @param log_ctx a pointer to an arbitrary struct of which the first field
+ * is a pointer to an AVClass struct (used for av_log)
+ * @param tc pointer to an allocated AVTimecode
+ * @param rate frame rate in rational form
+ * @param flags miscellaneous flags such as drop frame, +24 hours, ...
+ * (see AVTimecodeFlag)
+ * @param hh hours
+ * @param mm minutes
+ * @param ss seconds
+ * @param ff frames
+ * @return 0 on success, AVERROR otherwise
+ */
+int av_timecode_init_from_components(AVTimecode *tc, AVRational rate, int flags, int hh, int mm, int ss, int ff, void *log_ctx);
+
+/**
* Parse timecode representation (hh:mm:ss[:;.]ff).
*
* @param log_ctx a pointer to an arbitrary struct of which the first field is a