44 lines
No EOL
956 B
C++
44 lines
No EOL
956 B
C++
#ifndef MKVP_TRACKS_HPP
|
|
#define MKVP_TRACKS_HPP
|
|
|
|
#include "memory.hpp"
|
|
#include "ebmlelement.hpp"
|
|
#include "track.hpp"
|
|
#include <vector>
|
|
|
|
namespace mkvparser
|
|
{
|
|
|
|
class Segment;
|
|
|
|
class Tracks : public mem::AllocBase
|
|
{
|
|
Tracks(const Tracks&);
|
|
Tracks& operator=(const Tracks&);
|
|
|
|
public:
|
|
Tracks(Segment*, const EBMLElement&);
|
|
~Tracks();
|
|
|
|
long Parse();
|
|
|
|
unsigned long GetTracksCount() const { return static_cast<unsigned long>(m_trackEntries.size()); }
|
|
|
|
const Track* GetTrackByNumber(long tn) const;
|
|
const Track* GetTrackByIndex(unsigned long idx) const;
|
|
const Track* GetTrackByType(Track::Type type) const;
|
|
|
|
private:
|
|
long ParseTrackEntry(const EBMLElement& elemInfo, Track*&) const;
|
|
|
|
private:
|
|
Segment* const m_pSegment;
|
|
EBMLElement m_elemInfo;
|
|
|
|
typedef std::vector<Track*, mem::StlAllocator<Track*> > TrackVect_t;
|
|
TrackVect_t m_trackEntries;
|
|
};
|
|
|
|
} // namespace mkvparser
|
|
|
|
#endif // MKVP_TRACKS_HPP
|