Merge branch 'upstream/1.16' into tizen_gst_1.16.2
[platform/upstream/gst-plugins-base.git] / gst / typefind / gsttypefindfunctions.c
index 11cee9a..95d81f1 100644 (file)
@@ -362,7 +362,7 @@ utf32_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** text/uri-list ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps uri_caps = GST_STATIC_CAPS ("text/uri-list");
 
 #define URI_CAPS (gst_static_caps_get(&uri_caps))
@@ -378,6 +378,7 @@ static GstStaticCaps uri_caps = GST_STATIC_CAPS ("text/uri-list");
     data++;                                                             \
   }                                                                     \
 }
+
 static void
 uri_type_find (GstTypeFind * tf, gpointer unused)
 {
@@ -424,6 +425,7 @@ uri_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY, URI_CAPS);
   }
 }
+#endif
 
 /*** application/itc ***/
 static GstStaticCaps itc_caps = GST_STATIC_CAPS ("application/itc");
@@ -657,6 +659,7 @@ xml_check_first_element (GstTypeFind * tf, const gchar * element, guint elen,
   return FALSE;
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps generic_xml_caps = GST_STATIC_CAPS ("application/xml");
 
 #define GENERIC_XML_CAPS (gst_static_caps_get(&generic_xml_caps))
@@ -667,7 +670,7 @@ xml_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM, GENERIC_XML_CAPS);
   }
 }
-
+#endif
 /*** application/dash+xml ****************************************************/
 
 static GstStaticCaps dash_caps = GST_STATIC_CAPS ("application/dash+xml");
@@ -732,7 +735,7 @@ sdp_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** application/smil *********************************************************/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps smil_caps = GST_STATIC_CAPS ("application/smil");
 
 #define SMIL_CAPS (gst_static_caps_get(&smil_caps))
@@ -783,7 +786,7 @@ html_type_find (GstTypeFind * tf, gpointer unused)
     }
   }
 }
-
+#endif
 /*** audio/midi ***/
 
 static GstStaticCaps mid_caps = GST_STATIC_CAPS ("audio/midi");
@@ -829,7 +832,7 @@ mxmf_type_find (GstTypeFind * tf, gpointer unused)
 
 
 /*** video/x-fli ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps flx_caps = GST_STATIC_CAPS ("video/x-fli");
 
 #define FLX_CAPS gst_static_caps_get(&flx_caps)
@@ -858,7 +861,7 @@ flx_type_find (GstTypeFind * tf, gpointer unused)
     return;
   }
 }
-
+#endif
 /*** application/x-id3 ***/
 
 static GstStaticCaps id3_caps = GST_STATIC_CAPS ("application/x-id3");
@@ -913,7 +916,7 @@ apetag_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** audio/x-ttafile ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps tta_caps = GST_STATIC_CAPS ("audio/x-ttafile");
 
 #define TTA_CAPS gst_static_caps_get(&tta_caps)
@@ -929,7 +932,7 @@ tta_type_find (GstTypeFind * tf, gpointer unused)
     }
   }
 }
-
+#endif
 /*** audio/x-flac ***/
 static GstStaticCaps flac_caps = GST_STATIC_CAPS ("audio/x-flac");
 
@@ -1943,7 +1946,7 @@ dts_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** gsm ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /* can only be detected by using the extension, in which case we use the default
  * GSM properties */
 static GstStaticCaps gsm_caps =
@@ -2139,16 +2142,19 @@ multipart_type_find (GstTypeFind * tf, gpointer unused)
     }
   }
 }
+#endif
 
 /*** video/mpeg systemstream ***/
+#if defined(TIZEN_PROFILE_TV) || !defined(TIZEN_FEATURE_DISABLE_MIME_TYPES)
 static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
     "systemstream = (boolean) true, mpegversion = (int) [ 1, 2 ]");
 
 #define MPEG_SYS_CAPS gst_static_caps_get(&mpeg_sys_caps)
+#endif
 #define IS_MPEG_HEADER(data) (G_UNLIKELY((((guint8 *)(data))[0] == 0x00) &&  \
                                          (((guint8 *)(data))[1] == 0x00) &&  \
                                          (((guint8 *)(data))[2] == 0x01)))
