Commit graph

57 commits

Author SHA1 Message Date
Tim-Philipp Müller 76cc8b8f2a tag: add function to check whether a string is a valid language code
API: gst_tag_check_language_code()
2012-01-02 01:04:00 +00:00
Tim-Philipp Müller dfa23662e1 tag: fix writing of Exif tag payloads <= 4 bytes
When the payload for an Exif tag is less than or equal to 4 bytes,
the data is simply put into the offset field. Fix writing these
kinds of payloads on big endian systems (and possibly also on
little endian systems). The caller will have already formatted
the bytes in memory according to the writer's endianness, so just
write out the bytes as they are in this case. Fixes tags unit test
on big endian systems.
2011-12-23 22:24:44 +00:00
Thiago Santos 77353dad21 tag: xmp: Keep compatibility with our old generated xmp
We used to add a trailing \n to the end of generated xmp packets.
Windows viewer was unhappy with it and we fixed it in
96d2120c2b

The problem is that this caused xmp generated before this fix
to not be recognized and parsed anymore. This patch makes it
recognize xmp with the trailing \n and without, fixing the
regression. Also adds tests for it.
2011-12-22 08:12:28 -03:00
Stefan Sauer 81c9459771 tests: supress ERROR log output for some tests
Be nice when we tests for correct error handling and don't spam stdout.
2011-09-05 15:52:41 +02:00
Tim-Philipp Müller 6d875c5ccd tag: id3: avoid some more relocations in genre table 2011-08-16 12:27:25 +01:00
Thiago Santos 436c533624 tests: tag: exif: Add tests for 'non-trivial' chars
Adds two new cases to check that characters are properly
converted to ascii when writen to exif and parsed correctly
back to utf8 when read.
2011-08-10 17:46:01 -03:00
Tim-Philipp Müller 54e143c5e7 tag: add unit test for new license API
https://bugzilla.gnome.org/show_bug.cgi?id=646868
2011-08-10 10:34:22 +01:00
Thiago Santos 96d2120c2b tag: xmp: Remove extra chars from end of xmp packet
Windows picture viewer is unhappy with extra trailing chars at the
end of the xmppacket footer. So remove them as they aren't needed.
2011-06-29 10:18:23 -03:00
Thiago Santos f7c9f953cb tests: xmp: New tests for the Iptc4xmpExt tags 2011-05-15 13:02:39 -03:00
Thiago Santos 1b5a6395d2 tests: tag: Fix typo 2011-04-14 00:04:52 -03:00
Thiago Santos e57473178b tag: xmp: Adds mapping for GST_TAG_CAPTURING_EXPOSURE_COMPENSATION
Adds mapping for GST_TAG_CAPTURING_EXPOSURE_COMPENSATION for xmp
library.

Includes unit tests.
2011-04-14 00:04:52 -03:00
Thiago Santos dae1c37dfe tag: exif: Adds mapping for GST_TAG_CAPTURING_EXPOSURE_COMPENSATION
Adds mapping for GST_TAG_CAPTURING_EXPOSURE_COMPENSATION for exif
library.

Includes unit tests.
2011-04-14 00:04:52 -03:00
Tim-Philipp Müller 19db1e763f tests: fix leak in tag library unit test 2010-11-02 12:03:21 +00:00
Thiago Santos 5984ff1086 tag: Adds GST_TAG_CAPTURING_SOURCE
Adds a tag to indicate the source/device used for the capture.

Already maps it in exif and adds tests.

API: GST_TAG_CAPTURING_SOURCE

https://bugzilla.gnome.org/show_bug.cgi?id=631773
2010-10-16 00:50:11 +01:00
Thiago Santos b49f83d738 tag: Adds GST_TAG_CAPTURING_METERING_MODE
Adds a tag to inform what mode was used by a camera to calculate
the picture capturing exposure

Also adds mapping to exif and tests

API: GST_TAG_CAPTURING_METERING_MODE

https://bugzilla.gnome.org/show_bug.cgi?id=631773
2010-10-16 00:42:09 +01:00
Thiago Santos f67e7aacf3 tag: Adds GST_TAG_CAPTURING_SHARPNESS
Adds new tag for tagging sharpness processing used
when capturing an image. Also maps it in the exif
tags.

