+2004-01-31 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
+ * ext/theora/theoradec.c: (theora_dec_chain):
+ make comments work
+ * ext/vorbis/vorbisdec.c: (vorbis_dec_src_query),
+ (vorbis_dec_src_event), (vorbis_dec_chain):
+ add encoder tag, fix tag reading to be more error tolerant, change
+ BITRATE to NOMINAL_BITRATE, add debugging, don't unref events after
+ gst_pad_event_default.
+ * gst/tags/gstvorbistag.c:
+ (gst_tag_list_from_vorbiscomment_buffer):
+ undefine function specific define at end of function
+
2004-01-31 Jeremy Simon <jesimon@libertysurf.fr>
* ext/flac/gstflac.c: (plugin_init):
return;
}
if (packet.packetno == 1) {
- GstTagList *list = gst_tag_list_from_vorbiscomment_buffer (buf, "\101theora", 7, NULL);
+ gchar *encoder = NULL;
+ GstTagList *list = gst_tag_list_from_vorbiscomment_buffer (buf, "\201theora", 7, &encoder);
+ if (!list) {
+ GST_ERROR_OBJECT (dec, "failed to parse tags");
+ list = gst_tag_list_new ();
+ }
+ if (encoder) {
+ gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_ENCODER, encoder, NULL);
+ g_free (encoder);
+ }
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_ENCODER_VERSION, dec->info.version_major, NULL);
gst_element_found_tags_for_pad (GST_ELEMENT (dec), dec->srcpad, 0, list);
if (!vorbis_dec_from_granulepos (dec, *format, granulepos, value))
return FALSE;
- g_print ("peer returned granulepos: %llu - we return %llu\n", granulepos, *value);
+ GST_LOG_OBJECT (dec, "query %u: peer returned granulepos: %llu - we return %llu (format %u)\n",
+ query, granulepos, *value, *format);
return TRUE;
}
value);
res = gst_pad_send_event (GST_PAD_PEER (dec->sinkpad), real_seek);
}
+ gst_event_unref (event);
break;
}
default:
break;
}
- gst_event_unref (event);
return res;
}
static void
return;
}
if (packet.packetno == 1) {
- GstTagList *list = gst_tag_list_from_vorbiscomment_buffer (buf, "\003vorbis", 7, NULL);
+ gchar *encoder = NULL;
+ GstTagList *list = gst_tag_list_from_vorbiscomment_buffer (buf, "\003vorbis", 7, &encoder);
+ if (!list) {
+ GST_ERROR_OBJECT (vd, "couldn't decode comments");
+ list = gst_tag_list_new ();
+ }
+ if (encoder) {
+ gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_ENCODER, encoder, NULL);
+ g_free (encoder);
+ }
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_ENCODER_VERSION, vd->vi.version, NULL);
if (vd->vi.bitrate_upper)
GST_TAG_MAXIMUM_BITRATE, (guint) vd->vi.bitrate_upper, NULL);
if (vd->vi.bitrate_nominal)
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
- GST_TAG_BITRATE, (guint) vd->vi.bitrate_nominal, NULL);
+ GST_TAG_NOMINAL_BITRATE, (guint) vd->vi.bitrate_nominal, NULL);
if (vd->vi.bitrate_lower)
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_MINIMUM_BITRATE, (guint) vd->vi.bitrate_lower, NULL);