Merge branch 'master' into 0.11
authorWim Taymans <wim.taymans@collabora.co.uk>
Sun, 10 Jul 2011 11:49:14 +0000 (13:49 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Sun, 10 Jul 2011 11:49:14 +0000 (13:49 +0200)
1  2 
ext/ogg/gstoggmux.c
gst/typefind/gsttypefindfunctions.c

diff --combined ext/ogg/gstoggmux.c
@@@ -27,7 -27,7 +27,7 @@@
   * <refsect2>
   * <title>Example pipelines</title>
   * |[
 - * gst-launch v4l2src num-buffers=500 ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink location=video.ogg
 + * gst-launch v4l2src num-buffers=500 ! video/x-raw,width=320,height=240 ! videoconvert ! theoraenc ! oggmux ! filesink location=video.ogg
   * ]| Encodes a video stream captured from a v4l2-compatible camera to Ogg/Theora
   * (the encoding will stop automatically after 500 frames)
   * </refsect2>
@@@ -107,13 -107,16 +107,13 @@@ static GstStaticPadTemplate sink_factor
          "subtitle/x-kate; application/x-kate")
      );
  
 -static void gst_ogg_mux_base_init (gpointer g_class);
 -static void gst_ogg_mux_class_init (GstOggMuxClass * klass);
 -static void gst_ogg_mux_init (GstOggMux * ogg_mux);
  static void gst_ogg_mux_finalize (GObject * object);
  
  static GstFlowReturn
  gst_ogg_mux_collected (GstCollectPads * pads, GstOggMux * ogg_mux);
  static gboolean gst_ogg_mux_handle_src_event (GstPad * pad, GstEvent * event);
  static GstPad *gst_ogg_mux_request_new_pad (GstElement * element,
 -    GstPadTemplate * templ, const gchar * name);
 +    GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
  static void gst_ogg_mux_release_pad (GstElement * element, GstPad * pad);
  
  static void gst_ogg_mux_set_property (GObject * object,
@@@ -123,10 -126,57 +123,10 @@@ static void gst_ogg_mux_get_property (G
  static GstStateChangeReturn gst_ogg_mux_change_state (GstElement * element,
      GstStateChange transition);
  
 -static GstElementClass *parent_class = NULL;
 -
  /*static guint gst_ogg_mux_signals[LAST_SIGNAL] = { 0 }; */
 -
 -GType
 -gst_ogg_mux_get_type (void)
 -{
 -  static GType ogg_mux_type = 0;
 -
 -  if (G_UNLIKELY (ogg_mux_type == 0)) {
 -    static const GTypeInfo ogg_mux_info = {
 -      sizeof (GstOggMuxClass),
 -      gst_ogg_mux_base_init,
 -      NULL,
 -      (GClassInitFunc) gst_ogg_mux_class_init,
 -      NULL,
 -      NULL,
 -      sizeof (GstOggMux),
 -      0,
 -      (GInstanceInitFunc) gst_ogg_mux_init,
 -    };
 -    static const GInterfaceInfo preset_info = {
 -      NULL,
 -      NULL,
 -      NULL
 -    };
 -
 -    ogg_mux_type =
 -        g_type_register_static (GST_TYPE_ELEMENT, "GstOggMux", &ogg_mux_info,
 -        0);
 -
 -    g_type_add_interface_static (ogg_mux_type, GST_TYPE_PRESET, &preset_info);
 -  }
 -  return ogg_mux_type;
 -}
 -
 -static void
 -gst_ogg_mux_base_init (gpointer g_class)
 -{
 -  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
 -
 -  gst_element_class_add_pad_template (element_class,
 -      gst_static_pad_template_get (&src_factory));
 -  gst_element_class_add_pad_template (element_class,
 -      gst_static_pad_template_get (&sink_factory));
 -
 -  gst_element_class_set_details_simple (element_class,
 -      "Ogg muxer", "Codec/Muxer",
 -      "mux ogg streams (info about ogg: http://xiph.org)",
 -      "Wim Taymans <wim@fluendo.com>");
 -}
 +#define gst_ogg_mux_parent_class parent_class
 +G_DEFINE_TYPE_WITH_CODE (GstOggMux, gst_ogg_mux, GST_TYPE_ELEMENT,
 +    G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL));
  
  static void
  gst_ogg_mux_class_init (GstOggMuxClass * klass)
    gobject_class = (GObjectClass *) klass;
    gstelement_class = (GstElementClass *) klass;
  
 -  parent_class = g_type_class_peek_parent (klass);
 -
    gobject_class->finalize = gst_ogg_mux_finalize;
    gobject_class->get_property = gst_ogg_mux_get_property;
    gobject_class->set_property = gst_ogg_mux_set_property;
  
 +  gst_element_class_add_pad_template (gstelement_class,
 +      gst_static_pad_template_get (&src_factory));
 +  gst_element_class_add_pad_template (gstelement_class,
 +      gst_static_pad_template_get (&sink_factory));
 +
 +  gst_element_class_set_details_simple (gstelement_class,
 +      "Ogg muxer", "Codec/Muxer",
 +      "mux ogg streams (info about ogg: http://xiph.org)",
 +      "Wim Taymans <wim@fluendo.com>");
 +
    gstelement_class->request_new_pad = gst_ogg_mux_request_new_pad;
    gstelement_class->release_pad = gst_ogg_mux_release_pad;
  
@@@ -284,20 -326,26 +284,20 @@@ gst_ogg_mux_sink_event (GstPad * pad, G
    GST_DEBUG_OBJECT (pad, "Got %s event", GST_EVENT_TYPE_NAME (event));
  
    switch (GST_EVENT_TYPE (event)) {
 -    case GST_EVENT_NEWSEGMENT:{
 -      gboolean update;
 -      gdouble rate;
 -      gdouble applied_rate;
 -      GstFormat format;
 -      gint64 start, stop, position;
 +    case GST_EVENT_SEGMENT:
 +    {
 +      const GstSegment *segment;
  
 -      gst_event_parse_new_segment_full (event, &update, &rate,
 -          &applied_rate, &format, &start, &stop, &position);
 +      gst_event_parse_segment (event, &segment);
  
        /* We don't support non time NEWSEGMENT events */
 -      if (format != GST_FORMAT_TIME) {
 +      if (segment->format != GST_FORMAT_TIME) {
          gst_event_unref (event);
          event = NULL;
          break;
        }
  
 -      gst_segment_set_newsegment_full (&ogg_pad->segment, update, rate,
 -          applied_rate, format, start, stop, position);
 -
 +      gst_segment_copy_into (segment, &ogg_pad->segment);
        break;
      }
      case GST_EVENT_FLUSH_STOP:{
@@@ -346,7 -394,7 +346,7 @@@ gst_ogg_mux_generate_serialno (GstOggMu
  
  static GstPad *
  gst_ogg_mux_request_new_pad (GstElement * element,
 -    GstPadTemplate * templ, const gchar * req_name)
 +    GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps)
  {
    GstOggMux *ogg_mux;
    GstPad *newpad;
@@@ -477,8 -525,9 +477,8 @@@ gst_ogg_mux_buffer_from_page (GstOggMu
  
    /* allocate space for header and body */
    buffer = gst_buffer_new_and_alloc (page->header_len + page->body_len);
 -  memcpy (GST_BUFFER_DATA (buffer), page->header, page->header_len);
 -  memcpy (GST_BUFFER_DATA (buffer) + page->header_len,
 -      page->body, page->body_len);
 +  gst_buffer_fill (buffer, 0, page->header, page->header_len);
 +  gst_buffer_fill (buffer, page->header_len, page->body, page->body_len);
  
    /* Here we set granulepos as our OFFSET_END to give easy direct access to
     * this value later. Before we push it, we reset this to OFFSET + SIZE
@@@ -498,9 -547,11 +498,9 @@@ static GstFlowRetur
  gst_ogg_mux_push_buffer (GstOggMux * mux, GstBuffer * buffer,
      GstOggPadData * oggpad)
  {
 -  GstCaps *caps;
 -
    /* fix up OFFSET and OFFSET_END again */
    GST_BUFFER_OFFSET (buffer) = mux->offset;
 -  mux->offset += GST_BUFFER_SIZE (buffer);
 +  mux->offset += gst_buffer_get_size (buffer);
    GST_BUFFER_OFFSET_END (buffer) = mux->offset;
  
    /* Ensure we have monotonically increasing timestamps in the output. */
        mux->last_ts = run_time;
    }
  
 -  caps = gst_pad_get_negotiated_caps (mux->srcpad);
 -  gst_buffer_set_caps (buffer, caps);
 -  if (caps)
 -    gst_caps_unref (caps);
 -
    return gst_pad_push (mux->srcpad, buffer);
  }
  
@@@ -726,10 -782,9 +726,10 @@@ gst_ogg_mux_decorate_buffer (GstOggMux 
    GstClockTime next_time;
    GstClockTimeDiff diff;
    ogg_packet packet;
 +  gsize size;
  
    /* ensure messing with metadata is ok */
 -  buf = gst_buffer_make_metadata_writable (buf);
 +  buf = gst_buffer_make_writable (buf);
  
    /* convert time to running time, so we need no longer bother about that */
    time = GST_BUFFER_TIMESTAMP (buf);
        pad->map.granulerate_n <= 0 || pad->map.granulerate_d <= 0)
      goto no_granule;
  
 -  packet.packet = GST_BUFFER_DATA (buf);
 -  packet.bytes = GST_BUFFER_SIZE (buf);
 +  packet.packet = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
 +  packet.bytes = size;
    duration = gst_ogg_stream_get_packet_duration (&pad->map, &packet);
 +  gst_buffer_unmap (buf, packet.packet, size);
  
    /* give up if no duration can be determined, relying on upstream */
    if (G_UNLIKELY (duration < 0)) {
@@@ -881,22 -935,19 +881,22 @@@ gst_ogg_mux_queue_pads (GstOggMux * ogg
            /* and we have one */
            ogg_packet packet;
            gboolean is_header;
 +          gsize size;
  
 -          packet.packet = GST_BUFFER_DATA (buf);
 -          packet.bytes = GST_BUFFER_SIZE (buf);
 +          packet.packet = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
 +          packet.bytes = size;
  
            /* if we're not yet in data mode, ensure we're setup on the first packet */
            if (!pad->have_type) {
 +            GstCaps *caps;
 +
              /* Use headers in caps, if any; this will allow us to be resilient
               * to starting streams on the fly, and some streams (like VP8
               * at least) do not send headers packets, as other muxers don't
               * expect/need them. */
 +            caps = gst_pad_get_current_caps (GST_PAD_CAST (data->pad));
              pad->have_type =
 -                gst_ogg_stream_setup_map_from_caps_headers (&pad->map,
 -                GST_BUFFER_CAPS (buf));
 +                gst_ogg_stream_setup_map_from_caps_headers (&pad->map, caps);
  
              if (!pad->have_type) {
                /* fallback on the packet */
              }
              if (!pad->have_type) {
                GST_ERROR_OBJECT (pad, "mapper didn't recognise input stream "
 -                  "(pad caps: %" GST_PTR_FORMAT ")", GST_PAD_CAPS (pad));
 +                  "(pad caps: %" GST_PTR_FORMAT ")", caps);
              } else {
                GST_DEBUG_OBJECT (pad, "caps detected: %" GST_PTR_FORMAT,
                    pad->map.caps);
              }
 +            if (caps)
 +              gst_caps_unref (caps);
            }
  
            if (pad->have_type)
            else                  /* fallback (FIXME 0.11: remove IN_CAPS hack) */
              is_header = GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
  
 +          gst_buffer_unmap (buf, packet.packet, size);
 +
            if (is_header) {
              GST_DEBUG_OBJECT (ogg_mux,
                  "got header buffer in control state, ignoring");
@@@ -1053,8 -1100,7 +1053,8 @@@ gst_ogg_mux_set_header_on_caps (GstCap
      walk = walk->next;
  
      /* mark buffer */
 -    GST_LOG ("Setting IN_CAPS on buffer of length %d", GST_BUFFER_SIZE (buf));
 +    GST_LOG ("Setting IN_CAPS on buffer of length %d",
 +        gst_buffer_get_size (buf));
      GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
  
      g_value_init (&value, GST_TYPE_BUFFER);
@@@ -1122,7 -1168,6 +1122,7 @@@ gst_ogg_mux_send_headers (GstOggMux * m
      GstCaps *caps;
      GstStructure *structure;
      GstBuffer *hbuf;
 +    gsize size;
  
      pad = (GstOggPadData *) walk->data;
      thepad = pad->collect.pad;
      }
  
      /* create a packet from the buffer */
 -    packet.packet = GST_BUFFER_DATA (buf);
 -    packet.bytes = GST_BUFFER_SIZE (buf);
 +    packet.packet = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
 +    packet.bytes = size;
      packet.granulepos = GST_BUFFER_OFFSET_END (buf);
      if (packet.granulepos == -1)
        packet.granulepos = 0;
  
      /* swap the packet in */
      ogg_stream_packetin (&pad->map.stream, &packet);
 +
 +    gst_buffer_unmap (buf, packet.packet, size);
      gst_buffer_unref (buf);
  
      GST_LOG_OBJECT (thepad, "flushing out BOS page");
        GstBuffer *buf = GST_BUFFER (hwalk->data);
        ogg_packet packet;
        ogg_page page;
 +      gsize size;
  
        hwalk = hwalk->next;
  
        /* create a packet from the buffer */
 -      packet.packet = GST_BUFFER_DATA (buf);
 -      packet.bytes = GST_BUFFER_SIZE (buf);
 +      packet.packet = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
 +      packet.bytes = size;
        packet.granulepos = GST_BUFFER_OFFSET_END (buf);
        if (packet.granulepos == -1)
          packet.granulepos = 0;
  
        /* swap the packet in */
        ogg_stream_packetin (&pad->map.stream, &packet);
 +      gst_buffer_unmap (buf, packet.packet, size);
        gst_buffer_unref (buf);
  
        /* if last header, flush page */
    /* hbufs holds all buffers for the headers now */
  
    /* create caps with the buffers */
 -  caps = gst_pad_get_caps (mux->srcpad);
 +  caps = gst_pad_get_caps (mux->srcpad, NULL);
    if (caps) {
      caps = gst_ogg_mux_set_header_on_caps (caps, hbufs);
      gst_pad_set_caps (mux->srcpad, caps);
@@@ -1319,14 -1360,31 +1319,31 @@@ gst_ogg_mux_process_best_pad (GstOggMu
  
    GST_LOG_OBJECT (ogg_mux, "best pad %" GST_PTR_FORMAT
        ", currently pulling from %" GST_PTR_FORMAT, best->collect.pad,
-       ogg_mux->pulling);
+       ogg_mux->pulling ? ogg_mux->pulling->collect.pad : NULL);
+   if (ogg_mux->pulling) {
+     next_buf = gst_collect_pads_peek (ogg_mux->collect,
+         &ogg_mux->pulling->collect);
+     if (next_buf) {
+       ogg_mux->pulling->eos = FALSE;
+       gst_buffer_unref (next_buf);
+     } else {
+       GST_DEBUG_OBJECT (ogg_mux->pulling->collect.pad, "setting eos to true");
+       ogg_mux->pulling->eos = TRUE;
+     }
+   }
  
-   next_buf = gst_collect_pads_peek (ogg_mux->collect, &best->collect);
-   if (next_buf) {
-     best->eos = FALSE;
-     gst_buffer_unref (next_buf);
-   } else {
-     best->eos = TRUE;
+   /* We could end up pushing from the best pad instead, so check that
+    * as well */
+   if (best && best != ogg_mux->pulling) {
+     next_buf = gst_collect_pads_peek (ogg_mux->collect, &best->collect);
+     if (next_buf) {
+       best->eos = FALSE;
+       gst_buffer_unref (next_buf);
+     } else {
+       GST_DEBUG_OBJECT (best->collect.pad, "setting eos to true");
+       best->eos = TRUE;
+     }
    }
  
    /* if we were already pulling from one pad, but the new "best" buffer is
      GstOggPadData *pad = ogg_mux->pulling;
      gint64 duration;
      gboolean force_flush;
 +    gsize size;
  
      GST_LOG_OBJECT (ogg_mux->pulling->collect.pad, "pulling from pad");
  
            GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
      }
      /* create a packet from the buffer */
 -    packet.packet = GST_BUFFER_DATA (buf);
 -    packet.bytes = GST_BUFFER_SIZE (buf);
 +    packet.packet = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
 +    packet.bytes = size;
      packet.granulepos = GST_BUFFER_OFFSET_END (buf);
      if (packet.granulepos == -1)
        packet.granulepos = 0;
          GST_GP_CAST (packet.granulepos), (gint64) packet.packetno,
          packet.bytes);
  
-     packet.e_o_s = best->eos ? 1 : 0;
+     packet.e_o_s = ogg_mux->pulling->eos ? 1 : 0;
      tmpbuf = NULL;
  
      /* we flush when we see a new keyframe */
        GST_DEBUG_OBJECT (pad->collect.pad, "swapping in BOS packet");
  
      ogg_stream_packetin (&pad->map.stream, &packet);
 +    gst_buffer_unmap (buf, packet.packet, size);
      pad->data_pushed = TRUE;
  
      gp_time = GST_BUFFER_OFFSET (pad->buffer);
@@@ -1620,7 -1676,8 +1637,8 @@@ all_pads_eos (GstCollectPads * pads
    while (walk) {
      GstOggPadData *oggpad = (GstOggPadData *) walk->data;
  
-     GST_DEBUG ("oggpad %p eos %d", oggpad, oggpad->eos);
+     GST_DEBUG_OBJECT (oggpad->collect.pad,
+         "oggpad %p eos %d", oggpad, oggpad->eos);
  
      if (oggpad->eos == FALSE)
        return FALSE;
@@@ -130,7 -130,7 +130,7 @@@ static gboolea
  utf8_type_find_have_valid_utf8_at_offset (GstTypeFind * tf, guint64 offset,
      GstTypeFindProbability * prob)
  {
 -  guint8 *data;
 +  const guint8 *data;
  
    /* randomly decided values */
    guint min_size = 16;          /* minimum size  */
@@@ -222,7 -222,7 +222,7 @@@ static GstStaticCaps uri_caps = GST_STA
  static void
  uri_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, BUFFER_SIZE);
 +  const guint8 *data = gst_type_find_peek (tf, 0, BUFFER_SIZE);
    guint pos = 0;
    guint offset = 0;
  
@@@ -322,7 -322,7 +322,7 @@@ xml_check_first_element (GstTypeFind * 
      gboolean strict)
  {
    gboolean got_xmldec;
 -  guint8 *data;
 +  const guint8 *data;
    guint offset = 0;
    guint pos = 0;
  
@@@ -386,7 -386,7 +386,7 @@@ static GstStaticCaps sdp_caps = GST_STA
  static gboolean
  sdp_check_header (GstTypeFind * tf)
  {
 -  guint8 *data;
 +  const guint8 *data;
  
    data = gst_type_find_peek (tf, 0, 5);
    if (!data)
@@@ -433,9 -433,9 +433,9 @@@ static GstStaticCaps html_caps = GST_ST
  static void
  html_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  gchar *d, *data;
 +  const gchar *d, *data;
  
 -  data = (gchar *) gst_type_find_peek (tf, 0, 16);
 +  data = (const gchar *) gst_type_find_peek (tf, 0, 16);
    if (!data)
      return;
  
    } else if (xml_check_first_element (tf, "html", 4, FALSE)) {
      gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, HTML_CAPS);
    } else if ((d = memchr (data, '<', 16))) {
 -    data = (gchar *) gst_type_find_peek (tf, d - data, 6);
 +    data = (const gchar *) gst_type_find_peek (tf, d - data, 6);
      if (data && g_ascii_strncasecmp (data, "<html>", 6) == 0) {
        gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, HTML_CAPS);
      }
@@@ -459,7 -459,7 +459,7 @@@ static GstStaticCaps mid_caps = GST_STA
  static void
  mid_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    /* http://jedi.ks.uiuc.edu/~johns/links/music/midifile.html */
    if (data && data[0] == 'M' && data[1] == 'T' && data[2] == 'h'
@@@ -475,7 -475,7 +475,7 @@@ static GstStaticCaps mxmf_caps = GST_ST
  static void
  mxmf_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = NULL;
 +  const guint8 *data = NULL;
  
    /* Search FileId "XMF_" 4 bytes */
    data = gst_type_find_peek (tf, 0, 4);
@@@ -503,7 -503,7 +503,7 @@@ static GstStaticCaps flx_caps = GST_STA
  static void
  flx_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 134);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 134);
  
    if (data) {
      /* check magic and the frame type of the first frame */
@@@ -534,7 -534,7 +534,7 @@@ static GstStaticCaps id3_caps = GST_STA
  static void
  id3v2_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 10);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 10);
  
    if (data && memcmp (data, "ID3", 3) == 0 &&
        data[3] != 0xFF && data[4] != 0xFF &&
  static void
  id3v1_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, -128, 3);
 +  const guint8 *data = gst_type_find_peek (tf, -128, 3);
  
    if (data && memcmp (data, "TAG", 3) == 0) {
      gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, ID3_CAPS);
@@@ -562,7 -562,7 +562,7 @@@ static GstStaticCaps apetag_caps = GST_
  static void
  apetag_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data;
 +  const guint8 *data;
  
    /* APEv1/2 at start of file */
    data = gst_type_find_peek (tf, 0, 8);
@@@ -587,7 -587,7 +587,7 @@@ static GstStaticCaps tta_caps = GST_STA
  static void
  tta_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 3);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 3);
  
    if (data) {
      if (memcmp (data, "TTA", 3) == 0) {
@@@ -985,8 -985,8 +985,8 @@@ static voi
  mp3_type_find_at_offset (GstTypeFind * tf, guint64 start_off,
      guint * found_layer, GstTypeFindProbability * found_prob)
  {
 -  guint8 *data = NULL;
 -  guint8 *data_end = NULL;
 +  const guint8 *data = NULL;
 +  const guint8 *data_end = NULL;
    guint size;
    guint64 skipped;
    gint last_free_offset = -1;
        data_end = data + size;
      }
      if (*data == 0xFF) {
 -      guint8 *head_data = NULL;
 +      const guint8 *head_data = NULL;
        guint layer = 0, bitrate, samplerate, channels;
        guint found = 0;          /* number of valid headers found */
        guint64 offset = skipped;
@@@ -1123,7 -1123,7 +1123,7 @@@ static voi
  mp3_type_find (GstTypeFind * tf, gpointer unused)
  {
    GstTypeFindProbability prob, mid_prob;
 -  guint8 *data;
 +  const guint8 *data;
    guint layer, mid_layer;
    guint64 length;
  
@@@ -1193,7 -1193,7 +1193,7 @@@ GST_STATIC_CAPS ("audio/x-musepack, str
  static void
  musepack_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
    GstTypeFindProbability prop = GST_TYPE_FIND_MINIMUM;
    gint streamversion = -1;
  
@@@ -1515,7 -1515,7 +1515,7 @@@ wavpack_type_find (GstTypeFind * tf, gp
  {
    guint64 offset;
    guint32 blocksize;
 -  guint8 *data;
 +  const guint8 *data;
  
    data = gst_type_find_peek (tf, 0, 32);
    if (!data)
@@@ -1578,7 -1578,7 +1578,7 @@@ GST_STATIC_CAPS ("application/postscrip
  static void
  postscript_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 3);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 3);
    if (!data)
      return;
  
@@@ -1628,8 -1628,8 +1628,8 @@@ GST_STATIC_CAPS ("multipart/x-mixed-rep
  static void
  multipart_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data;
 -  guint8 *x;
 +  const guint8 *data;
 +  const guint8 *x;
  
  #define MULTIPART_MAX_BOUNDARY_OFFSET 16
    data = gst_type_find_peek (tf, 0, MULTIPART_MAX_BOUNDARY_OFFSET);
@@@ -1738,7 -1738,7 +1738,7 @@@ mpeg_sys_is_valid_pack (GstTypeFind * t
  }
  
  static gboolean
 -mpeg_sys_is_valid_pes (GstTypeFind * tf, guint8 * data, guint len,
 +mpeg_sys_is_valid_pes (GstTypeFind * tf, const guint8 * data, guint len,
      guint * pack_size)
  {
    guint pes_packet_len;
  }
  
  static gboolean
 -mpeg_sys_is_valid_sys (GstTypeFind * tf, guint8 * data, guint len,
 +mpeg_sys_is_valid_sys (GstTypeFind * tf, const guint8 * data, guint len,
      guint * pack_size)
  {
    guint sys_hdr_len;
  static void
  mpeg_sys_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data, *data0, *first_sync, *end;
 +  const guint8 *data, *data0, *first_sync, *end;
    gint mpegversion = 0;
    guint pack_headers = 0;
    guint pes_headers = 0;
@@@ -1948,7 -1948,7 +1948,7 @@@ mpeg_ts_probe_headers (GstTypeFind * tf
  {
    /* We always enter this function having found at least one header already */
    gint found = 1;
 -  guint8 *data = NULL;
 +  const guint8 *data = NULL;
  
    GST_LOG ("looking for mpeg-ts packets of size %u", packet_size);
    while (found < GST_MPEGTS_TYPEFIND_MAX_HEADERS) {
@@@ -1973,7 -1973,8 +1973,7 @@@ mpeg_ts_type_find (GstTypeFind * tf, gp
    /* TS packet sizes to test: normal, DVHS packet size and 
     * FEC with 16 or 20 byte codes packet size. */
    const gint pack_sizes[] = { 188, 192, 204, 208 };
 -
 -  guint8 *data = NULL;
 +  const guint8 *data = NULL;
    guint size = 0;
    guint64 skipped = 0;
  
@@@ -2408,7 -2409,7 +2408,7 @@@ static GstStaticCaps aiff_caps = GST_ST
  static void
  aiff_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if (data && memcmp (data, "FORM", 4) == 0) {
      data += 8;
@@@ -2425,7 -2426,7 +2425,7 @@@ static GstStaticCaps svx_caps = GST_STA
  static void
  svx_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if (data && memcmp (data, "FORM", 4) == 0) {
      data += 8;
@@@ -2442,7 -2443,7 +2442,7 @@@ static GstStaticCaps shn_caps = GST_STA
  static void
  shn_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if (data && memcmp (data, "ajkg", 4) == 0) {
      gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, SHN_CAPS);
@@@ -2461,7 -2462,7 +2461,7 @@@ static GstStaticCaps ape_caps = GST_STA
  static void
  ape_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if (data && memcmp (data, "MAC ", 4) == 0) {
      gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY + 10, APE_CAPS);
@@@ -2478,7 -2479,7 +2478,7 @@@ static GstStaticCaps m4a_caps = GST_STA
  static void
  m4a_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 4, 8);
 +  const guint8 *data = gst_type_find_peek (tf, 4, 8);
  
    if (data && (memcmp (data, "ftypM4A ", 8) == 0)) {
      gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, M4A_CAPS);
@@@ -2515,7 -2516,7 +2515,7 @@@ q3gp_type_find (GstTypeFind * tf, gpoin
    const gchar *profile;
    guint32 ftyp_size = 0;
    gint offset = 0;
 -  guint8 *data = NULL;
 +  const guint8 *data = NULL;
  
    if ((data = gst_type_find_peek (tf, 0, 12)) == NULL) {
      return;
@@@ -2565,7 -2566,7 +2565,7 @@@ static GstStaticCaps jp2_caps = GST_STA
  static void
  jp2_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data;
 +  const guint8 *data;
  
    data = gst_type_find_peek (tf, 0, 24);
    if (!data)
@@@ -2596,7 -2597,7 +2596,7 @@@ static GstStaticCaps qt_caps = GST_STAT
  static void
  qt_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data;
 +  const guint8 *data;
    guint tip = 0;
    guint64 offset = 0;
    guint64 size;
        }
      }
      if (size == 1) {
 -      guint8 *sizedata;
 +      const guint8 *sizedata;
  
        sizedata = gst_type_find_peek (tf, offset + 8, 8);
        if (sizedata == NULL)
@@@ -2759,7 -2760,7 +2759,7 @@@ static GstStaticCaps mod_caps = GST_STA
  static void
  mod_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data;
 +  const guint8 *data;
  
    /* MOD */
    if ((data = gst_type_find_peek (tf, 1080, 4)) != NULL) {
      }
      /* DSM */
      if (memcmp (data, "RIFF", 4) == 0) {
 -      guint8 *data2 = gst_type_find_peek (tf, 8, 4);
 +      const guint8 *data2 = gst_type_find_peek (tf, 8, 4);
  
        if (data2) {
          if (memcmp (data2, "DSMF", 4) == 0) {
      }
      /* FAM */
      if (memcmp (data, "FAM\xFE", 4) == 0) {
 -      guint8 *data2 = gst_type_find_peek (tf, 44, 3);
 +      const guint8 *data2 = gst_type_find_peek (tf, 44, 3);
  
        if (data2) {
          if (memcmp (data2, "compare", 3) == 0) {
      }
      /* GDM */
      if (memcmp (data, "GDM\xFE", 4) == 0) {
 -      guint8 *data2 = gst_type_find_peek (tf, 71, 4);
 +      const guint8 *data2 = gst_type_find_peek (tf, 71, 4);
  
        if (data2) {
          if (memcmp (data2, "GMFS", 4) == 0) {
    if ((data = gst_type_find_peek (tf, 20, 8)) != NULL) {
      if (g_ascii_strncasecmp ((gchar *) data, "!Scream!", 8) == 0 ||
          g_ascii_strncasecmp ((gchar *) data, "BMOD2STM", 8) == 0) {
 -      guint8 *id, *stmtype;
 +      const guint8 *id, *stmtype;
  
        if ((id = gst_type_find_peek (tf, 28, 1)) == NULL)
          return;
@@@ -2892,7 -2893,7 +2892,7 @@@ GST_STATIC_CAPS ("application/x-shockwa
  static void
  swf_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if (data && (data[0] == 'F' || data[0] == 'C') &&
        data[1] == 'W' && data[2] == 'S') {
@@@ -3083,7 -3084,7 +3083,7 @@@ static GstStaticCaps tiff_le_caps = GST
  static void
  tiff_type_find (GstTypeFind * tf, gpointer ununsed)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 8);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 8);
    guint8 le_header[4] = { 0x49, 0x49, 0x2A, 0x00 };
    guint8 be_header[4] = { 0x4D, 0x4D, 0x00, 0x2A };
  
@@@ -3200,7 -3201,7 +3200,7 @@@ static GstStaticCaps sds_caps = GST_STA
  static void
  sds_type_find (GstTypeFind * tf, gpointer ununsed)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
    guint8 mask[4] = { 0xFF, 0xFF, 0x80, 0xFF };
    guint8 match[4] = { 0xF0, 0x7E, 0, 0x01 };
    gint x;
@@@ -3221,7 -3222,7 +3221,7 @@@ static GstStaticCaps ircam_caps = GST_S
  static void
  ircam_type_find (GstTypeFind * tf, gpointer ununsed)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
    guint8 mask[4] = { 0xFF, 0xFF, 0xF8, 0xFF };
    guint8 match[4] = { 0x64, 0xA3, 0x00, 0x00 };
    gint x;
@@@ -3253,7 -3254,7 +3253,7 @@@ static gboolea
  ebml_check_header (GstTypeFind * tf, const gchar * doctype, int doctype_len)
  {
    /* 4 bytes for EBML ID, 1 byte for header length identifier */
 -  guint8 *data = gst_type_find_peek (tf, 0, 4 + 1);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4 + 1);
    gint len_mask = 0x80, size = 1, n = 1, total;
  
    if (!data)
@@@ -3381,7 -3382,7 +3381,7 @@@ static GstStaticCaps dv_caps = GST_STAT
  static void
  dv_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data;
 +  const guint8 *data;
  
    data = gst_type_find_peek (tf, 0, 5);
  
@@@ -3413,7 -3414,7 +3413,7 @@@ static GstStaticCaps ogg_annodex_caps 
  static void
  ogganx_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if ((data != NULL) && (memcmp (data, "OggS", 4) == 0)) {
  
@@@ -3435,7 -3436,7 +3435,7 @@@ static GstStaticCaps vorbis_caps = GST_
  static void
  vorbis_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 30);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 30);
  
    if (data) {
      guint blocksize_0;
@@@ -3480,7 -3481,7 +3480,7 @@@ static GstStaticCaps theora_caps = GST_
  static void
  theora_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 7); //42);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 7);   //42);
  
    if (data) {
      if (data[0] != 0x80)
  static void
  kate_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 64);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 64);
    gchar category[16] = { 0, };
  
    if (G_UNLIKELY (data == NULL))
@@@ -3530,7 -3531,7 +3530,7 @@@ GST_STATIC_CAPS ("application/x-ogm-vid
  static void
  ogmvideo_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 9);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 9);
  
    if (data) {
      if (memcmp (data, "\001video\000\000\000", 9) != 0)
@@@ -3545,7 -3546,7 +3545,7 @@@ GST_STATIC_CAPS ("application/x-ogm-aud
  static void
  ogmaudio_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 9);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 9);
  
    if (data) {
      if (memcmp (data, "\001audio\000\000\000", 9) != 0)
@@@ -3560,7 -3561,7 +3560,7 @@@ static GstStaticCaps ogmtext_caps = GST
  static void
  ogmtext_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 9);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 9);
  
    if (data) {
      if (memcmp (data, "\001text\000\000\000\000", 9) != 0)
@@@ -3577,7 -3578,7 +3577,7 @@@ static GstStaticCaps speex_caps = GST_S
  static void
  speex_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 80);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 80);
  
    if (data) {
      /* 8 byte string "Speex   "
@@@ -3613,7 -3614,7 +3613,7 @@@ static GstStaticCaps celt_caps = GST_ST
  static void
  celt_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 8);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 8);
  
    if (data) {
      /* 8 byte string "CELT   " */
@@@ -3632,7 -3633,7 +3632,7 @@@ GST_STATIC_CAPS ("application/x-ogg-ske
  static void
  oggskel_type_find (GstTypeFind * tf, gpointer private)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 12);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 12);
  
    if (data) {
      /* 8 byte string "fishead\0" for the ogg skeleton stream */
@@@ -3658,7 -3659,7 +3658,7 @@@ static voi
  cmml_type_find (GstTypeFind * tf, gpointer private)
  {
    /* Header is 12 bytes minimum (though we don't check the minor version */
 -  guint8 *data = gst_type_find_peek (tf, 0, 12);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 12);
  
    if (data) {
  
@@@ -3685,7 -3686,7 +3685,7 @@@ static GstStaticCaps tar_caps = GST_STA
  static void
  tar_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 257, 8);
 +  const guint8 *data = gst_type_find_peek (tf, 257, 8);
  
    /* of course we are not certain, but we don't want other typefind funcs
     * to detect formats of files within the tar archive, e.g. mp3s */
@@@ -3707,7 -3708,7 +3707,7 @@@ static GstStaticCaps ar_caps = GST_STAT
  static void
  ar_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 24);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 24);
  
    if (data && memcmp (data, "!<arch>", 7) == 0) {
      gint i;
@@@ -3734,7 -3735,7 +3734,7 @@@ static GstStaticCaps au_caps = GST_STAT
  static void
  au_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if (data) {
      if (memcmp (data, ".snd", 4) == 0 || memcmp (data, "dns.", 4) == 0) {
@@@ -3756,7 -3757,7 +3756,7 @@@ static GstStaticCaps nuv_caps = GST_STA
  static void
  nuv_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 11);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 11);
  
    if (data) {
      if (memcmp (data, "MythTVVideo", 11) == 0
@@@ -3774,7 -3775,7 +3774,7 @@@ static GstStaticCaps paris_caps = GST_S
  static void
  paris_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 4);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 4);
  
    if (data) {
      if (memcmp (data, " paf", 4) == 0 || memcmp (data, "fap ", 4) == 0) {
@@@ -3791,7 -3792,7 +3791,7 @@@ static GstStaticCaps ilbc_caps = GST_ST
  static void
  ilbc_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 8);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 8);
  
    if (data) {
      if (memcmp (data, "#!iLBC30", 8) == 0 || memcmp (data, "#!iLBC20", 8) == 0) {
@@@ -3809,7 -3810,7 +3809,7 @@@ GST_STATIC_CAPS ("application/x-ms-dos-
  static void
  msdos_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 64);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 64);
  
    if (data && data[0] == 'M' && data[1] == 'Z' &&
        GST_READ_UINT16_LE (data + 8) == 4) {
@@@ -3836,7 -3837,7 +3836,7 @@@ mmsh_type_find (GstTypeFind * tf, gpoin
      0xcf, 0x11, 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c
    };
  
 -  guint8 *data;
 +  const guint8 *data;
  
    data = gst_type_find_peek (tf, 0, 2 + 2 + 4 + 2 + 2 + 16);
    if (data && data[0] == 0x24 && data[1] == 0x48 &&
@@@ -3858,7 -3859,7 +3858,7 @@@ static GstStaticCaps dirac_caps = GST_S
  static void
  dirac_type_find (GstTypeFind * tf, gpointer unused)
  {
 -  guint8 *data = gst_type_find_peek (tf, 0, 8);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 8);
  
    if (data) {
      if (memcmp (data, "BBCD", 4) == 0 || memcmp (data, "KW-DIRAC", 8) == 0) {
@@@ -3879,7 -3880,7 +3879,7 @@@ vivo_type_find (GstTypeFind * tf, gpoin
    static const guint8 vivo_marker[] = { 'V', 'e', 'r', 's', 'i', 'o', 'n',
      ':', 'V', 'i', 'v', 'o', '/'
    };
 -  guint8 *data;
 +  const guint8 *data;
    guint hdr_len, pos;
  
    data = gst_type_find_peek (tf, 0, 1024);
@@@ -3917,7 -3918,7 +3917,7 @@@ xdgmime_typefind (GstTypeFind * find, g
    gchar *mimetype;
    gsize length = 16384;
    guint64 tf_length;
 -  guint8 *data;
 +  const guint8 *data;
    gchar *tmp;
  
    if ((tf_length = gst_type_find_get_length (find)) > 0)
  static void
  windows_icon_typefind (GstTypeFind * find, gpointer user_data)
  {
 -  guint8 *data;
 +  const guint8 *data;
    gint64 datalen;
    guint16 type, nimages;
    gint32 size, offset;
  static void
  wbmp_typefind (GstTypeFind * find, gpointer user_data)
  {
 -  guint8 *data;
 +  const guint8 *data;
    gint64 datalen;
    guint w, h, size;
  
@@@ -4090,7 -4091,7 +4090,7 @@@ degas_type_find (GstTypeFind * tf, gpoi
      if (resolution <= 2) {
        data = gst_type_find_peek (tf, len - 16, 8);
        if (G_UNLIKELY (data == NULL))
 -      return;
 +        return;
        for (n = 0; n < 4; n++) {
          if (GST_READ_UINT16_BE (data + n * 2) > 2)
            return;
      if ((resolution & 0x8000) && (resolution & 0x7fff) <= 2) {
        data = gst_type_find_peek (tf, len - 16, 8);
        if (G_UNLIKELY (data == NULL))
 -      return;
 +        return;
        for (n = 0; n < 4; n++) {
          if (GST_READ_UINT16_BE (data + n * 2) > 2)
            return;
@@@ -4129,7 -4130,7 +4129,7 @@@ static voi
  start_with_type_find (GstTypeFind * tf, gpointer private)
  {
    GstTypeFindData *start_with = (GstTypeFindData *) private;
 -  guint8 *data;
 +  const guint8 *data;
  
    GST_LOG ("trying to find mime type %s with the first %u bytes of data",
        gst_structure_get_name (gst_caps_get_structure (start_with->caps, 0)),
@@@ -4169,7 -4170,7 +4169,7 @@@ static voi
  riff_type_find (GstTypeFind * tf, gpointer private)
  {
    GstTypeFindData *riff_data = (GstTypeFindData *) private;
 -  guint8 *data = gst_type_find_peek (tf, 0, 12);
 +  const guint8 *data = gst_type_find_peek (tf, 0, 12);
  
    if (data && (memcmp (data, "RIFF", 4) == 0 || memcmp (data, "AVF0", 4) == 0)) {
      data += 8;
@@@ -4564,7 -4565,7 +4564,7 @@@ plugin_init (GstPlugin * plugin
    TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-vgm",
        GST_RANK_SECONDARY, vgm_exts, "Vgm\x20", 4, GST_TYPE_FIND_MAXIMUM);
    TYPE_FIND_REGISTER_START_WITH (plugin, "audio/x-sap",
-       GST_RANK_SECONDARY, sap_exts, "SAP\x0d\x0aAUTHOR\x20", 12,
+       GST_RANK_SECONDARY, sap_exts, "SAP\x0d\x0a" "AUTHOR\x20", 12,
        GST_TYPE_FIND_MAXIMUM);
    TYPE_FIND_REGISTER_START_WITH (plugin, "video/x-ivf", GST_RANK_SECONDARY,
        ivf_exts, "DKIF", 4, GST_TYPE_FIND_NEARLY_CERTAIN);