2023-10-29 08:11:29 CST W44D0

This commit is contained in:
aggresss
2023-10-29 08:11:29 +08:00
parent 7a0773ebf2
commit f00ecdba54
138 changed files with 2244 additions and 64 deletions

View File

@@ -1,3 +1,7 @@
// Copyright (c) 2023 QRTC. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package ffmpeg
/*
@@ -113,3 +117,16 @@ func VoidPointerPointer(a CVoidPointerPointer) *unsafe.Pointer {
}
return (*unsafe.Pointer)(unsafe.Pointer(reflect.ValueOf(a).Pointer()))
}
// CondExpr is Conditional Operator like Ternary Operator in the C world.
func CondExpr[T any](cond bool, x, y T) T {
if cond {
return x
}
return y
}
func PlusPlus[T Integer](x *T) T {
defer func() { *x++ }()
return *x
}