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 void removeTag(
Tag *tag);
114 void removeAllTags();
115 void mergeId3v2Tags();
119 bool removeVorbisComment();
120 void clearParsingResults();
123 const std::string &saveFilePath()
const;
124 void setSaveFilePath(
const std::string &saveFilePath);
125 const std::string writingApplication()
const;
126 void setWritingApplication(
const std::string &writingApplication);
127 void setWritingApplication(
const char *writingApplication);
128 bool isForcingFullParse()
const;
129 void setForceFullParse(
bool forceFullParse);
130 bool isForcingRewrite()
const;
131 void setForceRewrite(
bool forceRewrite);
132 size_t minPadding()
const;
133 void setMinPadding(
size_t minPadding);
134 size_t maxPadding()
const;
135 void setMaxPadding(
size_t maxPadding);
136 size_t preferredPadding()
const;
137 void setPreferredPadding(
size_t preferredPadding);
140 bool forceTagPosition()
const;
141 void setForceTagPosition(
bool forceTagPosition);
144 bool forceIndexPosition()
const;
145 void setForceIndexPosition(
bool forceTagPosition);
148 void invalidated()
override;
159 std::streamoff m_containerOffset;
160 uint64 m_paddingSize;
161 bool m_actualExistingId3v1Tag;
162 std::vector<std::streamoff> m_actualId3v2TagOffsets;
163 std::unique_ptr<AbstractContainer> m_container;
167 std::unique_ptr<AbstractTrack> m_singleTrack;
171 std::unique_ptr<Id3v1Tag> m_id3v1Tag;
172 std::vector<std::unique_ptr<Id3v2Tag>> m_id3v2Tags;
179 std::string m_saveFilePath;
180 std::string m_writingApplication;
183 size_t m_preferredPadding;
186 bool m_forceFullParse;
188 bool m_forceTagPosition;
189 bool m_forceIndexPosition;
197 return m_containerParsingStatus;
208 return m_containerFormat;
246 return static_cast<uint64
>(m_containerOffset);
254 return m_paddingSize;
262 return m_tagsParsingStatus;
270 return m_tracksParsingStatus;
283 return m_singleTrack ? 1 : (m_container ? m_container->trackCount() : 0);
291 return m_chaptersParsingStatus;
299 return m_attachmentsParsingStatus;
307 return m_id3v1Tag !=
nullptr;
315 return !m_id3v2Tags.empty();
327 return m_id3v1Tag.get();
348 return m_saveFilePath;
377 return m_writingApplication;
410 return m_container.get();
423 return m_forceFullParse;
433 m_forceFullParse = forceFullParse;
441 return m_forceRewrite;
449 m_forceRewrite = forceRewrite;
515 return m_preferredPadding;
535 return m_tagPosition;
560 return m_forceTagPosition;
580 return m_indexPosition;
600 return m_forceIndexPosition;
615 #endif // TAG_PARSER_MEDIAINFO_H
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(...
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...
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.
TAG_PARSER_EXPORT const char * duration()
TagType
Specifies the tag type.
TAG_PARSER_EXPORT const char * containerFormatSubversion(ContainerFormat containerFormat)
Returns the subversion of the container format as C-style string.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.