-
+#if defined(TIZEN_PROFILE_TV) || !defined(TIZEN_FEATURE_DISABLE_MIME_TYPES)
 #define IS_MPEG_PACK_CODE(b) ((b) == 0xBA)
 #define IS_MPEG_SYS_CODE(b) ((b) == 0xBB)
 #define IS_MPEG_PACK_HEADER(data)       (IS_MPEG_HEADER (data) &&            \
@@ -2164,6 +2170,7 @@ static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
 
 #define MPEG2_MIN_SYS_HEADERS 2
 #define MPEG2_MAX_SYS_HEADERS 5
+#endif
 
 static gboolean
 mpeg_sys_is_valid_pack (GstTypeFind * tf, const guint8 * data, guint len,
@@ -2217,6 +2224,7 @@ mpeg_sys_is_valid_pack (GstTypeFind * tf, const guint8 * data, guint len,
   return FALSE;
 }
 
+#if defined(TIZEN_PROFILE_TV) || !defined(TIZEN_FEATURE_DISABLE_MIME_TYPES)
 static gboolean
 mpeg_sys_is_valid_pes (GstTypeFind * tf, const guint8 * data, guint len,
     guint * pack_size)
@@ -2415,6 +2423,7 @@ suggest:
         "mpegversion", G_TYPE_INT, mpegversion, NULL);
   }
 };
+#endif
 
 /*** video/mpegts Transport Stream ***/
 static GstStaticCaps mpegts_caps = GST_STATIC_CAPS ("video/mpegts, "
@@ -3044,7 +3053,7 @@ aiff_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** audio/x-svx ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps svx_caps = GST_STATIC_CAPS ("audio/x-svx");
 
 #define SVX_CAPS gst_static_caps_get(&svx_caps)
@@ -3093,7 +3102,7 @@ ape_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY + 10, APE_CAPS);
   }
 }
-
+#endif
 /*** ISO FORMATS ***/
 
 /*** audio/x-m4a ***/
@@ -3178,6 +3187,7 @@ q3gp_type_find (GstTypeFind * tf, gpointer unused)
 
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** video/mj2 and image/jp2 ***/
 static GstStaticCaps mj2_caps = GST_STATIC_CAPS ("video/mj2");
 
@@ -3302,7 +3312,7 @@ jpc_type_find (GstTypeFind * tf, gpointer unused)
   if (found_cod && found_qcd && found_sot)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, JPC_CAPS);
 }
-
+#endif
 
 /*** video/quicktime ***/
 
@@ -3331,6 +3341,9 @@ qt_type_find (GstTypeFind * tf, gpointer unused)
 
     if (STRNCMP (&data[4], "ftypisom", 8) == 0 ||
         STRNCMP (&data[4], "ftypavc1", 8) == 0 ||
+#ifdef TIZEN_FEATURE_TYPEFIND_ENHANCEMENT
+        STRNCMP (&data[4], "ftypwmf ", 8) == 0 ||
+#endif
         STRNCMP (&data[4], "ftypmp42", 8) == 0) {
       tip = GST_TYPE_FIND_MAXIMUM;
       variant = "iso";
@@ -3435,7 +3448,7 @@ done:
 
 
 /*** image/x-quicktime ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps qtif_caps = GST_STATIC_CAPS ("image/x-quicktime");
 
 #define QTIF_CAPS gst_static_caps_get(&qtif_caps)
@@ -3795,7 +3808,7 @@ swf_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, SWF_CAPS);
   }
 }
-
+#endif
 /*** application/vnd.ms-sstr+xml ***/
 
 static void
@@ -4062,6 +4075,7 @@ bmp_type_find (GstTypeFind * tf, gpointer unused)
       NULL);
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** image/tiff ***/
 static GstStaticCaps tiff_caps = GST_STATIC_CAPS ("image/tiff, "
     "endianness = (int) { BIG_ENDIAN, LITTLE_ENDIAN }");
@@ -4087,6 +4101,7 @@ tiff_type_find (GstTypeFind * tf, gpointer ununsed)
     }
   }
 }