Tests included.

API: GST_TAG_CAPTURING_SHARPNESS

https://bugzilla.gnome.org/show_bug.cgi?id=631773
2010-10-16 00:31:07 +01:00
Thiago Santos 67eb531163 tag: Update with latest datetime from core
Updates datetime functions to latest APIs in core
2010-10-13 12:30:31 -03:00
Thiago Santos 10f0319d62 tags: exif: Add mapping for _HORIZONTAL_ERROR
Maps GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR to the
GPSHPositionError tag in exif.

Tests included.
2010-09-23 10:16:07 -03:00
Thiago Santos d54ba93945 tag: exif: Adds mappings for new image ppi tags
Adds mappings for GST_TAG_IMAGE_HORIZONTAL/VERTICAL_PPI into
our exif lib

Tests included.

Fixes #626570
2010-09-07 10:07:29 -03:00
Thiago Santos 9c5f791a34 tag: exif: Adds flash tags mapping
Adds a mapping for GST_TAG_CAPTURING_FLASH_FIRED/_MODE to
the exif Flash tag.

Tests included.
2010-08-25 08:36:59 -03:00
Thiago Santos ac361dcc3a tag: exif: More photography mappings
Adds mappings from:
GST_TAG_CAPTURING_EXPOSURE_PROGRAM -> ExposureProgram
GST_TAG_CAPTURING_EXPOSURE_MODE -> ExposureMode
GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE -> SceneCaptureType
GST_TAG_CAPTURING_GAIN_ADJUSTMENT -> GainControl
GST_TAG_CAPTURING_WHITE_BALANCE -> WhiteBalance
GST_TAG_CAPTURING_CONTRAST -> Constrast
GST_TAG_CAPTURING_SATURATION -> Saturation

Also renames gst_tag_image_orientation_from_exif_value and
gst_tag_image_orientation_to_exif_value to remove the 'gst'
prefix and not including in the win32 defs.

Tests included.
2010-08-25 08:32:19 -03:00
Thiago Santos 10d680b74d tag: exif: Adds photography tags mappings
Adds the following mappings for the exif helper:
* GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO -> DigitalZoomRatio
* GST_TAG_CAPTURING_FOCAL_LENGTH -> FocalLength
* GST_TAG_CAPTURING_SHUTTER_SPEED -> ExposureTime, ShutterSpeedValue
* GST_TAG_CAPTURING_FOCAL_RATIO -> FNumber, ApertureValue
* GST_TAG_CAPTURING_ISO_SPEED -> ISOSpeed, PhotographicSensitivity

Tests included.
2010-08-24 22:24:36 -03:00
Thiago Santos 57013ae63e tag: exif: Adds mapping for GST_TAG_APPLICATION_DATA
Adds mapping for GST_TAG_APPLICATION_DATA to the exif
'maker-note' tag.
2010-08-24 22:20:48 -03:00
Thiago Santos 61e11b0fc4 xmp: exif: Adds GST_TAG_APPLICATION_NAME mappings
adds xmp and exif helper library mappings for GST_TAG_APPLICATION_NAME
tag.
2010-08-09 18:04:08 -03:00
Thiago Santos f600b510fe tests: tag: Test to try to serialize multiple exif tags
Adds a new test for exif data that tries serializing data
from multiple ifd tables and check if it works.
2010-08-09 18:03:39 -03:00
Thiago Santos 2760c96dfc tag: xmp: Make bag tags deserialization work correctly
If we find a bag of tags of type string in the xmp packet, we
should concat them, this is not the ideal approach, but at
least works for now as we don't know what type of tag it
is (simple, structure, seq, alt or bag)
2010-08-04 09:56:39 -03:00
Thiago Santos 93f97277da tag: exif: Map GST_TAG_DATE_TIME
Adds mapping to the exif helper library for GST_TAG_DATE_TIME.
Tests included.

https://bugzilla.gnome.org/show_bug.cgi?id=594504
2010-07-26 12:00:31 -03:00
Thiago Santos 5e51a77df4 tag: xmp: Maps GST_TAG_DATE_TIME
Adds mapping for GST_TAG_DATE_TIME.
Tests included.

