1 #ifndef TAG_PARSER_MEDIAINFO_H 2 #define TAG_PARSER_MEDIAINFO_H 10 #include <unordered_set> 21 class MatroskaContainer;
28 class AbortableProgressFeedback;
70 const char *mimeType()
const;
71 uint64 containerOffset()
const;
72 uint64 paddingSize()
const;
77 std::vector<AbstractChapter *> chapters()
const;
78 bool areChaptersSupported()
const;
81 std::vector<AbstractAttachment *> attachments()
const;
82 bool areAttachmentsSupported()
const;
85 std::size_t trackCount()
const;
86 std::vector<AbstractTrack *> tracks()
const;
89 double overallAverageBitrate()
const;
91 std::string technicalSummary()
const;
92 bool areTracksSupported()
const;
95 bool hasId3v1Tag()
const;
96 bool hasId3v2Tag()
const;
97 bool hasAnyTag()
const;
99 const std::vector<std::unique_ptr<Id3v2Tag>> &id3v2Tags()
const;
100 void tags(std::vector<Tag *> &tags)
const;
101 std::vector<Tag *> tags()
const;
103 const std::vector<std::unique_ptr<MatroskaTag>> &matroskaTags()
const;
105 bool areTagsSupported()
const;
109 bool removeId3v1Tag();
112 bool removeAllId3v2Tags();
114 bool removeTag(
Tag *tag);
115 void removeAllTags();
116 void mergeId3v2Tags();
120 bool removeVorbisComment();
121 void clearParsingResults();
124 const std::string &backupDirectory()
const;
125 void setBackupDirectory(
const std::string &backupDirectory);
126 const std::string &saveFilePath()
const;
127 void setSaveFilePath(
const std::string &saveFilePath);
128 const std::string writingApplication()
const;
129 void setWritingApplication(
const std::string &writingApplication);
130 void setWritingApplication(
const char *writingApplication);
131 bool isForcingFullParse()
const;
132 void setForceFullParse(
bool forceFullParse);
133 bool isForcingRewrite()
const;
134 void setForceRewrite(
bool forceRewrite);
135 size_t minPadding()
const;
136 void setMinPadding(
size_t minPadding);
137 size_t maxPadding()
const;
138 void setMaxPadding(
size_t maxPadding);
139 size_t preferredPadding()
const;
140 void setPreferredPadding(
size_t preferredPadding);
143 bool forceTagPosition()
const;
144 void setForceTagPosition(
bool forceTagPosition);
147 bool forceIndexPosition()
const;
148 void setForceIndexPosition(
bool forceTagPosition);
151 void invalidated()
override;
162 std::streamoff m_containerOffset;
163 uint64 m_paddingSize;
164 bool m_actualExistingId3v1Tag;
165 std::vector<std::streamoff> m_actualId3v2TagOffsets;
166 std::unique_ptr<AbstractContainer> m_container;
170 std::unique_ptr<AbstractTrack> m_singleTrack;
174 std::unique_ptr<Id3v1Tag> m_id3v1Tag;
175 std::vector<std::unique_ptr<Id3v2Tag>> m_id3v2Tags;
182 std::string m_backupDirectory;
183 std::string m_saveFilePath;
184 std::string m_writingApplication;
187 size_t m_preferredPadding;
190 bool m_forceFullParse;
192 bool m_forceTagPosition;
193 bool m_forceIndexPosition;
201 return m_containerParsingStatus;
212 return m_containerFormat;
250 return static_cast<uint64>(m_containerOffset);
258 return m_paddingSize;
266 return m_tagsParsingStatus;
274 return m_tracksParsingStatus;
287 return m_singleTrack ? 1 : (m_container ? m_container->trackCount() : 0);
295 return m_chaptersParsingStatus;
303 return m_attachmentsParsingStatus;
311 return m_id3v1Tag !=
nullptr;
319 return !m_id3v2Tags.empty();
331 return m_id3v1Tag.get();
353 return m_backupDirectory;
371 return m_saveFilePath;
400 return m_writingApplication;
433 return m_container.get();
446 return m_forceFullParse;
456 m_forceFullParse = forceFullParse;
464 return m_forceRewrite;
472 m_forceRewrite = forceRewrite;
538 return m_preferredPadding;
558 return m_tagPosition;
583 return m_forceTagPosition;
603 return m_indexPosition;
623 return m_forceIndexPosition;
638 #endif // TAG_PARSER_MEDIAINFO_H Implementation of TagParser::Tag for the MP4 container.
The Tag class is used to store, read and write tag information.
DECLARE_ENUM_CLASS(MediaType, unsigned int)
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
The TagSettings struct contains settings which can be passed to MediaFileInfo::createAppropriateTags(...
The AbstractContainer class provides an interface and common functionality to parse and make a certai...
ContainerFormat
Specifies the container format.
TAG_PARSER_EXPORT const char * containerFormatName(ContainerFormat containerFormat)
Returns the name of the specified container format as C-style string.
TAG_PARSER_EXPORT const char * containerFormatAbbreviation(ContainerFormat containerFormat, MediaType mediaType=MediaType::Unknown, unsigned int version=0)
Returns the abbreviation of the container format as C-style string considering the specified media ty...
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
ParsingStatus
The ParsingStatus enum specifies whether a certain part of the file (tracks, tags,...
Implementation of TagParser::Tag for ID3v2 tags.
constexpr TAG_PARSER_EXPORT const char * duration()
Implementation of TagParser::Tag for ID3v1 tags.
TagType
Specifies the tag type.
TAG_PARSER_EXPORT const char * containerFormatSubversion(ContainerFormat containerFormat)
Returns the subversion of the container format as C-style string.
Contains all classes and functions of the TagInfo library.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
The Diagnostics class is a container for DiagMessage.
The BasicFileInfo class provides basic file information such as file name, extension,...