Commit graph

24 commits

Author SHA1 Message Date
Benjamin Otte 3f511ec361 Add -Wwrite-strings to the configure flags
... and fix all warnings
2010-03-21 14:17:47 +01:00
Josep Torra 114dbba7ad id3: fixes warnings building on macosx
Another round on the formating of that debug line.
2009-10-09 15:59:25 +02:00
Stefan Kost 53cb3e2716 id3: cast pointer math results to glong 2009-10-09 14:44:02 +03:00
Stefan Kost f41d7e7bd5 build: don't cast, but use the right format specified instead
This correct some of the previous macos fixes.
2009-10-09 13:54:24 +03:00
Josep Torra 093546ba74 id3demux: fix printf warnings on macosx 2009-10-09 11:43:45 +02:00
Tim-Philipp Müller 3ec0a31d64 id3demux: fix typo in debug message 2009-08-07 16:36:55 +01:00
Tim-Philipp Müller 2e05af3876 id3demux: fix parsing of unsync'ed ID3 v2.4 tags and frames
Reversing the unsynchronisation seems to work slightly differently
for ID3 v2.3 tags and v2.4 tags: v2.3 tags don't have syncsafe frame
sizes in the frame header, so the unsynchronisation is applied to
the whole frame data including all the frame headers. v2.4 frames
have sync-safe sizes, however, so the unsynchronisation only needs
to be applied to the actual frame data, and it seems that's what's
being done as well. So we need to undo the unsynchronisation on a
per-frame basis for v2.4 tags for things to work properly.

