+ const gchar *format_string = NULL;
+
+ if (!structure) {
+ MMCAM_LOG_WARNING("NULL structure");
+ return GST_MAKE_FOURCC('N', 'U', 'L', 'L');
+ }
+
+ if (gst_structure_has_name(structure, "video/x-h264"))
+ return GST_MAKE_FOURCC('H', '2', '6', '4');
+
+ if (gst_structure_has_name(structure, "video/x-h265"))
+ return GST_MAKE_FOURCC('H', '2', '6', '5');
+
+ if (gst_structure_has_name(structure, "video/x-vp8"))
+ return GST_MAKE_FOURCC('V', 'P', '8', '0');
+
+ if (gst_structure_has_name(structure, "video/x-vp9"))
+ return GST_MAKE_FOURCC('V', 'P', '9', '0');
+
+ if (gst_structure_has_name(structure, "video/x-jpeg") ||
+ gst_structure_has_name(structure, "image/jpeg"))
+ return GST_MAKE_FOURCC('M', 'J', 'P', 'G');
+
+ format_string = gst_structure_get_string(structure, "format");
+
+ if (format_string)
+ return GST_STR_FOURCC(format_string);
+
+ return GST_MAKE_FOURCC('N', 'O', 'N', 'E');