Commit graph

28 commits

Author SHA1 Message Date
Thiago Santos 75897c716f tag: xmp: Add missing schema creation
tiff schema entries were being added to the previous
schema (xap) because a new one wasn't being created
for it.
2011-03-21 18:37:36 -03:00
Mark Nauwelaerts 505fa27159 xmptag: cast argument to isdigit to int
... as that is the specification and fixes compilation on Cygwin:

gstxmptaag.c: In function 'read_one_tag':
gstxmptag.c:1015: error: array subscript has type 'char'
2011-01-31 19:21:32 +01:00
Thiago Santos 254088344c tag: xmp: Move static variable to local function
Variable was being written to and could cause crashes
if multiple elements were parsing xmp at the same time.

Moving it to local scope solves the problem.
2011-01-24 15:21:10 -03: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 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 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 f7ee816355 tag: xmp: Make xmp lib aware for the different tag types
Makes the xmp helper lib aware that the tags can be simple,
sequences or bags (there is still struct and alt, but those
aren't handled yet). Adding this info makes serialization
and deserialization more consistent.
2010-08-04 09:56:39 -03:00
Thiago Santos b9573cc75d xmp: Add a new layer of indirection (GstXmpSchema)
Instead of storing all tags in a single hashtable, store them
grouped by schema in a GstXmpSchema, and add those to the toplevel
hashtable.
2010-08-04 09:56: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 0c51c8209b tag: xmp: removing useless locking
Everything in the xmp helper lib is initiallized once and on a thread
safe way, and after that there are only reads going on, no more
writing. Based on that, drop the locking.
2010-08-01 06:53:28 -03:00
Tim-Philipp Müller db5d418282 tag: initialize datetime variable in xmp tag parsing code
Fixes (correct) compiler warning on the OSX build bot.
2010-07-26 18:23:33 +02: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 4219a5ae5c tag: xmp: Init char variable for gps coordinates
Initialize char variable for gps coordinates deserialization to 0
to identify when it couldn't be parsed/found and error out.

Fixes #621509
2010-06-14 15:05:16 -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 9ef1e58ccc tag: xmp: Do not remove tag from list twice
There was a but when parsing the tags that removed two tags
from the list when only one was parsed
2010-03-24 23:04:43 -03:00
Thiago Santos f2ef0cd7b1 tag: xmp: Add some comments
Just adds some comments explaining some stuff about the
(de)serialization functions. Add myself to the copyright list too.
2010-03-24 15:42:22 -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 e207463582 tag: xmp: Fix off by one
Avoid ignoring single char tags, like exif:GPSAltitudeRef

Fixes #613690
2010-03-24 15:34:02 -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
Thiago Santos fe1f3e3595 tag: xmp: Refactor buffer parsing
When parsing the xmp buffer into the gst taglist store the
found tags into a list to be parsed only after finding all
tags on the buffer. This allows the parser function to search
this list for complimentary tags that should be parsed together

Fixes #613690
2010-03-24 15:33:05 -03:00
Thiago Santos e82414643c tag: xmp: Refactor mappings storage
This commit is only refactoring, no fetaures added.

Do not store tags in flexible arrays as it doesn't allow us
to use nested flexible arrays. This is going to be needed in the
following commits to map gst tags that are stored into
2 separate tags in xmp (Not that they are alternatives, but
they are complementary).

For example, GST_TAG_ELEVATION is represented in the exif
schema with 2 fields: the absolute altitude and an integer
to indicate if it is above or below sea level.

The previous mappings storage wouldn't allow us to
express it.

Also store a serialization and a deserialization function
for each xmp tag as some of them require some non-trivial
convertion to its string form.

Fixes #613690
2010-03-24 15:32:58 -03:00
Benjamin Otte cecdc8c6f9 xmp: Refactor code
I initially looked here because I wanted compiles to not fail with
-Wformat-nonliteral but ended up refactoring the code to make it look
nicer.
As I lack a large collection of XMP tagged files, I only did rough
testing of the code. The testsuite passes though.
2010-03-17 12:09:25 +01:00
Tim-Philipp Müller 2e1f3242bf docs: fix typo in gst_tag_list_from_xmp_buffer() docs chunk 2010-03-15 13:40:48 +00:00
Thiago Santos 6d1f406a77 tags: Add new mapping to XMP helpers
Adds geotagging mappings to XMP helpers

Fixes #609539
2010-03-11 18:29:53 -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