Fixes extraction of coverart/images from APIC frames in ID3 v2.4
tags (#588148).

Add unit test for this as well.
2009-08-07 16:02:23 +01:00
Tim-Philipp Müller a85d7b7059 id3demux: parse unsynchronised tags properly
We didn't handle unsynchronization at all up to now, which might have
caused frames to not be extracted - esp. frames after an APIC picture
frame. Fixes #577468.
2009-04-24 01:58:23 +01:00
Tim-Philipp Müller 19117a39fe id3demux: pass the right size value for size of all frames to the parser
Frame data size is tag size adjusted for size of the tag header and
footer, not tag size including header and footer.
2009-04-24 01:05:40 +01:00
Tim-Philipp Müller 62d8456eb7 gst/id3demux/: We don't want the same string multiple times in a tag list for the same tag ever, for any tag, not jus...
Original commit message from CVS:
* gst/id3demux/id3tags.c:
* gst/id3demux/id3tags.h:
* gst/id3demux/id3v2frames.c: (id3v2_tag_to_taglist):
We don't want the same string multiple times in a tag list for the
same tag ever, for any tag, not just for GST_TAG_GENRE, so make sure
this doesn't happen and remove special-case code for GST_TAG_GENRE.
2007-11-14 21:39:47 +00:00
Tim-Philipp Müller 3e413d6b6e gst/id3demux/: Port ID3 tag demuxer over to the new GstTagDemux in -base (now would be a good time to test re-importi...
Original commit message from CVS:
* gst/id3demux/gstid3demux.c:
* gst/id3demux/gstid3demux.h:
* gst/id3demux/id3tags.c:
* gst/id3demux/id3tags.h:
* gst/id3demux/id3v2frames.c:
Port ID3 tag demuxer over to the new GstTagDemux in -base
(now would be a good time to test re-importing your music
collection).
2007-10-06 16:13:14 +00:00
Tim-Philipp Müller 8ffc1761b3 gst/id3demux/: Do not convert obsolete TDA/TDAT frames to TDRC frames, otherwise the four-digit number will be interp...
Original commit message from CVS:
* gst/id3demux/id3tags.c: (id3demux_id3v2_frames_to_tag_list):
* gst/id3demux/id3tags.h:
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame),
(parse_obsolete_tdat_frame):
Do not convert obsolete TDA/TDAT frames to TDRC frames, otherwise
the four-digit number will be interpreted as a year, whereas it is
month and day in DDMM format. Instead, parse TDAT frames and fix up
the date in the GST_TAG_DATE tag later if we also extracted a year.
Fixes #407349.
2007-03-06 18:16:49 +00:00
Tim-Philipp Müller e23a7eec68 gst/id3demux/id3tags.c: Extract frames for ID3v2 versions prior to ID3v2.3.0 properly as well, and add the version to...
Original commit message from CVS:
* gst/id3demux/id3tags.c:
(id3demux_add_id3v2_frame_blob_to_taglist):
Extract frames for ID3v2 versions prior to ID3v2.3.0 properly as
well, and add the version to the blob's buffer caps, since that
information will be needed for deserialisation later on (#348644).
2006-07-25 16:47:04 +00:00
Tim-Philipp Müller 87b522209f gst/id3demux/: On second thought, it might be wiser and more efficient not to do tag registration from a streaming th...
Original commit message from CVS:
* gst/id3demux/gstid3demux.c: (plugin_init):
* gst/id3demux/id3tags.c:
(id3demux_add_id3v2_frame_blob_to_taglist):
* gst/id3demux/id3tags.h:
On second thought, it might be wiser and more efficient
not to do tag registration from a streaming thread.
2006-07-23 11:33:54 +00:00
Tim-Philipp Müller 92e494c3b1 gst/id3demux/id3tags.c: Put ID3v2 frames we can't parse as binary blobs into private tags, so that they are not lost ...
Original commit message from CVS:
* gst/id3demux/id3tags.c:
(id3demux_add_id3v2_frame_blob_to_taglist),
(id3demux_id3v2_frames_to_tag_list):
Put ID3v2 frames we can't parse as binary blobs into private
tags, so that they are not lost when retagging, at least once
id3v2mux has been taught to re-inject those frames again.
See bug #334375.
2006-07-23 10:56:27 +00:00
Wim Taymans c9b86e0a98 gst/avi/gstavidemux.c: Fix some leaks.
Original commit message from CVS:
* gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream),
(gst_avi_demux_process_next_entry):
Fix some leaks.
* gst/id3demux/id3tags.c: (id3demux_id3v2_frames_to_tag_list):
Don't use \n in debug lines.
2006-07-21 10:57:00 +00:00
Alex Lancaster 5ff469042f gst/id3demux/id3tags.c: (Fixes #338713)
Original commit message from CVS:
* gst/id3demux/id3tags.c:
Recognise TCO (Genre) tags in ID3v2.2. Patch by Alex Lancaster
(Fixes #338713)
2006-04-17 10:01:51 +00:00
Jan Schmidt 3f72e7205c gst/: Don't attempt typefinding on too-short buffers that have been completely trimmed away.
Original commit message from CVS:
* gst/apetag/gsttagdemux.c: (gst_tag_demux_chain):
* gst/id3demux/gstid3demux.c: (gst_id3demux_chain):
Don't attempt typefinding on too-short buffers that have been
completely trimmed away.
* gst/id3demux/id3tags.c: (id3demux_read_id3v2_tag):
Improve the debug output
2006-03-22 13:00:34 +00:00
Jan Schmidt c64021f87d gst/id3demux/: Handle 0 data size in otherwise valid frames.
Original commit message from CVS:
* gst/id3demux/id3tags.c: (id3demux_id3v2_frames_to_tag_list):
* gst/id3demux/id3v2frames.c: (id3v2_genre_fields_to_taglist):
Handle 0 data size in otherwise valid frames.
Handle numeric strings in 2.4.0 even when not in parentheses
2006-02-18 20:48:09 +00:00
Jan Schmidt cfafeaf4da gst/id3demux/id3tags.c: ID3 2.3.0 used synch-safe integers for the tag size, but not for the frame size. (Fixes #331368)
Original commit message from CVS:
* gst/id3demux/id3tags.c: (id3demux_id3v2_frames_to_tag_list):
ID3 2.3.0 used synch-safe integers for the tag size, but not for the
frame size. (Fixes #331368)
2006-02-16 10:58:18 +00:00
Jan Schmidt 1e661e8ff3 gst/id3demux/: Someone should kick my butt. Remove ID3v1 tags from the end of the file.
Original commit message from CVS:

* gst/id3demux/gstid3demux.c: (gst_id3demux_chain),
(gst_id3demux_read_id3v1), (gst_id3demux_sink_activate),
(gst_id3demux_send_tag_event):
* gst/id3demux/id3tags.c: (id3demux_read_id3v1_tag):
Someone should kick my butt. Remove ID3v1 tags from the end of the
file.

Improve error messages. Send the TAG message as soon as we complete
typefinding, instead of waiting until we send the first buffer.
Downstream tag event is still sent before the first buffer.
2006-01-30 23:13:05 +00:00
Jan Schmidt 2ecee9a43d gst/id3demux/: Rewrite parsing of text tags to handle multiple NULL terminated strings. Parse numeric genre strings a...
Original commit message from CVS:
* gst/id3demux/id3tags.c: (id3demux_read_id3v2_tag):
* gst/id3demux/id3tags.h:
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame),
(parse_comment_frame), (parse_text_identification_frame),
(id3v2_tag_to_taglist), (id3v2_are_digits),
(id3v2_genre_string_to_taglist), (id3v2_genre_fields_to_taglist),
(parse_split_strings), (free_tag_strings):
Rewrite parsing of text tags to handle multiple NULL terminated
strings. Parse numeric genre strings and ID3v2 type
"(3)(6)Alternative" style genre strings.
Parse dates that are only YYYY or YYYY-mm format.
2006-01-23 09:22:17 +00:00
Jan Schmidt 041a4a0d89 gst/id3demux/id3tags.c: If a broken tag has 0 bytes payload, at least still skip the 10 byte header
Original commit message from CVS:
* gst/id3demux/id3tags.c: (id3demux_read_id3v2_tag):
If a broken tag has 0 bytes payload, at least still skip
the 10 byte header
2005-12-28 18:55:32 +00:00
Jan Schmidt a05fc62783 configure.ac: Check for optional dependency on zlib for id3demux
Original commit message from CVS:
* configure.ac:
Check for optional dependency on zlib for id3demux

* gst/id3demux/Makefile.am:
* gst/id3demux/gstid3demux.c: (gst_gst_id3demux_get_type),
(gst_id3demux_base_init), (gst_id3demux_class_init),
(gst_id3demux_reset), (gst_id3demux_init), (gst_id3demux_dispose),
(gst_id3demux_add_srcpad), (gst_id3demux_remove_srcpad),
(gst_id3demux_trim_buffer), (gst_id3demux_chain),
(gst_id3demux_set_property), (gst_id3demux_get_property),
(id3demux_get_upstream_size), (gst_id3demux_srcpad_event),
(gst_id3demux_read_id3v1), (gst_id3demux_read_id3v2),
(gst_id3demux_sink_activate), (gst_id3demux_src_activate_pull),
(gst_id3demux_src_checkgetrange), (gst_id3demux_read_range),
(gst_id3demux_src_getrange), (gst_id3demux_change_state),
(gst_id3demux_pad_query), (gst_id3demux_get_query_types),
(simple_find_peek), (simple_find_suggest),
(gst_id3demux_do_typefind), (gst_id3demux_send_tag_event),
(plugin_init):
* gst/id3demux/gstid3demux.h:
* gst/id3demux/id3tags.c: (read_synch_uint),
(id3demux_read_id3v1_tag), (id3demux_read_id3v2_tag),
(id3demux_id3v2_frame_hdr_size), (convert_fid_to_v240),
(id3demux_id3v2_frames_to_tag_list):
* gst/id3demux/id3tags.h:
* gst/id3demux/id3v2.4.0-frames.txt:
* gst/id3demux/id3v2.4.0-structure.txt:
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame),
(parse_comment_frame), (parse_text_identification_frame),
(id3v2_tag_to_taglist), (parse_split_strings):
All new LGPL id3 demuxer. Can use zlib for compressed frames,
otherwise it discards them. Works on my test files.

* gst/wavparse/gstwavparse.c: (gst_wavparse_loop):
Don't send EOS to a non-existing srcpad
The debug category can be static
2005-12-18 15:14:44 +00:00