标签:ret bsp empty UNC set va_list 可变 return handle
1. C中可变参数函数作为函数参数:
void media_debug_set_handler(struct media_device *media, void (*debug_handler)(void *, ...), void *debug_priv) 调用: media_debug_set_handler(media, (void (*)(void *, ...))fprintf, stdout);
2.可变参数函数
gstcaps.c GstCaps *gst_caps_new_full (GstStructure * struct1, ...) { GstCaps *caps; va_list var_args; va_start (var_args, struct1); caps = gst_caps_new_full_valist (struct1, var_args); va_end (var_args); return caps; } GstCaps * gst_caps_new_full_valist (GstStructure * structure, va_list var_args) { GstCaps *caps; caps = gst_caps_new_empty (); while (structure) { gst_caps_append_structure_unchecked (caps, structure); structure = va_arg (var_args, GstStructure *); } return caps; }
标签:ret bsp empty UNC set va_list 可变 return handle
原文地址:https://www.cnblogs.com/hellokitty2/p/9070078.html