+#endif
 
 /*** image/x-exr ***/
 static GstStaticCaps exr_caps = GST_STATIC_CAPS ("image/x-exr");
@@ -4222,6 +4237,7 @@ pnm_type_find (GstTypeFind * tf, gpointer ununsed)
   }
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps sds_caps = GST_STATIC_CAPS ("audio/x-sds");
 
 #define SDS_CAPS (gst_static_caps_get(&sds_caps))
@@ -4275,7 +4291,7 @@ ircam_type_find (GstTypeFind * tf, gpointer ununsed)
     }
   }
 }
-
+#endif
 /*** Matroska/WebM ***/
 
 #define EBML_HEADER           0x1A45DFA3
@@ -4534,6 +4550,7 @@ matroska_type_find (GstTypeFind * tf, gpointer ununsed)
 }
 
 /*** application/mxf ***/
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps mxf_caps = GST_STATIC_CAPS ("application/mxf");
 
 #define MXF_MAX_PROBE_LENGTH (1024 * 64)
@@ -4613,7 +4630,7 @@ dv_type_find (GstTypeFind * tf, gpointer private)
         "format", G_TYPE_STRING, format, NULL);
   }
 }
-
+#endif
 
 /*** Ogg variants ***/
 static GstStaticCaps ogg_caps =
@@ -4792,6 +4809,7 @@ theora_type_find (GstTypeFind * tf, gpointer private)
   }
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** kate ***/
 static void
 kate_type_find (GstTypeFind * tf, gpointer private)
@@ -4820,6 +4838,7 @@ kate_type_find (GstTypeFind * tf, gpointer private)
         "application/x-kate", NULL);
   }
 }
+#endif
 
 /*** WEBVTTT subtitles ***/
 static GstStaticCaps webvtt_caps =
@@ -4856,6 +4875,7 @@ webvtt_type_find (GstTypeFind * tf, gpointer private)
   gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, WEBVTT_CAPS);
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** application/x-ogm-video or audio***/
 
 static GstStaticCaps ogmvideo_caps =
@@ -5055,6 +5075,7 @@ ar_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_NEARLY_CERTAIN, AR_CAPS);
   }
 }
+#endif
 
 /*** audio/x-au ***/
 
@@ -5100,6 +5121,7 @@ nuv_type_find (GstTypeFind * tf, gpointer unused)
   }
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** audio/x-paris ***/
 /* NOTE: do not replace this function with two TYPE_FIND_REGISTER_START_WITH */
 static GstStaticCaps paris_caps = GST_STATIC_CAPS ("audio/x-paris");
@@ -5323,7 +5345,7 @@ vivo_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, VIVO_CAPS);
   }
 }
-
+#endif
 /*** XDG MIME typefinder (to avoid false positives mostly) ***/
 
 #ifdef USE_GIO
@@ -5381,7 +5403,7 @@ xdgmime_typefind (GstTypeFind * find, gpointer user_data)
 #endif /* USE_GIO */
 
 /*** Windows icon typefinder (to avoid false positives mostly) ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static void
 windows_icon_typefind (GstTypeFind * find, gpointer user_data)
 {
@@ -5546,6 +5568,7 @@ y4m_typefind (GstTypeFind * tf, gpointer private)
         "application/x-yuv4mpeg", "y4mversion", G_TYPE_INT, 2, NULL);
   }
 }
+#endif
 
 /*** DVD ISO images (looks like H.264, see #674069) ***/
 static void
