Commit graph

77 commits

Author SHA1 Message Date
Thibault Saunier 909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Jan Schmidt dd966c437f exiftag: Don't output rational numbers with denominator = 0 2019-07-30 04:01:55 +10:00
Thibault Saunier 099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Paulo Neves 5dd720e064 exiftag: Increase serialized geo precision
The serialization of double typed geographical
coordinates to DMS system supported by the exif
standards was previously truncated without need.

The previous code truncated the seconds part of
the coordinate to a fraction with denominator
equal to 1 causing a bug on the deserialization
when the test for the coordinate to be serialized
was more precise.

This patch applies a 10E6 multiplier to the numerator
equal to the denominator of the rational number.

Eg. Latitude = 89.5688643 Serialization

DMS Old code = 89/1 deg, 34/1 min, 7/1 sec
DMS New code = 89/1 deg, 34/1 min, 79114800UL/10000000UL

Deserialization

DMS Old code = 89.5686111111
DMS New code = 89.5688643

The new test tries to serialize a higher precision
coordinate.

The types of the coordinates are also guint32 instead
of gint like previously. guint32 is the type of the
fraction components in the exif.

https://bugzilla.gnome.org/show_bug.cgi?id=767537
2016-06-13 09:29:52 +03:00
Aurélien Zanelli 928bb3b6f4 exiftag: handle GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
This tag match the EXIF_TAG_FOCAL_LENGTH_IN_35_MM_FILM exif tag and is
stored on a short. Hence there is a precision loss compared to the
GstTag which is a double value.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Tim-Philipp Müller 99929b7ffa tag: exiftag: don't try to convert utf-8 to latin1 if string is ASCII already
Bypass g_convert/iconv if there's nothing to convert. That way,
conversion won't fail on systems where iconv doesn't support
converting utf-8 to latin1 and there's nothing to convert.

https://bugzilla.gnome.org/show_bug.cgi?id=723252
2015-04-03 21:03:50 +01:00
Thiago Santos 03ba34f3a8 tag: exif: avoid adding empty strings
Fixes assertion with some jpeg files
2014-04-22 00:21:45 -03:00
Vincent Penquerc'h 22e12979ee exiftag: catch buffer mapping failure
Might be what caused:

Coverity 1139734
2014-04-16 11:43:40 +01:00
Tim-Philipp Müller 5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Miguel Angel Cabrera Moya e921b5b0f3 exiftag: fix use after free and memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=687055
2012-10-28 20:19:56 +00:00
Mark Nauwelaerts c629a44162 replace gst_tag_list_free with gst_tag_list_unref 2012-09-14 17:53:21 +02:00
Tim-Philipp Müller 063dc1712e tag: fix up EXIF writer for GstBuffer -> GstSample 2012-07-28 11:54:38 +01:00
Edward Hervey 2817bdadc9 libs: Remove "Since" markers and minor doc fixups 2012-07-13 12:11:06 +02:00
Wim Taymans 9ef519d99a Improve buffer allocation of wrapped memory 2012-04-01 18:11:23 +02:00
Wim Taymans 345dc31f20 update for buffer api change 2012-03-30 18:15:30 +02:00
Edward Hervey dccfbef7f9 exiftag: Check return value of byte write methods 2012-03-30 12:13:40 +02:00
Wim Taymans 69298c5534 update for buffer changes 2012-03-28 12:53:01 +02:00
Wim Taymans 63f3f27164 update for new memory api 2012-02-22 02:05:24 +01:00
Wim Taymans fcdc385aa1 port to new map API 2012-01-25 12:30:53 +01:00
Sebastian Dröge 68c0790817 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/interfaces/propertyprobe.c
	sys/xvimage/xvimagesink.c
2012-01-25 11:50:54 +01:00
Mark Nauwelaerts 2d3b3395cc tag: exif: add missing break 2012-01-19 16:43:27 +01:00
Edward Hervey f562a29284 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/theora/gsttheoraenc.c
	gst-libs/gst/tag/gstexiftag.c
	gst/adder/gstadder.c
	gst/adder/gstadder.h
	gst/playback/gstdecodebin2.c
	gst/playback/gstsubtitleoverlay.c
	tests/check/libs/tag.c
2011-12-30 13:21:35 +01: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 d798cc1b8d tag: exif: do not include \0 in size passed to g_convert
When using g_convert, we should only pass the length
of the string content (without the \0) as g_convert will
only parse the real contents when changing formats. Including
the \0 causes it to add another \0, increasing the string
size when not needed.

For example, when writting a North geo location ref entry, that should
be a string with a single N letter, it would write:
"N\0\0", causing the string to have size 3, instead of 2 as expected.

In our case, we can pass -1 and let g_convert calculate the strlen as
we don't use the length anywhere else.

