2018-03-06 23:09:15 +01:00
|
|
|
#ifndef TAG_PARSER_OGGSTREAM_H
|
|
|
|
#define TAG_PARSER_OGGSTREAM_H
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2015-09-06 19:57:33 +02:00
|
|
|
#include "./oggpage.h"
|
|
|
|
|
|
|
|
#include "../abstracttrack.h"
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2018-03-06 23:09:15 +01:00
|
|
|
namespace TagParser {
|
2015-04-22 19:22:01 +02:00
|
|
|
|
|
|
|
class OggContainer;
|
|
|
|
class OggIterator;
|
|
|
|
|
2020-12-18 21:13:52 +01:00
|
|
|
class TAG_PARSER_EXPORT OggStream final : public AbstractTrack {
|
2015-04-22 19:22:01 +02:00
|
|
|
friend class OggContainer;
|
|
|
|
|
|
|
|
public:
|
|
|
|
OggStream(OggContainer &container, std::vector<OggPage>::size_type startPage);
|
2018-03-07 01:11:42 +01:00
|
|
|
~OggStream() override;
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2018-03-07 01:11:42 +01:00
|
|
|
TrackType type() const override;
|
2016-03-22 22:52:36 +01:00
|
|
|
std::size_t startPage() const;
|
2015-04-22 19:22:01 +02:00
|
|
|
|
|
|
|
protected:
|
2021-02-04 23:21:50 +01:00
|
|
|
void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override;
|
2015-04-22 19:22:01 +02:00
|
|
|
|
|
|
|
private:
|
2019-03-13 19:06:42 +01:00
|
|
|
void calculateDurationViaSampleCount(std::uint16_t preSkip = 0);
|
2017-09-03 18:54:46 +02:00
|
|
|
|
2016-03-22 22:52:36 +01:00
|
|
|
std::size_t m_startPage;
|
2015-04-22 19:22:01 +02:00
|
|
|
OggContainer &m_container;
|
2019-03-13 19:06:42 +01:00
|
|
|
std::uint32_t m_currentSequenceNumber;
|
2015-04-22 19:22:01 +02:00
|
|
|
};
|
|
|
|
|
2016-03-22 22:52:36 +01:00
|
|
|
inline std::size_t OggStream::startPage() const
|
|
|
|
{
|
|
|
|
return m_startPage;
|
|
|
|
}
|
|
|
|
|
2015-04-22 19:22:01 +02:00
|
|
|
inline TrackType OggStream::type() const
|
|
|
|
{
|
|
|
|
return TrackType::OggStream;
|
|
|
|
}
|
|
|
|
|
2018-03-07 01:17:50 +01:00
|
|
|
} // namespace TagParser
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2018-03-06 23:09:15 +01:00
|
|
|
#endif // TAG_PARSER_OGGSTREAM_H
|