We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f00cc6 commit e71e115Copy full SHA for e71e115
include/upipe/uref_pic_flow_formats.h
@@ -569,6 +569,21 @@ uref_pic_flow_get_format(struct uref *uref)
569
return NULL;
570
}
571
572
+/** @This finds a picture format with the given name.
573
+ *
574
+ * @param name name of the picture format to lookup
575
+ * @return the corresponding picture format, or NULL if not found
576
+ */
577
+static inline const struct uref_pic_flow_format *
578
+uref_pic_flow_get_format_by_name(const char *name)
579
+{
580
+ for (unsigned i = 0; i < UBASE_ARRAY_SIZE(uref_pic_flow_formats); i++)
581
+ if (!strcmp(uref_pic_flow_formats[i]->name, name))
582
+ return uref_pic_flow_formats[i];
583
+
584
+ return NULL;
585
+}
586
587
#ifdef __cplusplus
588
589
#endif
0 commit comments