Tag Parser 12.5.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
oggstream.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_OGGSTREAM_H
2#define TAG_PARSER_OGGSTREAM_H
3
4#include "./oggpage.h"
5
6#include "../abstracttrack.h"
7
8namespace TagParser {
9
10class OggContainer;
11class OggIterator;
12
14 friend class OggContainer;
15
16public:
17 OggStream(OggContainer &container, std::vector<OggPage>::size_type startPage);
18 ~OggStream() override;
19
20 TrackType type() const override;
21 std::size_t startPage() const;
22
23protected:
24 void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override;
25
26private:
27 void calculateDurationViaSampleCount(std::uint16_t preSkip = 0);
28
29 std::size_t m_startPage;
30 OggContainer &m_container;
31 std::uint32_t m_currentSequenceNumber;
32};
33
34inline std::size_t OggStream::startPage() const
35{
36 return m_startPage;
37}
38
40{
42}
43
44} // namespace TagParser
45
46#endif // TAG_PARSER_OGGSTREAM_H
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
AbstractTrack(std::istream &inputStream, std::ostream &outputStream, std::uint64_t startOffset)
Constructs a new track.
The Diagnostics class is a container for DiagMessage.
Implementation of TagParser::AbstractContainer for Ogg files.
The OggIterator class helps iterating through all segments of an Ogg bitstream.
Definition oggiterator.h:11
friend class OggContainer
Definition oggstream.h:14
OggStream(OggContainer &container, std::vector< OggPage >::size_type startPage)
Constructs a new track for the stream at the specified startOffset.
Definition oggstream.cpp:34
void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override
This method is internally called to parse header information.
Definition oggstream.cpp:49
TrackType type() const override
Returns the type of the track if known; otherwise returns TrackType::Unspecified.
Definition oggstream.h:39
std::size_t startPage() const
Definition oggstream.h:34
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
TrackType
The TrackType enum specifies the underlying file type of a track and the concrete class of the track ...