forked from asticode/go-astiav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
color_space.go
37 lines (32 loc) · 1.5 KB
/
color_space.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package astiav
//#include <libavutil/pixdesc.h>
//#include <libavutil/pixfmt.h>
import "C"
// https://ffmpeg.org/doxygen/7.0/pixfmt_8h.html#aff71a069509a1ad3ff54d53a1c894c85
type ColorSpace C.enum_AVColorSpace
const (
ColorSpaceRgb = ColorSpace(C.AVCOL_SPC_RGB)
ColorSpaceBt709 = ColorSpace(C.AVCOL_SPC_BT709)
ColorSpaceUnspecified = ColorSpace(C.AVCOL_SPC_UNSPECIFIED)
ColorSpaceReserved = ColorSpace(C.AVCOL_SPC_RESERVED)
ColorSpaceFcc = ColorSpace(C.AVCOL_SPC_FCC)
ColorSpaceBt470Bg = ColorSpace(C.AVCOL_SPC_BT470BG)
ColorSpaceSmpte170M = ColorSpace(C.AVCOL_SPC_SMPTE170M)
ColorSpaceSmpte240M = ColorSpace(C.AVCOL_SPC_SMPTE240M)
ColorSpaceYcgco = ColorSpace(C.AVCOL_SPC_YCGCO)
ColorSpaceYcocg = ColorSpace(C.AVCOL_SPC_YCOCG)
ColorSpaceBt2020Ncl = ColorSpace(C.AVCOL_SPC_BT2020_NCL)
ColorSpaceBt2020Cl = ColorSpace(C.AVCOL_SPC_BT2020_CL)
ColorSpaceSmpte2085 = ColorSpace(C.AVCOL_SPC_SMPTE2085)
ColorSpaceChromaDerivedNcl = ColorSpace(C.AVCOL_SPC_CHROMA_DERIVED_NCL)
ColorSpaceChromaDerivedCl = ColorSpace(C.AVCOL_SPC_CHROMA_DERIVED_CL)
ColorSpaceIctcp = ColorSpace(C.AVCOL_SPC_ICTCP)
ColorSpaceNb = ColorSpace(C.AVCOL_SPC_NB)
)
// https://ffmpeg.org/doxygen/7.0/pixdesc_8c.html#a7a5b3f4d128f0a0112b4a91f75055339
func (s ColorSpace) Name() string {
return C.GoString(C.av_color_space_name(C.enum_AVColorSpace(s)))
}
func (s ColorSpace) String() string {
return s.Name()
}