mirror of
https://github.com/qrtc/ffmpeg-dev-go.git
synced 2025-10-05 15:47:33 +08:00
2023-10-24 21:24:55 CST W43D2
This commit is contained in:
25
avutil_display.go
Normal file
25
avutil_display.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package ffmpeg
|
||||
|
||||
/*
|
||||
#include <libavutil/display.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// AvDisplayRotationGet extracts the rotation component of the transformation matrix.
|
||||
func AvDisplayRotationGet(matrix []int32) float64 {
|
||||
if len(matrix) < 9 {
|
||||
panic("matrix len < 9")
|
||||
}
|
||||
return (float64)(C.av_display_rotation_get((*C.int32_t)(&matrix[0])))
|
||||
}
|
||||
|
||||
// AvDisplayRotationSet initializes a transformation matrix describing a pure counterclockwise
|
||||
// rotation by the specified angle (in degrees).
|
||||
func AvDisplayRotationSet(matrix []int32, angle float64) {
|
||||
C.av_display_rotation_set((*C.int32_t)(&matrix[0]), (C.double)(angle))
|
||||
}
|
||||
|
||||
// AvDisplayMatrixFlip flips the input matrix horizontally and/or vertically.
|
||||
func AvDisplayMatrixFlip(matrix []int32, hflip, vflip int32) {
|
||||
C.av_display_matrix_flip((*C.int32_t)(&matrix[0]), (C.int)(hflip), (C.int)(vflip))
|
||||
}
|
Reference in New Issue
Block a user