コード例 #1
0
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)
}
コード例 #2
0
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
}
コード例 #3
0
ファイル: avutil.go プロジェクト: codesuki/go-libav
func RescaleByRationals(a int64, bq, cq *Rational) int64 {
	return int64(C.av_rescale_q(C.int64_t(a), bq.CAVRational, cq.CAVRational))
}
コード例 #4
0
ファイル: utils.go プロジェクト: jasonmoo/gmf
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)))
}
コード例 #5
0
ファイル: utils.go プロジェクト: 0x46616c6b/gmf
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)))
}