Commit graph

95 commits

Author SHA1 Message Date
Tim-Philipp Müller 3361d3286d tag: don't use GLib 2.22 API
g_mapped_file_unref() was introduced in GLib 2.22, but we depend
only on GLib 2.18, so use g_mapped_file_free() when compiling
against older GLib versions until we bump the GLib dependency.
2009-12-12 17:41:44 +00:00
Tim-Philipp Müller 088c7c07a2 tag: add some utility functions for language codes and tags
Add some utility functions for language tags and ISO-639
codes. These are useful for both GUIs and elements. The
iso-codes package is used for language name translations
if available.

API: gst_tag_get_language_codes()
API: gst_tag_get_language_name()
API: gst_tag_get_language_code()
API: gst_tag_get_language_code_iso_639_1()
API: gst_tag_get_language_code_iso_639_2B()
API: gst_tag_get_language_code_iso_639_2T()
2009-12-12 15:48:37 +00:00
Mark Nauwelaerts e18b42c0b6 tag: use BOM to recognize UTF-16/32 encoding and convert accordingly 2009-10-09 16:22:54 +02:00
Michael Smith 1f43f87023 vorbistag: don't ever return NULL in list of strings. 2009-09-15 15:55:34 -07:00
Sebastian Dröge df9b8b57b3 introspection: Build pkgconfig before all libraries and set PKG_CONFIG_PATH
This way g-ir-scanner can find the gstreamer-*-0.10 pkg-config files.
2009-09-13 11:19:50 +02:00
Sebastian Dröge 7e90e0846c introspection: Strip Gst prefix from all types/functions 2009-09-05 12:31:47 +02:00
Sebastian Dröge 7794caf9f8 introspection: Fix build if gir-repository is not installed 2009-09-05 11:49:41 +02:00
Sebastian Dröge 0c0ba97689 tag: Add gobject-introspection support 2009-09-05 11:35:34 +02:00
John Millikin cd31b2e298 tag: Add support for ALBUM_ARTIST tag in vorbiscomments and ID3v2 tags
Require latest core for this.

