57 lines
No EOL
1.2 KiB
C++
57 lines
No EOL
1.2 KiB
C++
#ifndef MKVP_CUEPOINT_HPP
|
|
#define MKVP_CUEPOINT_HPP
|
|
|
|
#include "memory.hpp"
|
|
#include <vector>
|
|
|
|
namespace mkvparser
|
|
{
|
|
|
|
class Cues;
|
|
class Segment;
|
|
class Track;
|
|
class IMkvReader;
|
|
|
|
class CuePoint : mem::AllocBase
|
|
{
|
|
friend class Cues;
|
|
|
|
CuePoint(long, long long);
|
|
~CuePoint();
|
|
|
|
CuePoint(const CuePoint&);
|
|
CuePoint& operator=(const CuePoint&);
|
|
|
|
public:
|
|
long long m_element_start;
|
|
long long m_element_size;
|
|
|
|
void Load(IMkvReader*);
|
|
|
|
long long GetTimeCode() const; //absolute but unscaled
|
|
long long GetTime(const Segment*) const; //absolute and scaled (ns units)
|
|
|
|
struct TrackPosition
|
|
{
|
|
long long m_track;
|
|
long long m_pos; //of cluster
|
|
long long m_block;
|
|
//codec_state //defaults to 0
|
|
//reference = clusters containing req'd referenced blocks
|
|
// reftime = timecode of the referenced block
|
|
|
|
void Parse(IMkvReader*, long long, long long);
|
|
};
|
|
|
|
const TrackPosition* Find(const Track*) const;
|
|
|
|
private:
|
|
const long m_index;
|
|
long long m_timecode;
|
|
typedef std::vector<TrackPosition, mem::StlAllocator<TrackPosition> > TrackPosVect_t;
|
|
TrackPosVect_t m_track_positions;
|
|
};
|
|
|
|
} // namespace mkvparser
|
|
|
|
#endif // MKVP_CUEPOINT_HPP
|