func av_rescale_q(time int64, src, trg Rational) int64 { var a C.AVRational = C.AVRational{C.int(src.Num), C.int(src.Den)} var b C.AVRational = C.AVRational{C.int(trg.Num), C.int(trg.Den)} cresult := C.av_rescale_q(C.int64_t(time), a, b) return int64(cresult) }
func (time *Timestamp) RescaleTo(base Rational) Timestamp { result := Timestamp{0, base} cresult := C.av_rescale_q(C.int64_t(time.Time), *time.Timebase.GetAVRational(), *base.GetAVRational()) result.Time = int64(cresult) return result }
func RescaleByRationals(a int64, bq, cq *Rational) int64 { return int64(C.av_rescale_q(C.int64_t(a), bq.CAVRational, cq.CAVRational)) }
func RescaleQ(a int64, encBase AVRational, stBase AVRational) int64 { return int64(C.av_rescale_q(C.int64_t(a), C.struct_AVRational(encBase), C.struct_AVRational(stBase))) }
func RescaleQ(a int, encBase AVRational, stBase AVRational) int { return int(C.av_rescale_q(C.int64_t(a), _Ctype_AVRational(encBase), _Ctype_AVRational(stBase))) }