Example #1
0
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
}
Example #2
0
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
}