Fixes bug #590430.
2009-08-06 06:43:38 +02:00
Tim-Philipp Müller 5da78c8489 libgsttag: don't extract genres from empty ID3v1 tags
If we don't have any other info, don't try to interpret the
genre field. In particular we don't want to interpret a genre
of 0 as 'Blues' if no other fields are set and the entire tag
is just empty.
2009-06-06 12:04:12 +01:00
Michael Smith 35a9de28f4 gstid3tag: Don't extract a track number unless present.
In ID3v1, a track number is present only if byte 125 is null AND
byte 126 is non-null. If the track number is not present, don't add
a track number tag with value 0.
2009-05-19 18:12:18 -07:00
Sebastian Dröge 9fc4d195e1 vorbistag: Use text/uri-list as mimetype instead of ---> for URI lists 2009-05-12 09:03:22 +02:00
John Millikin ef473dd0ae vorbistag: Store cover art in vorbiscomments
Fixes bug #513373.
2009-05-12 09:03:22 +02:00
Tim-Philipp Müller 3d33e2a873 tagdemux: cache events from upstream and re-send them once we have a source pad
Makes sure tags don't get dropped when we have multiple tag demuxers in a row.
Fixes #580318.
2009-05-12 01:15:21 +01:00
Jan Schmidt 566583e871 vorbistag: Protect memory allocation calculation from overflow.
Patch by: Tomas Hoger <thoger@redhat.com> Fixes CVE-2009-0586
2009-03-12 15:02:07 +00:00
Sebastian Dröge d659e8353d tagdemux: Unref the actual buffer instead of the memory address of the buffer 2009-02-22 19:12:00 +01:00
Tim-Philipp Müller a624df17c4 tagdemux: don't abort when downstream pulls a buffer of size 0
Pulling a 0-sized buffer is allowed, and we should handle this correctly instead of
aborting. Fixes #571009 (wma file with ID3v2 tag).
2009-02-12 09:18:20 +00:00
Sebastian Dröge 98ea758763 gst-libs/gst/tag/gsttagdemux.c: Forward unknown events upstream to allow latency configuration.
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_srcpad_event):
Forward unknown events upstream to allow latency configuration.
Fixes bug #567960.
2009-01-16 11:40:02 +00:00
Edward Hervey 70a35897fb gst-libs/gst/tag/gsttagdemux.*: Add GType for GstTagDemuxResult enum.
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_result_get_type):
* gst-libs/gst/tag/gsttagdemux.h:
Add GType for GstTagDemuxResult enum.
2008-12-31 13:31:55 +00:00
Sebastian Dröge 4177ce6727 gst-libs/gst/tag/tags.c: Remove useless buffer size assignment. It already has this value.
Original commit message from CVS:
* gst-libs/gst/tag/tags.c: (gst_tag_image_data_to_image_buffer):
Remove useless buffer size assignment. It already has this value.
2008-10-22 12:01:32 +00:00
Sebastian Dröge 796fdbdf17 gst-libs/gst/tag/tags.c: Don't drop the last byte of image tags if they're not an URI list.
Original commit message from CVS:
* gst-libs/gst/tag/tags.c: (gst_tag_image_data_to_image_buffer):
Don't drop the last byte of image tags if they're not an URI list.
Fixes bug #556066.
2008-10-13 08:15:13 +00:00
Michael Smith 46ce5c3737 gst-libs/gst/tag/gsttagdemux.c: Fail to activate if there's insufficient data in the file to be usable, preventing an...
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c:
Fail to activate if there's insufficient data in the file to be usable,
preventing an assertion fail later. Fixes #552960
2008-09-22 17:44:14 +00:00
Stefan Kost 54acaa5706 Use new geo location tags from core. Fixes #481169
Original commit message from CVS:
* gst-libs/gst/tag/gstvorbistag.c:
* tests/check/libs/tag.c:
Use new geo location tags from core. Fixes #481169
2008-09-02 06:37:04 +00:00
Stefan Kost f73aa5b817 gst-libs/gst/: Reducing number of dundocumented symbols.
Original commit message from CVS:
* gst-libs/gst/audio/audio.h:
* gst-libs/gst/audio/gstaudiofilter.h:
* gst-libs/gst/audio/gstringbuffer.h:
* gst-libs/gst/interfaces/propertyprobe.h:
* gst-libs/gst/tag/gsttagdemux.h:
Reducing number of dundocumented symbols.
2008-08-11 08:34:56 +00:00
Frederic Crozat 89be246154 Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#546822).
Original commit message from CVS:
Patch by: Frederic Crozat <fcrozat@mandriva.org>
* ext/alsa/gstalsaplugin.c: (plugin_init):
* ext/cdparanoia/gstcdparanoiasrc.c: (plugin_init):
* ext/gnomevfs/gstgnomevfs.c: (plugin_init):
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_plugin_init):
* gst-libs/gst/audio/gstbaseaudiosrc.c: (_do_init):
* gst-libs/gst/pbutils/pbutils.c: (gst_pb_utils_init):
* gst-libs/gst/tag/tags.c: (gst_tag_register_tags_internal):
* gst/playback/gstdecodebin.c: (plugin_init):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_plugin_init):
* gst/playback/gstplayback.c: (plugin_init):
* gst/playback/gstqueue2.c: (plugin_init):
* gst/playback/gsturidecodebin.c: (gst_uri_decode_bin_plugin_init):
* sys/v4l/gstv4l.c: (plugin_init):
Make sure gettext returns translations in UTF-8 encoding rather
than in the current locale encoding (#546822).
2008-08-07 15:58:58 +00:00
Sebastian Dröge 31f3f65d53 gst-libs/gst/tag/tags.c: Don't increase the size of non-string image buffers by one as this might in theory confuse d...
Original commit message from CVS:
* gst-libs/gst/tag/tags.c: (gst_tag_image_data_to_image_buffer):
Don't increase the size of non-string image buffers by one as this
might in theory confuse decoders. Still increase it by one for string
image buffers to append '\0'.
2008-06-20 08:47:14 +00:00
John Millikin f934d1c233 gst-libs/gst/tag/gstvorbistag.c: Retrieve COVERART tags from vorbis comments (#512333)
Original commit message from CVS:
Based on patch by: John Millikin <jmillikin gmail com>
* gst-libs/gst/tag/gstvorbistag.c: (tag_matches), (gst_vorbis_tag_add),
(gst_vorbis_tag_add_coverart):
Retrieve COVERART tags from vorbis comments (#512333)
2008-06-03 20:01:58 +00:00
Tim-Philipp Müller 8b491df810 gst-libs/gst/tag/: Don't forget to add new enum value here too (should probably use glib-mkenums here...).
Original commit message from CVS:
* gst-libs/gst/tag/tag.h:
* gst-libs/gst/tag/tags.c: (register_tag_image_type_enum):
Don't forget to add new enum value here too (should probably use
glib-mkenums here...).
2008-06-03 19:44:48 +00:00
Tim-Philipp Müller cd9bb9a674 gst-libs/gst/tag/: API: add gst_tag_image_data_to_image_buffer()
Original commit message from CVS:
* gst-libs/gst/tag/gstid3tag.c: (gst_tag_list_add_id3_image):
* gst-libs/gst/tag/tag.h: (GST_TAG_IMAGE_TYPE_NONE),
* gst-libs/gst/tag/tags.c: (register_tag_image_type_enum),
(gst_tag_image_type_get_type), (gst_tag_image_type_is_valid),
(gst_tag_image_data_to_image_buffer):
Add two utility functions to avoid code duplication (#512333):
API: add gst_tag_image_data_to_image_buffer()
API: add gst_tag_list_add_id3_image()
2008-06-03 19:29:06 +00:00
Tim-Philipp Müller b191c8f609 gst-libs/gst/tag/gsttagdemux.c: Push tag event after the newsegment event. Log the pointer of the buffer we're actual...
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_chain):
Push tag event after the newsegment event. Log the pointer of
the buffer we're actually going to push rather than the buffer
we're feeding to _make_metadata_writable().
2008-02-27 10:23:27 +00:00
Jan Schmidt c571cc1e63 gst-libs/gst/tag/Makefile.am: Fix include path order
Original commit message from CVS:
* gst-libs/gst/tag/Makefile.am:
Fix include path order
2008-01-12 14:54:51 +00:00
Tim-Philipp Müller 526fd3d7da gst-libs/gst/tag/gsttagdemux.c: Post an error message if we can't pull as many bytes as we need for the tag. This mak...
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_pull_start_tag):
Post an error message if we can't pull as many bytes as we need
for the tag. This makes sure the user gets to see a proper error
message if a file with a partial ID3 tag is fed to decodebin, and
not a 'no ID3 tag demuxer' error, which would be confusing
(see #508138).
2008-01-08 21:10:02 +00:00
Tim-Philipp Müller dffc29eb13 gst-libs/gst/tag/gstid3tag.c: Add mapping for audio cd discid tags, so we can extract them from tags as well (see #34...
Original commit message from CVS:
* gst-libs/gst/tag/gstid3tag.c: (user_tag_matches),
(gst_tag_from_id3_user_tag):
Add mapping for audio cd discid tags, so we can extract
them from tags as well (see #347848). Also compare identifiers
in ID3v2 TXXX frames in a case-insensitive way to increase
compatibility when reading tags (discid vs. DiscID vs. DiscId).
2007-11-16 10:14:34 +00:00
Tim-Philipp Müller 698e4050b3 gst-libs/gst/tag/: Deprecate GST_TAG_MUSICBRAINZ_SORTNAME, replaced by the newly-added
Original commit message from CVS:
* gst-libs/gst/tag/tag.h: (GST_TAG_MUSICBRAINZ_SORTNAME):
* gst-libs/gst/tag/tags.c:
Deprecate GST_TAG_MUSICBRAINZ_SORTNAME, replaced by the newly-added
GST_TAG_ARTIST_SORTNAME (in an API and ABI compatible way).
* gst-libs/gst/tag/gstid3tag.c: (tag_matches):
Map ID3v2 TSOP, TSOA and TSOT frames to new SORTNAME tags (#414539).
* gst-libs/gst/tag/gstvorbistag.c: (tag_matches),
(gst_tag_to_vorbis_comments):
Map new SORTNAME tags (these tags aren't even semi-official, so I'm
just mapping everything I found in the wild) (#414539).
2007-10-25 15:10:59 +00:00
Tim-Philipp Müller d33e6ca818 gst-libs/gst/tag/gsttagdemux.c: Don't abort with an assertion if we receive a seek event with a start type of NONE (s...
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c:
Don't abort with an assertion if we receive a seek event with
a start type of NONE (see launchpad bug #155878).
2007-10-23 14:23:14 +00:00
Tim-Philipp Müller 689ca135f3 Extract vorbis comment LICENSE tags correctly.
Original commit message from CVS:
* gst-libs/gst/tag/gstvorbistag.c:
* tests/check/libs/tag.c:
Extract vorbis comment LICENSE tags correctly.
2007-10-11 18:24:09 +00:00
Jason Kivlighn 054e43aa3c Map ID3v2 WCOP frame to GST_TAG_COPYRIGHT_URI (#447000).
Original commit message from CVS:
Patch by: Jason Kivlighn  <jkivlighn gmail com>
* gst-libs/gst/tag/gstid3tag.c:
* tests/check/libs/tag.c:
Map ID3v2 WCOP frame to GST_TAG_COPYRIGHT_URI (#447000).
2007-10-11 16:12:21 +00:00
Tim-Philipp Müller 8458a74526 gst-libs/gst/tag/gsttagdemux.c: Don't error out when a buggy downstream element doesn't handle the newsegment event w...
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c:
Don't error out when a buggy downstream element doesn't
handle the newsegment event we send properly (especially
not without posting a meaningful error message on the
bus). See bug #471370 and launchpad bug #136264.
2007-10-10 17:01:51 +00:00
Tim-Philipp Müller d3648ca534 gst-libs/gst/tag/gsttagdemux.c: Don't leak caps.
Original commit message from CVS:
* gst-libs/gst/tag/gsttagdemux.c:
Don't leak caps.
2007-10-06 16:49:55 +00:00
Tim-Philipp Müller f277cd8801 gst-libs/gst/tag/: API: add GstTagDemux base class for simple tag demuxers.
Original commit message from CVS:
* gst-libs/gst/tag/Makefile.am:
* gst-libs/gst/tag/gsttagdemux.c:
* gst-libs/gst/tag/gsttagdemux.h:
API: add GstTagDemux base class for simple tag demuxers.
* docs/libs/gst-plugins-base-libs-docs.sgml:
* docs/libs/gst-plugins-base-libs-sections.txt:
Add GstTagDemux to docs.
2007-10-06 15:04:53 +00:00
Tim-Philipp Müller 3263d790f9 Add mappings for the new GST_TAG_COMPOSER for vorbis comments and ID3v2 tags.
Original commit message from CVS:
* configure.ac:
* gst-libs/gst/tag/gstid3tag.c:
* gst-libs/gst/tag/gstvorbistag.c:
Add mappings for the new GST_TAG_COMPOSER for vorbis comments
and ID3v2 tags.
2007-09-25 19:06:47 +00:00
Stefan Kost aac0353ce6 gst-libs/gst/: Make gtk-doc happy.
Original commit message from CVS:
* gst-libs/gst/interfaces/propertyprobe.c:
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
* gst-libs/gst/tag/gstvorbistag.c:
Make gtk-doc happy.
2007-07-10 20:46:41 +00:00
Tim-Philipp Müller 28ef3f5ddf gst-libs/gst/tag/tags.c: Don't pass trailing zeroes in fixed-size string arrays in ID3v1 tags to utf8-validate; fixes...
Original commit message from CVS:
* gst-libs/gst/tag/tags.c: (gst_tag_freeform_string_to_utf8):
Don't pass trailing zeroes in fixed-size string arrays in ID3v1 tags
to utf8-validate; fixes recognition of ID3v1 tags in UTF-8 encoding
(#451707); also, output some debugging info when dealing with
freeform strings.
* tests/check/libs/tag.c: (GST_START_TEST), (tag_suite):
Add unit test for the above.
2007-06-27 22:30:19 +00:00
Tim-Philipp Müller 83ab98b0fc gst-libs/gst/tag/tags.c: Try encodings from all environment variables, not just those in the first environment variab...
Original commit message from CVS:
* gst-libs/gst/tag/tags.c: (gst_tag_freeform_string_to_utf8):
Try encodings from all environment variables, not just those in the
first environment variable that is set.
2007-04-12 16:36:36 +00:00
Tim-Philipp Müller a208469078 API: add gst_tag_freeform_string_to_utf8() (#405072).
Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/tag/tag.h:
* gst-libs/gst/tag/tags.c: (gst_tag_freeform_string_to_utf8):
API: add gst_tag_freeform_string_to_utf8() (#405072).
* gst-libs/gst/tag/gstid3tag.c: (gst_tag_extract_id3v1_string):
Use gst_tag_freeform_string_to_utf8() here.
2007-04-12 12:19:20 +00:00
Tim-Philipp Müller 726f2c1732 Make sure we parse floating-point numbers in vorbis comments correctly with either '.' or ',' as separator, no matter...
Original commit message from CVS:
* gst-libs/gst/tag/gstvorbistag.c: (gst_vorbis_tag_add):
* tests/check/libs/tag.c: (GST_START_TEST):
Make sure we parse floating-point numbers in vorbis comments
correctly with either '.' or ',' as separator, no matter what
the current locale is. Add unit test for this too.
2007-03-27 10:17:16 +00:00
René Stadler 01a1e4bc81 gst-libs/gst/tag/gstvorbistag.c: When writing out floating-point numbers to vorbis comment tags, always use the same ...
Original commit message from CVS:
Patch by: René Stadler  <mail at renestadler de>
* gst-libs/gst/tag/gstvorbistag.c: (gst_tag_to_vorbis_comments):
When writing out floating-point numbers to vorbis comment tags, always
use the same character as separator no matter what the current locale is
(fixes #423051).
* tests/check/libs/tag.c: (GST_START_TEST):
Add unit tests for replaygain tags in vorbis comments (closes #423055).
2007-03-26 22:38:19 +00:00
Tim-Philipp Müller 4462906be4 gst-libs/gst/tag/gstvorbistag.c: Also accept partial dates with only year and month, like 1999-12-00 (fixes #410396 e...
Original commit message from CVS:
* gst-libs/gst/tag/gstvorbistag.c: (gst_vorbis_tag_add):
Also accept partial dates with only year and month,
like 1999-12-00 (fixes #410396 even more).
* tests/check/libs/tag.c: (GST_START_TEST):
Add unit test for the above.
2007-03-10 12:18:58 +00:00
Wim Taymans 5676bdaf81 gst-libs/gst/tag/gstid3tag.c: Add read support for GST_TAG_MUSICBRAINZ_SORTNAME (TSOP) tag.
Original commit message from CVS:
* gst-libs/gst/tag/gstid3tag.c:
Add read support for GST_TAG_MUSICBRAINZ_SORTNAME (TSOP) tag.
Fixes #414496.
2007-03-09 16:51:13 +00:00
René Stadler 88e94fc278 gst-libs/gst/tag/gstvorbistag.c: Parse date strings in vorbis comments that have an invalid (zero) month or day (#410...
Original commit message from CVS:
Patch by: René Stadler <mail at renestadler de>
* gst-libs/gst/tag/gstvorbistag.c: (gst_vorbis_tag_add):
Parse date strings in vorbis comments that have an invalid (zero)
month or day (#410396).
* tests/check/libs/tag.c: (GST_START_TEST):
Test case for the above.
2007-02-25 23:51:03 +00:00