https://bugzilla.gnome.org/show_bug.cgi?id=594504
2010-07-26 12:00:30 -03:00
Thiago Santos c774cdcff0 tag: xmp: Adds GST_TAG_IMAGE_ORIENTATION mapping
Adds GST_TAG_IMAGE_ORIENTATION mapping to xmp helper lib.
Tests included.
2010-06-23 12:03:47 -03:00
Thiago Santos e327be5a96 tag: exif: Adds mapping for GST_TAG_IMAGE_ORIENTATION
Adds GST_TAG_IMAGE_ORIENTATION to the exif helper lib mapped tags.
Tests included.
2010-06-23 12:03:47 -03:00
Thiago Santos 491d025530 tag: exif: Adds new geo-location tag mappings
Adds mappings for:
GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION
GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
GST_TAG_GEO_LOCATION_MOVEMENT_SPEED
GST_TAG_GEO_LOCATION_ELEVATION

Does some refactoring in the code to reduce number of parameters
passed to functions

Tests included.
2010-06-09 16:26:43 -03:00
Thiago Santos 4418dc9cdf tests: tag: Adds unit tests for exif helper lib
Adds some simple unit tests for exif helper lib functions

Fixes #614872
2010-06-09 16:26:42 -03:00
Thiago Santos e879fc9ca3 tag: xmp: Adds new geo-location mappings
Adds GST_TAG_GEO_LOCATION_MOVEMENT_SPEED,
GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION and
GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION to xmp
mappings.

Tests included.
2010-05-03 14:14:25 -03:00
Thiago Santos a20aa39fa3 tag: xmp: Adds xmp mappings for device tags
Adds xmp mappings for GST_TAG_DEVICE_MANUFACTURER and
GST_TAG_DEVICE_MODEL. Also adds tests for it.
2010-05-03 14:14:03 -03:00
Thiago Santos 390b719e96 tests: tag: Refactor a bit
Refactor xmp tags unit tests and remove an useless assertion.

This will make easier to add unit tests to serialize/deserialize
taglists.
2010-04-04 22:34:19 -03:00
Thiago Santos 8fda870b29 tag: xmp: Adds _USER_RATING mapping for xmp
Adds a new mapping for _USER_RATING on xmp helper lib
and also adds tests for it
2010-03-24 15:34:52 -03:00
Thiago Santos 007bf4fe7c tag: xmp: Add Elevation tag mapping
Adds a mapping to the _ELEVATION tag, this is a different
mapping as it has to be mapped into exif:GPSAltitude and
exif:GPSAltitudeRef at the same time. So we needed to refactor
a little more to be able to deserialize it properly.

Now, when parsing a xmp buffer into a taglist all tags are
added to a list before being parsed so that when one of the
altitude tags are found the deserialization function can search
for its complementary tag to do the correct parsing

Fixes #613690
2010-03-24 15:34:40 -03:00
Thiago Santos 7ebbfbd3a5 tag: xmp: Adds mappings for LATITUDE and LONGITUDE
Adds the mappings for those tags and tests
for tags serialization.

Fixes #613690
2010-03-24 15:33:16 -03:00
Stefan Kost 8551c49ff9 tags: add basic xmp metadata support
XMP metadata can be embedded in many media container formats. Implement own
parser and formatter that can be used to convert between an xpacket and a
GstTagList. Add unit tests.
2010-03-11 10:52:56 +02:00
Tim-Philipp Müller fc73a73f0a checks: some more testing for the new language code functions 2009-12-13 18:42:11 +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
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
Tim-Philipp Müller af68c73c6c tests/check/libs/tag.c: GST_TAG_MUSICBRAINZ_SORTNAME is deprecated and we compile with
Original commit message from CVS:
* tests/check/libs/tag.c: (test_musicbrainz_tag_registration):
GST_TAG_MUSICBRAINZ_SORTNAME is deprecated and we compile with
-DGST_DISABLE_DEPRECATED, so use new GST_TAG_ARTIST_SORTNAME
instead.
2007-10-26 18:57:33 +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 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 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
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