Parse MP4s and related video files and extract the creation timestamp
from the "mdhd" (media header) atom.
Introduce helper function templates to extract arbitrary-length
unsigned integers in big-endian format from file or memory.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Thus, metadata has to be only read once and the picture_load_exif_data()
function can be removed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
To ease trouble-shooting of the picture thumbnailer add a number
of debug- and info-messages.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
In the comment/instruction how to build MXE add "libssh2" and "curl"
to the make call. This seems to be needed in newer versions of MXE.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Only allow to enable maximum one of both items tissue heatmap or
heartrate in profile.
This is done by always switching off the other one at the moment you
turn on one of the two items (heatmap or heartrate).
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Correct a bug in finding the minimum heartrate.
Use the minimum and maximum heartrate value to set min/max and
tic distance for the heartrate axis in the profile.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
We need to wait before clicking Next on the WelcomePage.
We really only want the Android armv7 packages.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a preparation for supporting videos. Some video formats may
not possess such meta data, or we may not yet be able to parse them.
In such a case, use the file creation date.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a preparation for video support. We don't want to read a whole
potentially multi-GB file into memory just to detect that it isn't a
JPEG. Especially since at the moment EXIF metadata are parsed twice,
once for GPS, once for timestamp.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The xmlsoft.org links sometimes time out. Sadly, GitHub API gives us an
oddly named top level directory in the tar file, so lets strip that and
replace it with the "usual" name.
Also, for the "raw" tar files from GitHub we need to run autoreconf
ourselves.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The background color in our own checkbox should match the page background.
Also includes some whitespace cleanup.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
In the initial move to comboboxes the correct location model
was not used. This uses the correct model and makes it behave
like the other comboboxes.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
When a dive has multiple buddies, pick the index of the first
to prevent the user from hanving to scroll through the entire
list when editing.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Removing the comparison of currentText vs editText when saving buddies
fixes the issue of data loss when dive has more than one buddy.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
The HintsTextEdit just doesn't feel natural and intuitive.
Edit, fixed rebase issues.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Add two missing format-number functions for mean depth in dive list
export and depth in dive profile export.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
In dive list CSV export:
- Move unit "min" from duration field to header
- Move unit "%" from O2 and He fields to header
In dive profile CSV export:
- Add "min" to sample time header
- Add column for sample heart rate
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
The first 3 actions in the map widget context menu
are about the current map widget center and not about the
selected dive site / marker.
Avoid using the word "location" for these, use "coordinates"
for the second and third entry.
Suggested-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Extend openLocationInGoogleMaps() so that the current
map widget zoom level is roughly mapped to the Google Maps
zoom level.
The two zoom scales are quite different. Google Maps uses meters
directly, while the QML map uses a scale from ~1 - 21.
The approximation is done via exponential regression over
a small data set gathered from experiment.
Add a console.log() call so that the URL is logged.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Make the map widget use a new URL format for Google Maps
in openLocationInGoogleMaps(). The new URL format does
not show a marker once the location is open in Google Maps
as this might confuse some users.
Suggested-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
strdup(qPrintable(s)) and copy_string(qPrintable(s)) were such common
occurrences that they seem worthy of a short helper-function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Replace constructs of the kind
s.toUtf8().data(),
s.toUtf8().constData(),
s.toLocal8Bit().data(),
s.toLocal8Bit.constData() or
qUtf8Printable(s)
by
qPrintable(s).
This is concise, consistent and - in principle - more performant than
the .data() versions.
Sadly, owing to a suboptimal implementation, qPrintable(s) currently
is a pessimization compared to s.toUtf8().data(). A fix is scheduled for
new Qt versions: https://codereview.qt-project.org/#/c/221331/
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Make arguments to set_informational_units(), set_git_prefs(),
set_userid(), dive_remove_picture() and update_event_name()
"const char *" for consistency with the rest of core/dive.c.
This will allow replacing toUtf8().data() with the constData()
version in a subsequent commit.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This was only done explicitly for Windows. Other platforms were
implicitly supposed to be UTF-8.
Suggested-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>