mirror of
https://github.com/qrtc/ffmpeg-dev-go.git
synced 2025-10-05 15:47:33 +08:00
2023-10-19 14:31:46 CST W42D4
This commit is contained in:
@@ -5,15 +5,15 @@ package ffmpeg
|
||||
*/
|
||||
import "C"
|
||||
|
||||
type AvRounding = C.enum_AVRounding
|
||||
type AVRounding = C.enum_AVRounding
|
||||
|
||||
const (
|
||||
AV_ROUND_ZERO = AvRounding(C.AV_ROUND_ZERO)
|
||||
AV_ROUND_INF = AvRounding(C.AV_ROUND_INF)
|
||||
AV_ROUND_DOWN = AvRounding(C.AV_ROUND_DOWN)
|
||||
AV_ROUND_UP = AvRounding(C.AV_ROUND_UP)
|
||||
AV_ROUND_NEAR_INF = AvRounding(C.AV_ROUND_NEAR_INF)
|
||||
AV_ROUND_PASS_MINMAX = AvRounding(C.AV_ROUND_PASS_MINMAX)
|
||||
AV_ROUND_ZERO = AVRounding(C.AV_ROUND_ZERO)
|
||||
AV_ROUND_INF = AVRounding(C.AV_ROUND_INF)
|
||||
AV_ROUND_DOWN = AVRounding(C.AV_ROUND_DOWN)
|
||||
AV_ROUND_UP = AVRounding(C.AV_ROUND_UP)
|
||||
AV_ROUND_NEAR_INF = AVRounding(C.AV_ROUND_NEAR_INF)
|
||||
AV_ROUND_PASS_MINMAX = AVRounding(C.AV_ROUND_PASS_MINMAX)
|
||||
)
|
||||
|
||||
// AvGcd computes the greatest common divisor of two integer operands.
|
||||
@@ -27,24 +27,24 @@ func AvRescale(a, b, c int64) int64 {
|
||||
}
|
||||
|
||||
// AvRescaleRnd rescales a 64-bit integer with specified rounding.
|
||||
func AvRescaleRnd(a, b, c int64, rnd AvRounding) int64 {
|
||||
func AvRescaleRnd(a, b, c int64, rnd AVRounding) int64 {
|
||||
return (int64)(C.av_rescale_rnd((C.int64_t)(a), (C.int64_t)(b), (C.int64_t)(c),
|
||||
(C.enum_AVRounding)(rnd)))
|
||||
}
|
||||
|
||||
// AvRescaleQ rescales a 64-bit integer by 2 rational numbers.
|
||||
func AvRescaleQ(a int64, bq, cq AvRational) int64 {
|
||||
func AvRescaleQ(a int64, bq, cq AVRational) int64 {
|
||||
return (int64)(C.av_rescale_q((C.int64_t)(a), (C.struct_AVRational)(bq), (C.struct_AVRational)(cq)))
|
||||
}
|
||||
|
||||
// AvRescaleQRnd rescales a 64-bit integer by 2 rational numbers with specified rounding.
|
||||
func AvRescaleQRnd(a int64, bq, cq AvRational, rnd AvRounding) int64 {
|
||||
func AvRescaleQRnd(a int64, bq, cq AVRational, rnd AVRounding) int64 {
|
||||
return (int64)(C.av_rescale_q_rnd((C.int64_t)(a), (C.struct_AVRational)(bq), (C.struct_AVRational)(cq),
|
||||
(C.enum_AVRounding)(rnd)))
|
||||
}
|
||||
|
||||
// AvCompareTs compares two timestamps each in its own time base.
|
||||
func AvCompareTs(tsA int64, tbA AvRational, tsB int64, tbB AvRational) int32 {
|
||||
func AvCompareTs(tsA int64, tbA AVRational, tsB int64, tbB AVRational) int32 {
|
||||
return (int32)(C.av_compare_ts((C.int64_t)(tsA), (C.struct_AVRational)(tbA),
|
||||
(C.int64_t)(tsB), (C.struct_AVRational)(tbB)))
|
||||
}
|
||||
@@ -55,8 +55,8 @@ func AvCompareMod(a, b, mod uint64) int64 {
|
||||
}
|
||||
|
||||
// AvRescaleDelta rescales a timestamp while preserving known durations.
|
||||
func AvRescaleDelta(inTb AvRational, inTs int64, fsTb AvRational,
|
||||
duration int32, last *int64, outTb AvRational) int64 {
|
||||
func AvRescaleDelta(inTb AVRational, inTs int64, fsTb AVRational,
|
||||
duration int32, last *int64, outTb AVRational) int64 {
|
||||
return (int64)(C.av_rescale_delta((C.struct_AVRational)(inTb),
|
||||
(C.int64_t)(inTs),
|
||||
(C.struct_AVRational)(fsTb),
|
||||
@@ -66,7 +66,7 @@ func AvRescaleDelta(inTb AvRational, inTs int64, fsTb AvRational,
|
||||
}
|
||||
|
||||
// AvAddStable adds a value to a timestamp.
|
||||
func AvAddStable(tsTb AvRational, ts int64, incTb AvRational, inc int64) int32 {
|
||||
func AvAddStable(tsTb AVRational, ts int64, incTb AVRational, inc int64) int32 {
|
||||
return (int32)(C.av_add_stable((C.struct_AVRational)(tsTb), (C.int64_t)(ts),
|
||||
(C.struct_AVRational)(incTb), (C.int64_t)(inc)))
|
||||
}
|
||||
|
Reference in New Issue
Block a user