@@ -5841,6 +5864,7 @@ plugin_init (GstPlugin * plugin)
       au_type_find, "au,snd", AU_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER_RIFF (plugin, "video/x-msvideo", GST_RANK_PRIMARY,
       "avi", "AVI ");
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER_RIFF (plugin, "audio/qcelp", GST_RANK_PRIMARY,
       "qcp", "QLCM");
   TYPE_FIND_REGISTER_RIFF (plugin, "video/x-cdxa", GST_RANK_PRIMARY,
@@ -5848,6 +5872,7 @@ plugin_init (GstPlugin * plugin)
   TYPE_FIND_REGISTER_START_WITH (plugin, "video/x-vcd", GST_RANK_PRIMARY,
       "dat", "\000\377\377\377\377\377\377\377\377\377\377\000", 12,
       GST_TYPE_FIND_MAXIMUM);
+#endif
   TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-imelody", GST_RANK_PRIMARY,
       "imy,ime,imelody", "BEGIN:IMELODY", 13, GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER_START_WITH (plugin, "application/x-scc", GST_RANK_PRIMARY,
@@ -5865,29 +5890,37 @@ plugin_init (GstPlugin * plugin)
       "mid,midi", "RMID");
   TYPE_FIND_REGISTER (plugin, "audio/mobile-xmf", GST_RANK_PRIMARY,
       mxmf_type_find, "mxmf", MXMF_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "video/x-fli", GST_RANK_MARGINAL, flx_type_find,
       "flc,fli", FLX_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER (plugin, "application/x-id3v2", GST_RANK_PRIMARY + 103,
       id3v2_type_find, "mp3,mp2,mp1,mpga,ogg,flac,tta", ID3_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/x-id3v1", GST_RANK_PRIMARY + 101,
       id3v1_type_find, "mp3,mp2,mp1,mpga,ogg,flac,tta", ID3_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/x-apetag", GST_RANK_PRIMARY + 102,
       apetag_type_find, "mp3,ape,mpc,wv", APETAG_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "audio/x-ttafile", GST_RANK_PRIMARY,
       tta_type_find, "tta", TTA_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "audio/x-mod", GST_RANK_SECONDARY, mod_type_find,
       "669,amf,ams,dbm,digi,dmf,dsm,gdm,far,imf,it,j2b,mdl,med,mod,mt2,mtm,"
       "okt,psm,ptm,sam,s3m,stm,stx,ult,umx,xm", MOD_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER (plugin, "audio/mpeg", GST_RANK_PRIMARY, mp3_type_find,
       "mp3,mp2,mp1,mpga", MP3_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "audio/x-ac3", GST_RANK_PRIMARY, ac3_type_find,
       "ac3,eac3", AC3_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "audio/x-dts", GST_RANK_SECONDARY, dts_type_find,
       "dts", DTS_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "audio/x-gsm", GST_RANK_PRIMARY, NULL, "gsm",
       GSM_CAPS, NULL, NULL);
+#endif
+#ifdef TIZEN_PROFILE_TV
   TYPE_FIND_REGISTER (plugin, "video/mpeg-sys", GST_RANK_PRIMARY,
       mpeg_sys_type_find, "mpe,mpeg,mpg", MPEG_SYS_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER (plugin, "video/mpegts", GST_RANK_PRIMARY,
       mpeg_ts_type_find, "ts,mts", MPEGTS_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/ogg", GST_RANK_PRIMARY,
@@ -5913,6 +5946,7 @@ plugin_init (GstPlugin * plugin)
       q3gp_type_find, "3gp", Q3GP_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "video/quicktime", GST_RANK_PRIMARY,
       qt_type_find, "mov,mp4", QT_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "image/x-quicktime", GST_RANK_SECONDARY,
       qtif_type_find, "qif,qtif,qti", QTIF_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "image/jp2", GST_RANK_PRIMARY,
@@ -5924,13 +5958,16 @@ plugin_init (GstPlugin * plugin)
 
   TYPE_FIND_REGISTER (plugin, "text/html", GST_RANK_SECONDARY, html_type_find,
       "htm,html", HTML_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER_START_WITH (plugin, "application/vnd.rn-realmedia",
       GST_RANK_SECONDARY, "ra,ram,rm,rmvb", ".RMF", 4, GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER_START_WITH (plugin, "application/x-pn-realaudio",
       GST_RANK_SECONDARY, "ra,ram,rm,rmvb", ".ra\375", 4,
       GST_TYPE_FIND_MAXIMUM);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "application/x-shockwave-flash",
       GST_RANK_SECONDARY, swf_type_find, "swf,swfl", SWF_CAPS, NULL, NULL);
+#endif   
   TYPE_FIND_REGISTER (plugin, "application/xges",
       GST_RANK_PRIMARY, xges_type_find, "xges", XGES_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/dash+xml",
@@ -5946,24 +5983,29 @@ plugin_init (GstPlugin * plugin)
       "txt", UTF16_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "text/utf-32", GST_RANK_MARGINAL, utf32_type_find,
       "txt", UTF32_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "text/uri-list", GST_RANK_MARGINAL, uri_type_find,
       "ram", URI_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER (plugin, "application/itc", GST_RANK_SECONDARY,
       itc_type_find, "itc", ITC_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/x-hls", GST_RANK_MARGINAL,
       hls_type_find, "m3u8", HLS_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/sdp", GST_RANK_SECONDARY,
       sdp_type_find, "sdp", SDP_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "application/smil", GST_RANK_SECONDARY,
       smil_type_find, "smil", SMIL_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/ttml+xml", GST_RANK_SECONDARY,
       ttml_xml_type_find, "ttml+xml", TTML_XML_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/xml", GST_RANK_MARGINAL,
       xml_type_find, "xml", GENERIC_XML_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER_RIFF (plugin, "audio/x-wav", GST_RANK_PRIMARY, "wav",
       "WAVE");
   TYPE_FIND_REGISTER (plugin, "audio/x-aiff", GST_RANK_SECONDARY,
       aiff_type_find, "aiff,aif,aifc", AIFF_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "audio/x-svx", GST_RANK_SECONDARY, svx_type_find,
       "iff,svx", SVX_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "audio/x-paris", GST_RANK_SECONDARY,
@@ -5984,6 +6026,7 @@ plugin_init (GstPlugin * plugin)
       shn_type_find, "shn", SHN_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/x-ape", GST_RANK_SECONDARY,
       ape_type_find, "ape", APE_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER (plugin, "image/jpeg", GST_RANK_PRIMARY + 15,
       jpeg_type_find, "jpg,jpe,jpeg", JPEG_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER_START_WITH (plugin, "image/gif", GST_RANK_PRIMARY, "gif",
@@ -5992,16 +6035,19 @@ plugin_init (GstPlugin * plugin)
       "png", "\211PNG\015\012\032\012", 8, GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER (plugin, "image/bmp", GST_RANK_PRIMARY, bmp_type_find,
       "bmp", BMP_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "image/tiff", GST_RANK_PRIMARY, tiff_type_find,
       "tif,tiff", TIFF_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER_RIFF (plugin, "image/webp", GST_RANK_PRIMARY,
       "webp", "WEBP");
+#endif
   TYPE_FIND_REGISTER (plugin, "image/x-exr", GST_RANK_PRIMARY, exr_type_find,
       "exr", EXR_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "image/x-portable-pixmap", GST_RANK_SECONDARY,
       pnm_type_find, "pnm,ppm,pgm,pbm", PNM_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "video/x-matroska", GST_RANK_PRIMARY,
       matroska_type_find, "mkv,mka,mk3d,webm", MATROSKA_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "application/mxf", GST_RANK_PRIMARY,
       mxf_type_find, "mxf", MXF_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER_START_WITH (plugin, "video/x-mve", GST_RANK_SECONDARY,
@@ -6009,10 +6055,12 @@ plugin_init (GstPlugin * plugin)
       GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER (plugin, "video/x-dv", GST_RANK_SECONDARY, dv_type_find,
       "dv,dif", DV_CAPS, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-amr-nb-sh", GST_RANK_PRIMARY,
       "amr", "#!AMR", 5, GST_TYPE_FIND_LIKELY);
   TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-amr-wb-sh", GST_RANK_PRIMARY,
       "amr", "#!AMR-WB", 7, GST_TYPE_FIND_MAXIMUM);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "audio/iLBC-sh", GST_RANK_PRIMARY, ilbc_type_find,
       "ilbc", ILBC_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "audio/x-sbc", GST_RANK_MARGINAL, sbc_type_find,
@@ -6039,6 +6087,7 @@ plugin_init (GstPlugin * plugin)
       GST_RANK_SECONDARY, "Z", "\037\235", 2, GST_TYPE_FIND_LIKELY);
   TYPE_FIND_REGISTER (plugin, "subtitle/x-kate", GST_RANK_MARGINAL,
       kate_type_find, NULL, NULL, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER (plugin, "application/x-subtitle-vtt", GST_RANK_MARGINAL,
       webvtt_type_find, "vtt", WEBVTT_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "audio/x-flac", GST_RANK_PRIMARY, flac_type_find,
@@ -6047,6 +6096,7 @@ plugin_init (GstPlugin * plugin)
       vorbis_type_find, NULL, VORBIS_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "video/x-theora", GST_RANK_PRIMARY,
       theora_type_find, NULL, THEORA_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "application/x-ogm-video", GST_RANK_PRIMARY,
       ogmvideo_type_find, NULL, OGMVIDEO_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "application/x-ogm-audio", GST_RANK_PRIMARY,
@@ -6063,8 +6113,10 @@ plugin_init (GstPlugin * plugin)
       NULL, CMML_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER_START_WITH (plugin, "application/x-executable",
       GST_RANK_MARGINAL, NULL, "\177ELF", 4, GST_TYPE_FIND_MAXIMUM);
+#endif
   TYPE_FIND_REGISTER (plugin, "audio/aac", GST_RANK_SECONDARY, aac_type_find,
       "aac,adts,adif,loas", AAC_CAPS, NULL, NULL);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-spc", GST_RANK_SECONDARY,
       "spc", "SNES-SPC700 Sound File Data", 27, GST_TYPE_FIND_MAXIMUM);
   TYPE_FIND_REGISTER (plugin, "audio/x-wavpack", GST_RANK_SECONDARY,
@@ -6115,10 +6167,12 @@ plugin_init (GstPlugin * plugin)
   TYPE_FIND_REGISTER_START_WITH (plugin, "application/msword",
       GST_RANK_SECONDARY, "doc", "\320\317\021\340\241\261\032\341", 8,
       GST_TYPE_FIND_LIKELY);
+#endif
   /* Mac OS X .DS_Store files tend to be taken for video/mpeg */
   TYPE_FIND_REGISTER_START_WITH (plugin, "application/octet-stream",
       GST_RANK_SECONDARY, "DS_Store", "\000\000\000\001Bud1", 8,
       GST_TYPE_FIND_LIKELY);
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER_START_WITH (plugin, "image/vnd.adobe.photoshop",
       GST_RANK_SECONDARY, "psd", "8BPS\000\001\000\000\000\000", 10,
       GST_TYPE_FIND_LIKELY);
@@ -6128,14 +6182,17 @@ plugin_init (GstPlugin * plugin)
       y4m_typefind, NULL, NULL, NULL, NULL);
   TYPE_FIND_REGISTER (plugin, "image/x-icon", GST_RANK_MARGINAL,
       windows_icon_typefind, NULL, NULL, NULL, NULL);
+#endif
 
 #ifdef USE_GIO
   TYPE_FIND_REGISTER (plugin, "xdgmime-base", GST_RANK_MARGINAL,
       xdgmime_typefind, NULL, NULL, NULL, NULL);
 #endif
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "image/x-degas", GST_RANK_MARGINAL,
       degas_type_find, NULL, NULL, NULL, NULL);
+#endif
   TYPE_FIND_REGISTER (plugin, "application/octet-stream", GST_RANK_MARGINAL,
       dvdiso_type_find, NULL, NULL, NULL, NULL);
 
@@ -6150,11 +6207,12 @@ plugin_init (GstPlugin * plugin)
 
   TYPE_FIND_REGISTER (plugin, "audio/audible", GST_RANK_MARGINAL,
       aa_type_find, "aa,aax", AA_CAPS, NULL, NULL);
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
   TYPE_FIND_REGISTER (plugin, "audio/x-tap-tap", GST_RANK_PRIMARY,
       tap_type_find, "tap", TAP_CAPS, NULL, NULL);
   TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-tap-dmp",
       GST_RANK_SECONDARY, "dmp", "DC2N-TAP-RAW", 12, GST_TYPE_FIND_LIKELY);
+#endif   
 
   return TRUE;
 }