/* update the APP markers
* - put any JFIF APP0 first
- * - the Exif APP1 next,
- * - the XMP APP1 next,
+ * - the Exif APP1 next,
+ * - the XMP APP1 next,
* - the PSIR APP13 next,
* - followed by all other marker segments
*/
memcpy (&data[29], xmp, size);
m = gst_jif_mux_new_marker (APP1, size + 29, data, TRUE);
- /*
+ /*
* Replace the old xmp marker and not add a new one.
* There shouldn't be a xmp packet in the input, but it is better
* to be safe than add another one and end up with 2 packets.
modified = TRUE;
}
- /* add jpeg comment */
+ /* add jpeg comment from any of those */
(void) (gst_tag_list_get_string (tags, GST_TAG_COMMENT, &str) ||
gst_tag_list_get_string (tags, GST_TAG_DESCRIPTION, &str) ||
gst_tag_list_get_string (tags, GST_TAG_TITLE, &str));
if (str) {
+ GST_DEBUG_OBJECT (self, "set COM marker to '%s'", str);
/* insert new marker into self->markers list */
m = gst_jif_mux_new_marker (COM, strlen (str) + 1, (const guint8 *) str,
TRUE);
if (marker >= APP0 && marker <= APP15) {
const gchar *id_str = NULL;
- if (!gst_byte_reader_peek_string_utf8 (reader, &id_str))
- return FALSE;
-
- GST_LOG_OBJECT (parse, "unhandled marker %x: '%s' skiping %u bytes",
- marker, id_str ? id_str : "(NULL)", size);
+ if (gst_byte_reader_peek_string_utf8 (reader, &id_str)) {
+ GST_DEBUG_OBJECT (parse, "unhandled marker %x: '%s' skiping %u bytes",
+ marker, id_str ? id_str : "(NULL)", size);
+ } else {
+ GST_DEBUG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker,
+ size);
+ }
}
#else
- GST_LOG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker, size);
+ GST_DEBUG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker,
+ size);
#endif // GST_DISABLE_DEBUG
if (!gst_byte_reader_skip (reader, size - 2))
} else {
parse->priv->tags = tags;
}
+ GST_DEBUG_OBJECT (parse, "collected tags: %" GST_PTR_FORMAT,
+ parse->priv->tags);
}
}
GstTagList *taglist = get_tag_list (parse);
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_COMMENT, comment, NULL);
+ GST_DEBUG_OBJECT (parse, "collected tags: %" GST_PTR_FORMAT, taglist);
g_free (comment);
}
}
if (parse->priv->tags) {
- GST_DEBUG_OBJECT (parse, "Pushing tags");
+ GST_DEBUG_OBJECT (parse, "Pushing tags: %" GST_PTR_FORMAT,
+ parse->priv->tags);
gst_element_found_tags_for_pad (GST_ELEMENT_CAST (parse),
parse->priv->srcpad, parse->priv->tags);
parse->priv->tags = NULL;
/* Hold on to the tags till the srcpad caps are definitely set */
gst_tag_list_insert (get_tag_list (parse), taglist,
GST_TAG_MERGE_REPLACE);
+ GST_DEBUG ("collected tags: %" GST_PTR_FORMAT, parse->priv->tags);
gst_event_unref (event);
}
break;