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;
90 std::string technicalSummary()
const;
91 bool areTracksSupported()
const;
94 bool hasId3v1Tag()
const;
95 bool hasId3v2Tag()
const;
96 bool hasAnyTag()
const;
98 const std::vector<std::unique_ptr<Id3v2Tag>> &id3v2Tags()
const;
99 void tags(std::vector<Tag *> &tags)
const;
100 std::vector<Tag *> tags()
const;
102 const std::vector<std::unique_ptr<MatroskaTag>> &matroskaTags()
const;
104 bool areTagsSupported()
const;
108 bool removeId3v1Tag();
111 bool removeAllId3v2Tags();
113 bool removeTag(
Tag *tag);
114 void removeAllTags();
115 void mergeId3v2Tags();
119 bool removeVorbisComment();
120 void clearParsingResults();
123 const std::string &backupDirectory()
const;
124 void setBackupDirectory(
const std::string &backupDirectory);
125 const std::string &saveFilePath()
const;
126 void setSaveFilePath(
const std::string &saveFilePath);
127 const std::string writingApplication()
const;
128 void setWritingApplication(
const std::string &writingApplication);
129 void setWritingApplication(
const char *writingApplication);
130 bool isForcingFullParse()
const;
131 void setForceFullParse(
bool forceFullParse);
132 bool isForcingRewrite()
const;
133 void setForceRewrite(
bool forceRewrite);
134 size_t minPadding()
const;
135 void setMinPadding(
size_t minPadding);
136 size_t maxPadding()
const;
137 void setMaxPadding(
size_t maxPadding);
138 size_t preferredPadding()
const;
139 void setPreferredPadding(
size_t preferredPadding);
142 bool forceTagPosition()
const;
143 void setForceTagPosition(
bool forceTagPosition);
146 bool forceIndexPosition()
const;
147 void setForceIndexPosition(
bool forceTagPosition);
150 void invalidated()
override;
161 std::streamoff m_containerOffset;
162 uint64 m_paddingSize;
163 bool m_actualExistingId3v1Tag;
164 std::vector<std::streamoff> m_actualId3v2TagOffsets;
165 std::unique_ptr<AbstractContainer> m_container;
169 std::unique_ptr<AbstractTrack> m_singleTrack;
173 std::unique_ptr<Id3v1Tag> m_id3v1Tag;
174 std::vector<std::unique_ptr<Id3v2Tag>> m_id3v2Tags;
181 std::string m_backupDirectory;
182 std::string m_saveFilePath;
183 std::string m_writingApplication;
186 size_t m_preferredPadding;
189 bool m_forceFullParse;
191 bool m_forceTagPosition;
192 bool m_forceIndexPosition;
200 return m_containerParsingStatus;
211 return m_containerFormat;
249 return static_cast<uint64
>(m_containerOffset);
257 return m_paddingSize;
265 return m_tagsParsingStatus;
273 return m_tracksParsingStatus;
286 return m_singleTrack ? 1 : (m_container ? m_container->trackCount() : 0);
294 return m_chaptersParsingStatus;
302 return m_attachmentsParsingStatus;
310 return m_id3v1Tag !=
nullptr;
318 return !m_id3v2Tags.empty();
330 return m_id3v1Tag.get();
352 return m_backupDirectory;
370 return m_saveFilePath;
399 return m_writingApplication;
432 return m_container.get();
445 return m_forceFullParse;
455 m_forceFullParse = forceFullParse;
463 return m_forceRewrite;
471 m_forceRewrite = forceRewrite;
537 return m_preferredPadding;
557 return m_tagPosition;
582 return m_forceTagPosition;
602 return m_indexPosition;
622 return m_forceIndexPosition;
637 #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, ...) has been parsed yet and if what the parsing result is.
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, directory and size for a specified file.