Fix spelling and typos

This commit is contained in:
Jonas Kvinge 2021-07-02 03:00:50 +02:00
parent 72631f5110
commit ea23d71e8a
44 changed files with 90 additions and 90 deletions

View File

@ -20,7 +20,7 @@ the end of an MP4/Matroska file.
### Padding
Padding allows adding additional tag information without rewriting the entire file
or appending the tag. Usage of padding can be configured:
* minimum/maximum padding: The file is rewritten if the padding would fall below/exceed the specifed limits.
* minimum/maximum padding: The file is rewritten if the padding would fall below/exceed the specified limits.
* preferred padding: If the file needs to be rewritten the preferred padding is used.
Default value for minimum and maximum padding is zero. Hence the library will almost always have to rewrite
@ -111,7 +111,7 @@ if (auto *const container = fileInfo.container()) {
// run it in a separate thread.
// - Use progress.tryToAbort() from another thread or an interrupt handler to abort gracefully without leaving
// the file in an inconsistent state.
// - Be sure everyting has been parsed before as the library needs to be aware of the whole file structure.
// - Be sure everything has been parsed before as the library needs to be aware of the whole file structure.
fileInfo.parseEverything(diag, progress);
fileInfo.applyChanges(diag, progress);
```

View File

@ -1462,7 +1462,7 @@ void AacFrameElementParser::parseHuffmanSpectralData(std::uint8_t cb, std::int16
vcb11CheckLav(cb, sp);
break;
default:
throw InvalidDataException(); // non existend codebook number
throw InvalidDataException(); // non-existent codebook number
}
}
@ -1732,7 +1732,7 @@ void AacFrameElementParser::parseSingleChannelElement()
if (m_ics1.isUsed) {
throw InvalidDataException(); // IS not allowed in single channel
}
// check wheter next bitstream element is a fill element (for SBR decoding)
// check whether next bitstream element is a fill element (for SBR decoding)
if (m_reader.showBits<std::uint8_t>(3) == AacSyntaxElementTypes::FillElement) {
parseFillElement(m_elementCount);
}

View File

@ -321,7 +321,7 @@ size_t AbstractContainer::tagCount() const
* \sa areTagsParsed()
* \sa parseTags()
*
* \remarks The \a tag is not destroyed. The ownership is transfered to the caller.
* \remarks The \a tag is not destroyed. The ownership is transferred to the caller.
*
* \returns Returns whether the \a tag could be removed.
*/
@ -389,7 +389,7 @@ size_t AbstractContainer::trackCount() const
* \sa areTracksParsed()
* \sa parseTracks()
*
* \remarks The \a track is not destroyed. The ownership is transfered to the caller.
* \remarks The \a track is not destroyed. The ownership is transferred to the caller.
*
* \returns Returns whether the \a track could be removed.
*/

View File

@ -106,7 +106,7 @@ constexpr std::uint16_t AdtsFrame::totalSize() const
}
/*!
* \brief Retruns the header size in bytes (9 if CRC is present; otherwise 7).
* \brief Returns the header size in bytes (9 if CRC is present; otherwise 7).
*/
constexpr std::uint8_t AdtsFrame::headerSize() const
{

View File

@ -195,7 +195,7 @@ void SpsInfo::parse(BinaryReader &reader, std::uint32_t maxSize)
// TODO: investigate error (truncated data) when parsing mtx-test-data/mkv/attachment-without-fileuid.mkv
if (bitReader.readBit()) { // bitstream restriction flag
bitReader.skipBits(1); // motion vectors over pic boundries flag
bitReader.skipBits(1); // motion vectors over pic boundaries flag
bitReader.readUnsignedExpGolombCodedBits<std::uint8_t>(); // max bytes per pic denom
bitReader.readUnsignedExpGolombCodedBits<std::uint8_t>(); // max bytes per mb denom
bitReader.readUnsignedExpGolombCodedBits<std::uint8_t>(); // log2 max mv length horizontal

View File

@ -52,11 +52,11 @@ namespace BackupHelper {
void restoreOriginalFileFromBackupFile(
const std::string &originalPath, const std::string &backupPath, NativeFileStream &originalStream, NativeFileStream &backupStream)
{
// ensure the orignal stream is closed
// ensure the original stream is closed
if (originalStream.is_open()) {
originalStream.close();
}
// check wether backup file actually exists and close the backup stream afterwards
// check whether backup file actually exists and close the backup stream afterwards
backupStream.exceptions(ios_base::goodbit);
backupStream.close();
backupStream.clear();
@ -223,9 +223,9 @@ void createBackupFile(const std::string &backupDir, const std::string &originalP
* - Re-throws the exception.
*
* \remarks Must only be called when an exception derived from Failure or ios_base::failure
* has been catched; this method uses the "exception dispatcher" idiom.
* has been caught; this method uses the "exception dispatcher" idiom.
*
* \param fileInfo Specifies the MediaFileInfo instace which has been modified.
* \param fileInfo Specifies the MediaFileInfo instance which has been modified.
* \param backupPath Specifies the path of the backup file; might be empty if none has been created.
* \param outputStream Specifies the stream used to write the output file. This is usually just the stream
* of \a fileInfo, but is specified here explicitly for higher flexibility.

View File

@ -144,7 +144,7 @@ void BasicFileInfo::setPath(std::string &&path)
* \brief Returns the file name of the given file.
*
* \param path Specifies the path of the file.
* \param cutExtension Indicates whether the extension/suffix should be cutted.
* \param cutExtension Indicates whether the extension/suffix should be cut.
*/
std::string BasicFileInfo::fileName(std::string_view path, bool cutExtension)
{
@ -167,7 +167,7 @@ std::string BasicFileInfo::fileName(std::string_view path, bool cutExtension)
/*!
* \brief Returns the file name of the current file.
*
* \param cutExtension Indicates whether the extension should be cutted.
* \param cutExtension Indicates whether the extension should be cut.
*/
std::string BasicFileInfo::fileName(bool cutExtension) const
{

View File

@ -10,7 +10,7 @@
namespace TagParser {
/*!
* \brief The CaseInsensitiveCharComparer struct defines a method for case-insensivive character comparsion (less).
* \brief The CaseInsensitiveCharComparer struct defines a method for case-insensivive character comparison (less).
*/
struct TAG_PARSER_EXPORT CaseInsensitiveCharComparer {
static constexpr unsigned char toLower(const unsigned char c)
@ -25,7 +25,7 @@ struct TAG_PARSER_EXPORT CaseInsensitiveCharComparer {
};
/*!
* \brief The CaseInsensitiveStringComparer struct defines a method for case-insensivive string comparsion (less).
* \brief The CaseInsensitiveStringComparer struct defines a method for case-insensivive string comparison (less).
*/
struct TAG_PARSER_EXPORT CaseInsensitiveStringComparer {
bool operator()(const std::string &lhs, const std::string &rhs) const

View File

@ -108,7 +108,7 @@ inline void GenericContainer<FileInfoType, TagType, TrackType, ElementType>::val
/*!
* \brief Returns the related file info.
*
* The related file info has been specefied when constructing the container.
* The related file info has been specified when constructing the container.
*/
template <class FileInfoType, class TagType, class TrackType, class ElementType>
inline FileInfoType &GenericContainer<FileInfoType, TagType, TrackType, ElementType>::fileInfo() const
@ -137,7 +137,7 @@ inline ElementType *GenericContainer<FileInfoType, TagType, TrackType, ElementTy
/*!
* \brief Returns all available additional elements.
*
* The parser might decide to split up a file's element tree to skip irrelevant elements to achive better performance.
* The parser might decide to split up a file's element tree to skip irrelevant elements to achieve better performance.
* This method gives access to those sub element trees. Each of the returned elements represents an independent element
* tree within the file.
*/
@ -150,7 +150,7 @@ inline const std::vector<std::unique_ptr<ElementType>> &GenericContainer<FileInf
/*!
* \brief Returns all available additional elements.
*
* The parser might decide to split up a file's element tree to skip irrelevant elements to achive better performance.
* The parser might decide to split up a file's element tree to skip irrelevant elements to achieve better performance.
* This method gives access to those sub element trees. Each of the returned elements represents an independent element
* tree within the file.
*/

View File

@ -37,7 +37,7 @@ template <typename ImplementationType> class FileElementTraits {
/*!
* \class TagParser::GenericFileElement
* \brief The GenericFileElement class helps to parse binary files which consist
* of an arboreal element strucutre.
* of an arboreal element structure.
* \tparam ImplementationType Specifies the type of the actual implementation.
* \remarks This template class is intended to be subclassed using
* with the "Curiously recurring template pattern".
@ -759,7 +759,7 @@ template <class ImplementationType> void GenericFileElement<ImplementationType>:
* stream at the start offset.
*
* The parsed information can accessed using the corresponding methods such as
* id() for the elemement id and totalSize() for the element size.
* id() for the element id and totalSize() for the element size.
*
* If the element has already been parsed (isParsed() returns true) this method
* does nothing. To force reparsing call reparse().
@ -781,7 +781,7 @@ template <class ImplementationType> void GenericFileElement<ImplementationType>:
* stream at the start offset.
*
* The parsed information can accessed using the corresponding methods such as
* id() for the elemement id and totalSize() for the element size.
* id() for the element id and totalSize() for the element size.
*
* If the element has already been parsed (isParsed() returns true) this method
* clears the parsed information and reparses the header.
@ -838,7 +838,7 @@ void GenericFileElement<ImplementationType>::validateSubsequentElementStructure(
}
/*!
* \brief Writes the header informaton of the element to the specified \a targetStream.
* \brief Writes the header information of the element to the specified \a targetStream.
*/
template <class ImplementationType>
void GenericFileElement<ImplementationType>::copyHeader(std::ostream &targetStream, Diagnostics &diag, AbortableProgressFeedback *progress)
@ -976,7 +976,7 @@ template <class ImplementationType> constexpr std::uint32_t GenericFileElement<I
}
/*!
* \brief Returns the mimimum element size.
* \brief Returns the minimum element size.
*/
template <class ImplementationType> constexpr std::uint8_t GenericFileElement<ImplementationType>::minimumElementSize()
{

View File

@ -6,7 +6,7 @@ namespace TagParser {
/*!
* \class Id3Genres
* \brief The Id3Genres class converts pre-defined ID3 genres to strings and vise versa.
* \brief The Id3Genres class converts pre-defined ID3 genres to strings and vice versa.
*/
/*!
@ -19,7 +19,7 @@ const std::string_view *Id3Genres::genreNames()
"Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House",
"Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock",
"Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult",
"Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes",
"Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychedelic", "Rave", "Showtunes",
"Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk-Rock",
"National Folk", "Swing", "Fast Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", "Progressive Rock",
"Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera",

View File

@ -40,7 +40,7 @@ constexpr int Id3Genres::genreCount()
/*!
* \brief Returns the preferred genre index to indicate that no genre is set at all.
* \remarks Apparently some files use 255 to indicate the genre information is missing although this
* is not explicitely specified on [ID3.org](http://id3.org/ID3v1).
* is not explicitly specified on [ID3.org](http://id3.org/ID3v1).
*/
constexpr int Id3Genres::emptyGenreIndex()
{

View File

@ -786,7 +786,7 @@ std::uint8_t Id3v2Frame::makeTextEncodingByte(TagTextEncoding textEncoding)
* \brief Parses a substring from the specified \a buffer.
*
* This method ensures that byte order marks and termination characters for the specified \a encoding are omitted.
* It might add a waring if the substring is not terminated.
* It might add a warning if the substring is not terminated.
*
* \param buffer Specifies a pointer to the possibly terminated string.
* \param bufferSize Specifies the size of the string in byte.
@ -907,7 +907,7 @@ void Id3v2Frame::parseBom(const char *buffer, std::size_t maxSize, TagTextEncodi
default:
if ((maxSize >= 3) && (BE::toUInt24(buffer) == 0x00EFBBBF)) {
encoding = TagTextEncoding::Utf8;
diag.emplace_back(DiagLevel::Warning, "UTF-8 byte order mark found in text frame.", "parsing byte oder mark of frame " + idToString());
diag.emplace_back(DiagLevel::Warning, "UTF-8 byte order mark found in text frame.", "parsing byte order mark of frame " + idToString());
}
}
}

View File

@ -232,7 +232,7 @@ inline std::uint32_t Id3v2Frame::dataSize() const
}
/*!
* \brief Returns whether the frame is flaged to be discarded when it is unknown and the tag is altered.
* \brief Returns whether the frame is flagged to be discarded when it is unknown and the tag is altered.
*/
inline bool Id3v2Frame::toDiscardWhenUnknownAndTagIsAltered() const
{
@ -240,7 +240,7 @@ inline bool Id3v2Frame::toDiscardWhenUnknownAndTagIsAltered() const
}
/*!
* \brief Returns whether the frame is flaged to be discarded when it is unknown and the file (but NOT the tag) is altered.
* \brief Returns whether the frame is flagged to be discarded when it is unknown and the file (but NOT the tag) is altered.
*/
inline bool Id3v2Frame::toDiscardWhenUnknownAndFileIsAltered() const
{

View File

@ -673,7 +673,7 @@ void Id3v2Tag::prepareRecordDataForMaking(const std::string &diagContext, Diagno
// convert lRecordingTime to old fields for v2.3.0 and older
const auto recordingTimeFieldIterator = fields().find(Id3v2FrameIds::lRecordingTime);
// -> If the auto-created lRecordingTime field (see note above) has been completely removed write the old fields as-is.
// This allows one to bypass this handling and set the old fields explicitely.
// This allows one to bypass this handling and set the old fields explicitly.
if (recordingTimeFieldIterator == fields().cend()) {
return;
}

View File

@ -70,7 +70,7 @@ const LocaleDetail &Locale::abbreviatedName(LocaleFormat format) const
}
/*!
* \brief Returns *some* abbreviated name, *preferrably* of the specified \a preferredFormat.
* \brief Returns *some* abbreviated name, *preferably* of the specified \a preferredFormat.
*
* This function returns the \a preferredFormat if present. Otherwise it returns the most relevant
* detail. This might be improved in the future, e.g. to convert to the \a preferredFormat. It would

View File

@ -115,7 +115,7 @@ void EbmlElement::internalParse(Diagnostics &diag)
// recompute the parent size (assumption - which was rest of the available space - was wrong)
m_parent->m_dataSize = m_startOffset - m_parent->m_startOffset - m_parent->headerSize();
m_parent->m_sizeUnknown = false;
// detatch from ...
// detach from ...
if (m_parent->firstChild() == this) {
// ... parent
m_parent->m_firstChild.release();

View File

@ -91,11 +91,11 @@ void MatroskaContainer::validateIndex(Diagnostics &diag, AbortableProgressFeedba
bool cueTimeFound = false, cueTrackPositionsFound = false;
unique_ptr<EbmlElement> clusterElement;
std::uint64_t pos, prevClusterSize = 0, currentOffset = 0;
// iterate throught all segments
// iterate through all segments
for (EbmlElement *segmentElement = m_firstElement->siblingById(MatroskaIds::Segment, diag); segmentElement;
segmentElement = segmentElement->siblingById(MatroskaIds::Segment, diag)) {
segmentElement->parse(diag);
// iterate throught all child elements of the segment (only "Cues"- and "Cluster"-elements are relevant for this method)
// iterate through all child elements of the segment (only "Cues"- and "Cluster"-elements are relevant for this method)
for (EbmlElement *segmentChildElement = segmentElement->firstChild(); segmentChildElement;
segmentChildElement = segmentChildElement->nextSibling()) {
progress.stopIfAborted();
@ -445,7 +445,7 @@ void MatroskaContainer::internalParseHeader(Diagnostics &diag, AbortableProgress
m_maxIdLength = subElement->readUInteger();
if (m_maxIdLength > EbmlElement::maximumIdLengthSupported()) {
diag.emplace_back(DiagLevel::Critical,
argsToString("Maximum EBML element ID length greather than ", EbmlElement::maximumIdLengthSupported(),
argsToString("Maximum EBML element ID length greater than ", EbmlElement::maximumIdLengthSupported(),
" bytes is not supported."),
context);
throw InvalidDataException();
@ -455,7 +455,7 @@ void MatroskaContainer::internalParseHeader(Diagnostics &diag, AbortableProgress
m_maxSizeLength = subElement->readUInteger();
if (m_maxSizeLength > EbmlElement::maximumSizeLengthSupported()) {
diag.emplace_back(DiagLevel::Critical,
argsToString("Maximum EBML element size length greather than ", EbmlElement::maximumSizeLengthSupported(),
argsToString("Maximum EBML element size length greater than ", EbmlElement::maximumSizeLengthSupported(),
" bytes is not supported."),
context);
throw InvalidDataException();
@ -1460,7 +1460,7 @@ void MatroskaContainer::internalMakeFile(Diagnostics &diag, AbortableProgressFee
currentPosition += segment.totalSize;
currentOffset += segment.totalSize;
// increase the read offset by the size of the segment read from the orignial file
// increase the read offset by the size of the segment read from the original file
readOffset += level0Element->totalSize();
break;
@ -1739,7 +1739,7 @@ void MatroskaContainer::internalMakeFile(Diagnostics &diag, AbortableProgressFee
}
} else {
// can't just skip existing "Cluster"-elements: "Position"-elements must be updated
progress.nextStepOrStop("Updateing cluster ...",
progress.nextStepOrStop("Updating cluster ...",
static_cast<std::uint8_t>((static_cast<std::uint64_t>(outputStream.tellp()) - offset) * 100 / segment.totalDataSize));
for (; level1Element; level1Element = level1Element->nextSibling()) {
for (level2Element = level1Element->firstChild(); level2Element; level2Element = level2Element->nextSibling()) {

View File

@ -81,7 +81,7 @@ void MatroskaEditionEntry::parse(Diagnostics &diag)
break;
default:
diag.emplace_back(DiagLevel::Warning,
"\"EditionEntry\"-element contains unknown child element \"" % entryChild->idToString() + "\" which will be ingored.", context);
"\"EditionEntry\"-element contains unknown child element \"" % entryChild->idToString() + "\" which will be ignored.", context);
}
entryChild = entryChild->nextSibling();
}

View File

@ -20,7 +20,7 @@ namespace TagParser {
*/
/*!
* \brief Shifts all offsets greather or equal than \a start by \a amount bytes.
* \brief Shifts all offsets greater or equal than \a start by \a amount bytes.
*/
void MatroskaSeekInfo::shift(std::uint64_t start, std::int64_t amount)
{

View File

@ -233,7 +233,7 @@ startParsingSignature:
}
if (isForcingFullParse()) {
// validating the element structure of Matroska files takes too long when
// parsing big files so do this only when explicitely desired
// parsing big files so do this only when explicitly desired
container->validateElementStructure(diag, progress, &m_paddingSize);
container->validateIndex(diag, progress);
}
@ -548,7 +548,7 @@ void MediaFileInfo::parseEverything(Diagnostics &diag, AbortableProgressFeedback
* - Tags might be removed as well. For example the existing ID3v1 tag of an MP3 file will be removed if \a id3v1Usage is set to TagUsage::Never.
* - The method might do nothing if present tag(s) already match the given specifications.
* - This is only a convenience method. The task could be done by manually using the methods createId3v1Tag(), createId3v2Tag(), removeId3v1Tag() ... as well.
* - Some tag information might be discarded. For example when an ID3v2 tag needs to be removed (TagSettings::id3v2usage is set to TagUsage::Never) and an ID3v1 tag will be created instead not all fields can be transfered.
* - Some tag information might be discarded. For example when an ID3v2 tag needs to be removed (TagSettings::id3v2usage is set to TagUsage::Never) and an ID3v1 tag will be created instead not all fields can be transferred.
*/
bool MediaFileInfo::createAppropriateTags(const TagCreationSettings &settings)
{
@ -1333,7 +1333,7 @@ void MediaFileInfo::clearParsingResults()
* \brief Merges the assigned ID3v2 tags into a single ID3v2 tag.
*
* Some files I've got contain multiple successive ID3v2 tags. If the tags of
* such an file is parsed by this class, these tags will be kept seperate.
* such an file is parsed by this class, these tags will be kept separate.
* This method merges all assigned ID3v2 tags. All fields from the additional
* ID3v2 tags will be inserted to the first tag. All assigned ID3v2 tag instances
* except thefirst will be destroyed.

View File

@ -58,7 +58,7 @@ enum class MediaFileStructureFlags : std::uint64_t {
enum class MediaFileHandlingFlags : std::uint64_t {
None, /**< all flags disabled */
ForceFullParse
= (1 << 0), /**< causes the parser to analyse the file strucutre as deep as possible; might cause long loading times for big files */
= (1 << 0), /**< causes the parser to analyse the file structure as deep as possible; might cause long loading times for big files */
ForceRewrite = (1 << 1), /**< enforces a re-write of the file when applying changes */
ForceTagPosition = (1 << 2), /**< enforces the tag position when applying changes, see remarks of MediaFileInfo::setTagPosition() */
ForceIndexPosition = (1 << 3), /**< enforces the index position when applying changes, see remarks of MediaFileInfo::setIndexPosition() */
@ -512,7 +512,7 @@ inline void MediaFileInfo::setForceRewrite(bool forceRewrite)
/*!
* \brief Returns the minimum padding to be written before the data blocks when applying changes.
*
* Minimum padding in front of the file allows adding additional fields afterwards whithout needing
* Minimum padding in front of the file allows adding additional fields afterwards without needing
* to rewrite the entire file or to put tag information at the end of the file.
*
* The default value is 0.
@ -539,7 +539,7 @@ inline void MediaFileInfo::setMinPadding(std::size_t minPadding)
/*!
* \brief Returns the maximum padding to be written before the data blocks when applying changes.
*
* Maximum padding in front of the file allows adding additional fields afterwards whithout needing
* Maximum padding in front of the file allows adding additional fields afterwards without needing
* to rewrite the entire file or to put tag information at the end of the file.
*
* The default value is 0 which will force the library to rewrite the entire file almost always when
@ -567,7 +567,7 @@ inline void MediaFileInfo::setMaxPadding(std::size_t maxPadding)
/*!
* \brief Returns the padding to be written before the data block when applying changes and the file needs to be rewritten anyways.
*
* Padding in front of the file allows adding additional fields afterwards whithout needing
* Padding in front of the file allows adding additional fields afterwards without needing
* to rewrite the entire file or to put tag information at the end of the file.
*/
inline std::size_t MediaFileInfo::preferredPadding() const

View File

@ -30,7 +30,7 @@ std::string_view MediaFormat::name() const
case AacMpeg4LowComplexityProfile:
return "Advanced Audio Coding Low Complexity Profile";
case AacMpeg4ScalableSamplingRateProfile:
return "Advanced Audio Coding Scaleable Sampling Rate Profile";
return "Advanced Audio Coding Scalable Sampling Rate Profile";
case AacMpeg4LongTermPrediction:
return "Advanced Audio Coding Long Term Predicition";
case AacMpeg4ERLowComplecityProfile:

View File

@ -121,7 +121,7 @@ void Mp4Atom::internalParse(Diagnostics &diag)
* \brief This function helps to write the atom size after writing an atom to a stream.
* \param stream Specifies the stream.
* \param startOffset Specifies the start offset of the atom.
* \remarks The caller must ensure that no seek before \a startOffset happended.
* \remarks The caller must ensure that no seek before \a startOffset happened.
* \throw The caller has to be sure, that the number of written bytes does not exceed
* maximum of an 32-bit unsigned integer. Otherwise the function will throw
* Failure and Mp4Atom::seekBackAndWriteAtomSize64 should be used instead.
@ -148,7 +148,7 @@ void Mp4Atom::seekBackAndWriteAtomSize(std::ostream &stream, const std::ostream:
* \brief This function helps to write the atom size after writing an atom to a stream.
* \param stream Specifies the stream.
* \param startOffset Specifies the start offset of the atom.
* \remarks The caller must ensure that no seek before \a startOffset happended.
* \remarks The caller must ensure that no seek before \a startOffset happened.
*
* This function seeks back to the start offset and writes the difference between the
* previous offset and the start offset as 64-bit unsigned integer to the \a stream.

View File

@ -873,7 +873,7 @@ calculatePadding:
} else {
diag.emplace_back(DiagLevel::Critical,
argsToString("Unable to update chunk offsets of track ", (trackIndex + 1),
": Number of chunks in the output file differs from the number of chunks in the orignal file."),
": Number of chunks in the output file differs from the number of chunks in the original file."),
context);
throw Failure();
}

View File

@ -424,7 +424,7 @@ namespace Mp4FormatExtensionIds {
enum KnownValue : std::uint32_t {
GammaLevel
= 0x67616D61, /**< gama: A 32-bit fixed-point number indicating the gamma level at which the image was captured. The decompressor can use this value to gamma-correct at display time. */
FieldHandling = 0x6669656C, /**< fiel: Two 8-bit integers that define field handling. */
FieldHandling = 0x6669656C, /**< field: Two 8-bit integers that define field handling. */
DefaultQuantizationTable = 0x6D6A7174, /**< mjqt: The default quantization table for a Motion-JPEG data stream. */
DefaultHuffmanTable = 0x6D6A6874, /**< mjht: The default Huffman table for a Motion-JPEG data stream. */
Mpeg4ElementaryStreamDescriptor
@ -461,7 +461,7 @@ enum KnownValue : std::uint8_t {
Mpeg2Video422Profile, /**< MPEG-2 Video 422 Profile */
Mpeg2AacMainProfile, /**< Advanced Audio Coding Main Profile */
Mpeg2AacLowComplexityProfile, /**< Advanced Audio Coding Low Complexity Profile */
Mpeg2AacScaleableSamplingRateProfile, /**< Advanced Audio Coding Scaleable Sampling Rate Profile */
Mpeg2AacScaleableSamplingRateProfile, /**< Advanced Audio Coding Scalable Sampling Rate Profile */
Mpeg2Audio, /**< MPEG-2 Audio */
Mpeg1Video, /**< MPEG-1 Video */
Mpeg1Audio, /**< MPEG-1 Audio */

View File

@ -351,7 +351,7 @@ void Mp4Tag::parse(Mp4Atom &metaAtom, Diagnostics &diag)
diag.emplace_back(DiagLevel::Warning, "Flags (hdlr atom) aren't set to 0.", context);
}
if (reader.readInt32BE()) {
diag.emplace_back(DiagLevel::Warning, "Predefined 32-bit integer (hdlr atom) ins't set to 0.", context);
diag.emplace_back(DiagLevel::Warning, "Predefined 32-bit integer (hdlr atom) isn't set to 0.", context);
}
std::uint64_t handlerType = reader.readUInt64BE();
if (/*(((handlerType & 0xFFFFFFFF00000000) >> 32) != 0x6D647461) && */ (handlerType != 0x6d6469726170706c)) {

View File

@ -273,7 +273,7 @@ void Mp4TagField::reparse(Mp4Atom &ilstChild, Diagnostics &diag)
m_name = reader.readString(dataAtom->dataSize() - 4);
} else {
diag.emplace_back(DiagLevel::Warning,
"Unkown child atom \"" % dataAtom->idToString()
"Unknown child atom \"" % dataAtom->idToString()
+ "\" in tag atom (ilst child) found. It will be ignored and discarded when applying changes.",
context);
}

View File

@ -452,7 +452,7 @@ TrackHeaderInfo Mp4Track::verifyPresentTrackHeader() const
* \brief Reads the sample to chunk table.
* \returns Returns a vector with the table entries wrapped using the tuple container. The first value
* is an integer that gives the first chunk that share the same samples count and sample description index.
* The second value is sample cound and the third value the sample description index.
* The second value is sample count and the third value is the sample description index.
* \remarks The table is not validated.
*/
vector<tuple<std::uint32_t, std::uint32_t, std::uint32_t>> Mp4Track::readSampleToChunkTable(Diagnostics &diag)
@ -535,8 +535,8 @@ vector<std::uint64_t> Mp4Track::readChunkSizes(Diagnostics &diag)
addChunkSizeEntries(chunkSizes, firstChunkIndex - previousChunkIndex, sampleIndex, samplesPerChunk, diag);
} else {
diag.emplace_back(DiagLevel::Critical,
"The first chunk index of a \"sample to chunk\" entry must be greather than the first chunk of the previous entry and not "
"greather than the chunk count.",
"The first chunk index of a \"sample to chunk\" entry must be greater than the first chunk of the previous entry and not "
"greater than the chunk count.",
context);
throw InvalidDataException();
}
@ -853,7 +853,7 @@ std::unique_ptr<Mpeg4VideoSpecificConfig> Mp4Track::parseVideoSpecificConfig(
break;
default:;
}
// skip remainging values to get the start of the next video object
// skip remaining values to get the start of the next video object
while (size >= 3) {
if (reader.readUInt24BE() != 1) {
reader.stream()->seekg(-2, ios_base::cur);
@ -2064,7 +2064,7 @@ void Mp4Track::internalParseHeader(Diagnostics &diag, AbortableProgressFeedback
}
}
// caluculate average bitrate
// calculate average bitrate
if (m_bitrate < 0.01 && m_bitrate > -0.01) {
m_bitrate = (static_cast<double>(m_size) * 0.0078125) / m_duration.totalSeconds();
}

View File

@ -201,7 +201,7 @@ std::uint32_t MpegAudioFrame::sampleCount() const
}
/*!
* \brief Returns the size if known; otherwise retruns 0.
* \brief Returns the size if known; otherwise returns 0.
*/
std::uint32_t MpegAudioFrame::size() const
{

View File

@ -147,8 +147,8 @@ size_t OggContainer::tagCount() const
/*!
* \brief Actually just flags the specified \a tag as removed and clears all assigned fields.
*
* This specialization is neccessary because removing the tag completely whould also
* remove the OGG parameter which are needed when appying changes.
* This specialization is necessary because removing the tag completely would also
* remove the OGG parameter which are needed when applying changes.
*
* \remarks Seems like common players aren't able to play Vorbis when no comment is present.
* So do NOT use this method to remove tags from Vorbis, just call Tag::removeAllFields() on \a tag.
@ -168,8 +168,8 @@ bool OggContainer::removeTag(Tag *tag)
/*!
* \brief Actually just flags all tags as removed and clears all assigned fields.
*
* This specialization is neccessary because completeley removing the tag whould also
* remove the OGG parameter which are needed when appying the changes.
* This specialization is necessary because completeley removing the tag would also
* remove the OGG parameter which are needed when applying the changes.
*
* \remarks Seems like common players aren't able to play Vorbis when no comment is present.
* So do NOT use this method to remove tags from Vorbis, just call removeAllFields() on all tags.

View File

@ -96,7 +96,7 @@ inline TagType OggVorbisComment::type() const
}
/*!
* \brief Returns true; the target is used to specifiy the stream.
* \brief Returns true; the target is used to specify the stream.
* \sa OggContainer::createTag(), TagTarget
*/
inline bool OggVorbisComment::supportsTarget() const

View File

@ -40,7 +40,7 @@ void OggIterator::clear(istream &stream, std::uint64_t startOffset, std::uint64_
/*!
* \brief Resets the iterator to point at the first segment of the first page (matching the filter if set).
*
* Fetched pages (directly accessable through the page() method) remain after resetting the iterator. Use
* Fetched pages (directly accessible through the page() method) remain after resetting the iterator. Use
* clear() to clear all pages.
*/
void OggIterator::reset()
@ -220,7 +220,7 @@ void OggIterator::ignore(std::size_t count)
* - recover parsing after after an error occurred.
*
* Regardless of the current iterator position, this method will assume the page at \a offset comes after
* the last known page. Hence \a offset must be greather than OggPage::startOffset() + OggPage::totalSize() of the
* the last known page. Hence \a offset must be greater than OggPage::startOffset() + OggPage::totalSize() of the
* last known page. This is checked by the method.
*
* If the OGG capture pattern is not present at \a offset, up to 65307 bytes (max. size of an OGG page) are

View File

@ -148,7 +148,7 @@ inline std::uint64_t OggIterator::currentPageOffset() const
* The iterator is invalid when it has just been constructed. Incrementing and decrementing
* might cause invalidation.
*
* If the iterator is invalid, it can be reseted using the reset() method.
* If the iterator is invalid, it can be reset using the reset() method.
*
* Some methods cause undefined behaviour if called on an invalid iterator.
*/

View File

@ -50,7 +50,7 @@ void OggPage::parseHeader(istream &stream, std::uint64_t startOffset, std::int32
} else {
maxSize -= m_segmentCount;
}
// read segment size tabe
// read segment size table
m_segmentSizes.push_back(0);
for (std::uint8_t i = 0; i < m_segmentCount;) {
std::uint8_t entry = reader.readByte();

View File

@ -10,8 +10,8 @@ constexpr Size fromHeightAndAspectRatio(std::uint32_t height, std::uint32_t nume
/// \endcond
/*!
* \brief Returns an abbreviation for the current instance, eg. 720p for sizes greather than 960×720
* and 1080p for sizes greather than 1440×1080.
* \brief Returns an abbreviation for the current instance, eg. 720p for sizes greater than 960×720
* and 1080p for sizes greater than 1440×1080.
* \remarks The width thresolds are for 4:3 resolutions so both, 4:3 and 16:9 "720p" is considered as such.
*/
std::string_view Size::abbreviation() const

4
size.h
View File

@ -111,8 +111,8 @@ constexpr bool Size::operator==(const Size &other) const
}
/*!
* \brief Returns whether this instance is greather than \a other.
* \remarks Both dimensions must be greather. This operator does *not* take the resolution() into account.
* \brief Returns whether this instance is greater than \a other.
* \remarks Both dimensions must be greater. This operator does *not* take the resolution() into account.
*/
constexpr bool Size::operator>=(const Size &other) const
{

View File

@ -317,7 +317,7 @@ std::size_t Tag::insertValues(const Tag &from, bool overwrite)
/*!
* \fn Tag::ensureTextValuesAreProperlyEncoded()
* \brief Ensures the encoding of all assigned text values is supported by the tag by
* converting the character set if neccessary.
* converting the character set if necessary.
*/
} // namespace TagParser

2
tag.h
View File

@ -31,7 +31,7 @@ enum class TagType : unsigned int {
* \brief Specifies the field.
*
* These "known" fields are used to specify a field without using
* the field identifier used by the underlaying tag type.
* the field identifier used by the underlying tag type.
*
* Not all fields are supported by all tag types (see Tag::supportsField()).
*

View File

@ -88,7 +88,7 @@ enum class TagDataType : unsigned int {
*/
enum class TagValueComparisionFlags : unsigned int {
None, /**< no special behavior */
CaseInsensitive = 0x1, /**< string-comparisions are case-insensitive (does *not* affect non-string comparisions) */
CaseInsensitive = 0x1, /**< string-comparisons are case-insensitive (does *not* affect non-string comparisons) */
IgnoreMetaData = 0x2, /**< do *not* take meta-data like description and MIME-types into account */
};

View File

@ -346,7 +346,7 @@ void OverallTests::checkMkvTestfile7()
CPPUNIT_ASSERT_EQUAL("Big Buck Bunny - test 7"s, tags.front()->value(KnownField::Title).toString());
CPPUNIT_ASSERT_EQUAL(TagValue(), tags.front()->value(KnownField::Artist));
CPPUNIT_ASSERT_EQUAL(
"Matroska Validation File 7, junk elements are present at the beggining or end of clusters, the parser should skip it. There is also a damaged element at 451418"s,
"Matroska Validation File 7, junk elements are present at the beginning or end of clusters, the parser should skip it. There is also a damaged element at 451418"s,
tags.front()->value(KnownField::Comment).toString());
break;
case TagStatus::TestMetaDataPresent:

View File

@ -95,7 +95,7 @@ void TagValueTests::testInteger()
// zero
integer.assignInteger(0);
CPPUNIT_ASSERT_MESSAGE("explicitely assigned zero not considered empty", !integer.isEmpty());
CPPUNIT_ASSERT_MESSAGE("explicitly assigned zero not considered empty", !integer.isEmpty());
CPPUNIT_ASSERT_EQUAL("0"s, integer.toString());
CPPUNIT_ASSERT_EQUAL(DateTime(), integer.toDateTime());
CPPUNIT_ASSERT_EQUAL(TimeSpan(), integer.toTimeSpan());
@ -193,16 +193,16 @@ void TagValueTests::testString()
void TagValueTests::testEqualityOperator()
{
CPPUNIT_ASSERT_MESSAGE("equality requires identical types or identical string representation"s, TagValue(0) != TagValue::empty());
CPPUNIT_ASSERT_EQUAL_MESSAGE("comparision of equal types"s, TagValue(15), TagValue(15));
CPPUNIT_ASSERT_EQUAL_MESSAGE("comparison of equal types"s, TagValue(15), TagValue(15));
CPPUNIT_ASSERT_EQUAL_MESSAGE("types might differ"s, TagValue("15", 2, TagTextEncoding::Latin1), TagValue(15));
CPPUNIT_ASSERT_MESSAGE("but some types shall never be considered equal"s, TagValue(DateTime(0)) != TagValue(TimeSpan(0)));
CPPUNIT_ASSERT_EQUAL_MESSAGE("comparision of equal UTF-16 strings"s, TagValue("\x31\0\x32\0", 4, TagTextEncoding::Utf16LittleEndian),
CPPUNIT_ASSERT_EQUAL_MESSAGE("comparison of equal UTF-16 strings"s, TagValue("\x31\0\x32\0", 4, TagTextEncoding::Utf16LittleEndian),
TagValue("\x31\0\x32\0", 4, TagTextEncoding::Utf16LittleEndian));
CPPUNIT_ASSERT_MESSAGE("comparision of different UTF-16 strings"s,
CPPUNIT_ASSERT_MESSAGE("comparison of different UTF-16 strings"s,
TagValue("\x31\0\x33\0", 4, TagTextEncoding::Utf16LittleEndian) != TagValue("\x31\0\x32\0", 4, TagTextEncoding::Utf16LittleEndian));
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"comparision of equal binary data"s, TagValue("\x31\0\x32\0", 4, TagDataType::Binary), TagValue("\x31\0\x32\0", 4, TagDataType::Binary));
CPPUNIT_ASSERT_MESSAGE("comparision of different binary data"s,
"comparison of equal binary data"s, TagValue("\x31\0\x32\0", 4, TagDataType::Binary), TagValue("\x31\0\x32\0", 4, TagDataType::Binary));
CPPUNIT_ASSERT_MESSAGE("comparison of different binary data"s,
TagValue("\x31\0\x33\0", 4, TagDataType::Binary) != TagValue("\x31\0\x32\0", 4, TagDataType::Binary));
CPPUNIT_ASSERT_EQUAL_MESSAGE("different encodings are converted if neccassary"s, TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian),
TagValue("15", 2, TagTextEncoding::Latin1));
@ -210,7 +210,7 @@ void TagValueTests::testEqualityOperator()
"encoding is ignored when not relevant for types"s, TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian), TagValue(15));
const TagValue fooTagValue("foo", 3, TagDataType::Text), fOoTagValue("fOo", 3, TagDataType::Text);
CPPUNIT_ASSERT_MESSAGE("string comparison case-sensitive by default"s, fooTagValue != fOoTagValue);
CPPUNIT_ASSERT_MESSAGE("case-insensitive string comparision"s, fooTagValue.compareTo(fOoTagValue, TagValueComparisionFlags::CaseInsensitive));
CPPUNIT_ASSERT_MESSAGE("case-insensitive string comparison"s, fooTagValue.compareTo(fOoTagValue, TagValueComparisionFlags::CaseInsensitive));
// meta-data
TagValue withDescription(15);

View File

@ -182,7 +182,7 @@ template <class StreamType> void VorbisComment::internalParse(StreamType &stream
}
m_size = static_cast<std::uint32_t>(static_cast<std::uint64_t>(stream.tellg()) - startOffset);
// turn "YEAR" into "DATE" (unless "DATE" exists)
// note: "DATE" is an official field and "YEAR" only an inofficial one but present in some files. In consistency with
// note: "DATE" is an official field and "YEAR" only an unofficial one but present in some files. In consistency with
// MediaInfo and VLC player it is treated like "DATE" here.
static const auto dateFieldId = std::string(VorbisCommentIds::date()), yearFieldId = std::string(VorbisCommentIds::year());
if (fields().find(dateFieldId) == fields().end()) {

View File

@ -71,7 +71,7 @@ inline bool VorbisComment::canEncodingBeUsed(TagTextEncoding encoding) const
/*!
* \brief Returns the vendor.
* \remarks Also accessable via value(KnownField::Vendor).
* \remarks Also accessible via value(KnownField::Vendor).
*/
inline const TagValue &VorbisComment::vendor() const
{
@ -80,7 +80,7 @@ inline const TagValue &VorbisComment::vendor() const
/*!
* \brief Sets the vendor.
* \remarks Also accessable via setValue(KnownField::Vendor, vendor).
* \remarks Also accessible via setValue(KnownField::Vendor, vendor).
*/
inline void VorbisComment::setVendor(const TagValue &vendor)
{