예제 #1
0
파일: avutil.go 프로젝트: codesuki/go-libav
func (dict *Dictionary) get(key string, flags C.int) (string, bool) {
	cKey := C.CString(key)
	defer C.free(unsafe.Pointer(cKey))
	entry := C.av_dict_get(dict.CAVDictionary, cKey, nil, flags)
	if entry == nil {
		return "", false
	}
	return C.GoString(entry.value), true
}
예제 #2
0
파일: dictionary.go 프로젝트: zwh8800/goav
func (d *Dictionary) Get(key string) *DictionaryEntry {
	var entry *DictionaryEntry
	entry = (*DictionaryEntry)(C.av_dict_get((*C.struct_AVDictionary)(d), C.CString(key), (*C.struct_AVDictionaryEntry)(entry), C.AV_DICT_MATCH_CASE))

	return entry
}