This fixes jifmux's tests on gst-plugins-bad.
2011-12-15 12:08:51 -03:00
Tim-Philipp Müller 177525f89f Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/netbuffer/gstnetbuffer.c
	gst/ffmpegcolorspace/avcodec.h
	gst/ffmpegcolorspace/gstffmpegcodecmap.c
	gst/ffmpegcolorspace/imgconvert.c
	gst/ffmpegcolorspace/imgconvert_template.h
	gst/ffmpegcolorspace/mem.c
	gst/playback/README
	gst/playback/gstplaybasebin.c
	gst/playback/gstplaybasebin.h
	gst/playback/gstplaybin.c
	sys/v4l/v4lmjpegsrc_calls.c
	sys/v4l/videodev_mjpeg.h
	tests/check/elements/gnomevfssink.c
2011-12-02 11:10:17 +00:00
Piotr Fusik 14644457b0 various: typo fixes
Fix typos in code and docs. Fixes. #658984
2011-12-02 12:03:27 +01:00
Tim-Philipp Müller 5ee51e47a1 ext, gst, gst-libs, tests: update for tag list API changes 2011-10-31 14:22:39 +00:00
Wim Taymans 33467d9629 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	ext/pango/gsttextoverlay.c
	ext/theora/gsttheoradec.c
	gst/adder/gstadder.c
	gst/adder/gstadder.h
	gst/audioresample/gstaudioresample.c
	gst/encoding/gstencodebin.c
	gst/playback/gstdecodebin.c
	gst/playback/gstdecodebin2.c
	tests/check/elements/decodebin2.c
	tests/check/elements/playbin-compressed.c
	win32/common/libgsttag.def
2011-08-16 18:01:14 +02:00
Thiago Santos 72b92af807 tag: exif: Check for utf8 before trying to convert
If the string is already on utf8, there is no need to
try to convert it, because it is useless and it might garble
the string.
2011-08-11 12:12:07 -03:00
Thiago Santos cd46e0ca13 tag: exif: Exif strings should be ascii
Use g_convert to turn all strings into extended ascii before writing
to the exif buffer and converting back from ascii to utf8 when
reading them.
2011-08-10 17:46:01 -03:00
Josep Torra 5629ed74b3 Fix debug statements
Fixes build on MacOSX

Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
2011-08-10 11:15:41 +02:00
Wim Taymans 9c54ca5254 -base: update for buffer API change 2011-06-13 16:32:56 +02:00
Sebastian Dröge bf08ca7020 Merge branch 'master' into 0.11 2011-05-26 13:54:09 +02:00
Stefan Kost 5e3f448afb exiftag: reflow the code
Move the warning on unsupported units to the swicth-case. Move fetching the
pending tags down to where we use them.
2011-05-25 14:12:50 +03:00
Stefan Kost 8ffe4445f6 exiftag: set value=1 if we found the token
Otherwise we never write the tag. This would also be consistent with the code in
deserialize_scene_type().
2011-05-25 13:59:57 +03:00
Wim Taymans 079c152e62 Merge branch 'master' into 0.11
Conflicts:
	gst/videoscale/gstvideoscale.c
2011-04-25 11:20:45 +02:00
Víctor Manuel Jáquez Leal 35c1cf16d9 tag: exif: register common tags from tag library
Exif uses tags like  image-vertical-ppi or image-horizontal-ppi which are
registered in gst_tag_register_musicbrainz_tags(), but neither GstExifReader
nor GstExifWriter register them.

https://bugzilla.gnome.org/show_bug.cgi?id=648459
2011-04-24 12:28:00 +01:00
Sebastian Dröge 352edd1dd9 Merge branch 'master' into 0.11 2011-04-16 09:12:31 +02: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
Wim Taymans 4007076b55 Merge branch 'master' into 0.11
Conflicts:
	ext/theora/gsttheoraenc.c
2011-04-06 16:33:56 +02:00
Haakon Sporsheim 834a5a478c tag: use gst/math-compat.h header.
https://bugzilla.gnome.org/show_bug.cgi?id=646744
2011-04-04 23:14:23 +01:00
Wim Taymans 41025681bc tags: port to new metadata and memory API 2011-03-25 19:52:30 +01:00
Thiago Santos 17777f2596 tag: exif: Fix unitialized data warning
Fixes a valgrind warning on jifmux tests on -bad caused by
unitialized bytes.

Fixes #637758
2010-12-22 10:41:51 -03:00
Tim-Philipp Müller 3ecb114b61 tag: fix leak when parsing undefined EXIF tag into tag list
gst_buffer_set_data() does not set GST_BUFFER_MALLOCDATA, but
the code assumes the buffer takes ownership of the memory
allocated earlier.
2010-11-02 12:02:23 +00:00
Tim-Philipp Müller 1c0b90661f tag: fix GstDateTime leak when converting exif tag to tag list 2010-11-02 11:58:14 +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