The -p option of tagwriter sample does not work.
This is because the picture file is open in text mode instead of binary.
Also, the isFile function does not work on Windows in 32 bit mode with
large files. Using _stat64 instead of stat solves the problem.
Many shadowFunction, some useStlAlgorithm, and others.
cppcheck --enable=all --inline-suppr \
--suppress=noExplicitConstructor --suppress=unusedFunction \
--suppress=missingIncludeSystem --project=compile_commands.json
The padding was wrong, 8 seconds were displayed as 0:80 instead of 0:08.
Also make the output of tagreader and tagreader_c the same, including
the encoding, which was still ISO-8859-1 for std::ostream.
Use of FileRef::file() is discouraged, but was necessary to access the
properties. It was also not clear whether to access the properties via
tag() or file(). With the property methods on FileRef, it should become
the "simple usage" interface it was meant to be.
As the destructor was the only virtual method on FileRef, it is now made
non-virtual. Probably, it is not useful as a virtual base class.
Provides a unified API for complex properties in the same way as
the Properties API in the C bindings. Since constructing and
traversing complex properties in C is a bit complicated, there
are convenience functions for the most common use case of getting
or setting a single picture.
TAGLIB_COMPLEX_PROPERTY_PICTURE(props, data, size, "Written by TagLib",
"image/jpeg", "Front Cover");
taglib_complex_property_set(file, "PICTURE", props);
and
TagLib_Complex_Property_Attribute*** properties =
taglib_complex_property_get(file, "PICTURE");
TagLib_Complex_Property_Picture_Data picture;
taglib_picture_from_complex_property(properties, &picture);
Provides a dynamic interface for properties which cannot be represented
with simple strings, e.g. pictures. The keys of such properties can
be queried using `complexPropertyKeys()`, which could return for example
["PICTURE"]. The property can then be read using
`complexProperties("PICTURE")`, which will return a list of variant maps
containing the picture data and attributes. Adding a picture is as
easy as
t->setComplexProperties("PICTURE", {
{
{"data", data},
{"pictureType", "Front Cover"},
{"mimeType", "image/jpeg"}
}
});
* unused includes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Use consistent order of includes
Always include in the following order:
- Own header files
- Standard header files
- System header files
- Project header files (toolkit first)
Exceptions:
- cppunit/extensions/HelperMacros.h must be included after
header files declaring stream operators
- config.h must be included before its definitions are used
---------
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
If only a constant iterator is needed, make the container const if
possible, otherwise use cbegin() and cend() to get a constant iterator
without detaching the container.
These fixes are needed so that `auto` can deduce the correct
iterator type.
Support properties in C bindings
---------
Co-authored-by: whatdoineed2do/Ray <whatdoineed2do@nospam.gmail.com>
Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
This creates symetry with ID3v2::Tag::comment() in preferring frames with no description
when choosing which COMM frame should be updated. (Previously setComment() simply updated
the first COMM frame.)
Fixes#950
In case ENABLE_STATIC is still set on the CMake command line, this
change will makes CMake bail out becaus e this option is no longer
supported.
This patch makes taglib more compliant with the distro package framework
that uses the standards CMake options.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
I've warned people about removing autoconf/automake support for a long time,
so let's make it happen for 1.7. CMake is now the only supported build system.
I'll update build docs in a following commit.
CCMAIL:taglib-devel@kde.org
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1220235 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-remove some unnecessary code
-use BIN_INSTALL_DIR for the RUNTIME destination
Alex
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@891512 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
(I see that Makefile.am required "make examples" explicitly)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@594795 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This allows you to build taglib either as part of kdesupport
(i.e. with a source directory of kdesupport/) or by itself
(i.e. with a source directory of kdesupport/taglib/).
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@593544 283d02a7-25f6-0310-bc7c-ecb5cbfe19da