Tag Parser: ogg/oggstream.h Source File

Tag Parser 12.5.3 C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags

Loading...
Searching...
No Matches
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
13 class TAG_PARSER_EXPORT OggStream final : public AbstractTrack {
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
34 inline std::size_t OggStream::startPage() const
35{
36 return m_startPage;
37}
38
39 inline TrackType OggStream::type() const
40{
41 return TrackType::OggStream;
42}
43
44} // namespace TagParser
45
46#endif // TAG_PARSER_OGGSTREAM_H
abstracttrack.h
TagParser::AbortableProgressFeedback
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
Definition progressfeedback.h:186
TagParser::AbstractTrack::AbstractTrack
AbstractTrack(std::istream &inputStream, std::ostream &outputStream, std::uint64_t startOffset)
Constructs a new track.
Definition abstracttrack.cpp:33
TagParser::Diagnostics
The Diagnostics class is a container for DiagMessage.
Definition diagnostics.h:156
TagParser::OggContainer
Implementation of TagParser::AbstractContainer for Ogg files.
Definition oggcontainer.h:134
TagParser::OggIterator
The OggIterator class helps iterating through all segments of an Ogg bitstream.
Definition oggiterator.h:11
TagParser::OggStream::OggContainer
friend class OggContainer
Definition oggstream.h:14
TagParser::OggStream::OggStream
OggStream(OggContainer &container, std::vector< OggPage >::size_type startPage)
Constructs a new track for the stream at the specified startOffset.
Definition oggstream.cpp:34
TagParser::OggStream::internalParseHeader
void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override
This method is internally called to parse header information.
Definition oggstream.cpp:49
TagParser::OggStream::type
TrackType type() const override
Returns the type of the track if known; otherwise returns TrackType::Unspecified.
Definition oggstream.h:39
TagParser::OggStream::startPage
std::size_t startPage() const
Definition oggstream.h:34
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
TagParser
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
TagParser::TrackType
TrackType
The TrackType enum specifies the underlying file type of a track and the concrete class of the track ...
Definition abstracttrack.h:32
TagParser::TrackType::OggStream
@ OggStream
Definition abstracttrack.h:38
oggpage.h