Example #1
0
func ChannelLayouts() []ChannelLayout {
	var cls []ChannelLayout
	for index := C.unsigned(0); ; index++ {
		var cCL C.uint64_t
		if C.av_get_standard_channel_layout(index, &cCL, nil) != 0 {
			break
		}
		cls = append(cls, ChannelLayout(cCL))
	}
	return cls
}
Example #2
0
func (cl ChannelLayout) NameOk() (string, bool) {
	for index := C.unsigned(0); ; index++ {
		var cCL C.uint64_t
		var cName *C.char
		if C.av_get_standard_channel_layout(index, &cCL, &cName) != 0 {
			break
		}
		if ChannelLayout(cCL) == cl {
			return cStringToStringOk(cName)
		}
	}
	return "", false
}