Lines Matching refs:rate
66 return av_timecode_get_smpte(tc->rate, drop, hh, mm, ss, ff);
69 uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss, int ff)
75 if (av_cmp_q(rate, (AVRational) {30, 1}) == 1) {
77 if (av_cmp_q(rate, (AVRational) {50, 1}) == 0)
138 char *av_timecode_make_smpte_tc_string2(char *buf, AVRational rate, uint32_t tcsmpte, int prevent_df, int skip_field)
146 if (av_cmp_q(rate, (AVRational) {30, 1}) == 1) {
149 if (av_cmp_q(rate, (AVRational) {50, 1}) == 0)
195 av_log(log_ctx, AV_LOG_ERROR, "Valid timecode frame rate must be specified. Minimum value is 1\n");
203 av_log(log_ctx, AV_LOG_WARNING, "Using non-standard frame rate %d/%d\n",
204 tc->rate.num, tc->rate.den);
209 static int fps_from_frame_rate(AVRational rate)
211 if (!rate.den || !rate.num)
213 return (rate.num + rate.den/2) / rate.den;
216 int av_timecode_check_frame_rate(AVRational rate)
218 return check_fps(fps_from_frame_rate(rate));
221 int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx)
226 tc->rate = rate;
227 tc->fps = fps_from_frame_rate(rate);
231 int av_timecode_init_from_components(AVTimecode *tc, AVRational rate, int flags, int hh, int mm, int ss, int ff, void *log_ctx)
237 tc->rate = rate;
238 tc->fps = fps_from_frame_rate(rate);
252 int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx)
264 return av_timecode_init_from_components(tc, rate, flags, hh, mm, ss, ff, log_ctx);