tagparser/matroska/matroskachapter.h

51 lines
1.0 KiB
C
Raw Normal View History

2015-04-22 19:22:01 +02:00
#ifndef MEDIA_MATROSKACHAPTER_H
#define MEDIA_MATROSKACHAPTER_H
2015-09-06 19:57:33 +02:00
#include "../abstractchapter.h"
2015-04-22 19:22:01 +02:00
#include <memory>
namespace Media {
class EbmlElement;
2016-08-29 15:43:05 +02:00
class TAG_PARSER_EXPORT MatroskaChapter : public AbstractChapter
2015-04-22 19:22:01 +02:00
{
public:
MatroskaChapter(EbmlElement *chapterAtomElement);
~MatroskaChapter();
MatroskaChapter *nestedChapter(std::size_t index);
const MatroskaChapter *nestedChapter(std::size_t index) const;
std::size_t nestedChapterCount() const;
void clear();
protected:
void internalParse();
private:
EbmlElement *m_chapterAtomElement;
std::vector<std::unique_ptr<MatroskaChapter> > m_nestedChapters;
};
inline MatroskaChapter *MatroskaChapter::nestedChapter(std::size_t index)
{
return m_nestedChapters[index].get();
}
inline const MatroskaChapter *MatroskaChapter::nestedChapter(std::size_t index) const
{
return m_nestedChapters[index].get();
}
inline std::size_t MatroskaChapter::nestedChapterCount() const
{
return m_nestedChapters.size();
}
} // namespace Media
#endif // MEDIA_MATROSKACHAPTER_H