* Adjust frame number for NTSC drop frame time code.
*
* @param framenum frame number to adjust
- * @param fps frame per second, 30 or 60
+ * @param fps frame per second, multiples of 30
* @return adjusted frame number
- * @warning adjustment is only valid in NTSC 29.97 and 59.94
+ * @warning adjustment is only valid for multiples of NTSC 29.97
*/
int av_timecode_adjust_ntsc_framenum2(int framenum, int fps);
*/
char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum);
+/**
+ * Get the timecode string from the SMPTE timecode format.
+ *
+ * In contrast to av_timecode_make_smpte_tc_string this function supports 50/60
+ * fps timecodes by using the field bit.
+ *
+ * @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long
+ * @param rate frame rate of the timecode
+ * @param tcsmpte the 32-bit SMPTE timecode
+ * @param prevent_df prevent the use of a drop flag when it is known the DF bit
+ * is arbitrary
+ * @param skip_field prevent the use of a field flag when it is known the field
+ * bit is arbitrary (e.g. because it is used as PC flag)
+ * @return the buf parameter
+ */
+char *av_timecode_make_smpte_tc_string2(char *buf, AVRational rate, uint32_t tcsmpte, int prevent_df, int skip_field);
+
/**
* Get the timecode string from the SMPTE timecode format.
*
*/
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).
*