Tag Parser: mpegaudio/mpegaudioframestream.h Source File

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

Loading...
Searching...
No Matches
mpegaudioframestream.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_MPEGAUDIOFRAMESTREAM_H
2#define TAG_PARSER_MPEGAUDIOFRAMESTREAM_H
3
4#include "./mpegaudioframe.h"
5
6#include "../abstracttrack.h"
7
8#include <list>
9
10namespace TagParser {
11
12 class TAG_PARSER_EXPORT MpegAudioFrameStream final : public AbstractTrack {
13public:
14 MpegAudioFrameStream(std::iostream &stream, std::uint64_t startOffset);
15 ~MpegAudioFrameStream() override;
16
17 TrackType type() const override;
18
19 static void addInfo(const MpegAudioFrame &frame, AbstractTrack &track);
20
21protected:
22 void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override;
23
24private:
25 std::list<MpegAudioFrame> m_frames;
26};
27
31 inline MpegAudioFrameStream::MpegAudioFrameStream(std::iostream &stream, std::uint64_t startOffset)
32 : AbstractTrack(stream, startOffset)
33{
34 m_mediaType = MediaType::Audio;
35}
36
37 inline MpegAudioFrameStream::~MpegAudioFrameStream()
38{
39}
40
41 inline TrackType MpegAudioFrameStream::type() const
42{
43 return TrackType::MpegAudioFrameStream;
44}
45
46} // namespace TagParser
47
48#endif // MPEGAUDIOFRAMESTREAM_H
abstracttrack.h
TagParser::AbortableProgressFeedback
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
Definition progressfeedback.h:186
TagParser::AbstractTrack::startOffset
std::uint64_t startOffset() const
Returns the start offset of the track in the associated stream.
Definition abstracttrack.h:316
TagParser::AbstractTrack::AbstractTrack
AbstractTrack(std::istream &inputStream, std::ostream &outputStream, std::uint64_t startOffset)
Constructs a new track.
Definition abstracttrack.cpp:33
TagParser::AbstractTrack::MpegAudioFrameStream
friend class MpegAudioFrameStream
Definition abstracttrack.h:111
TagParser::AbstractTrack::m_mediaType
MediaType m_mediaType
Definition abstracttrack.h:201
TagParser::Diagnostics
The Diagnostics class is a container for DiagMessage.
Definition diagnostics.h:156
TagParser::MpegAudioFrameStream::type
TrackType type() const override
Returns the type of the track if known; otherwise returns TrackType::Unspecified.
Definition mpegaudioframestream.h:41
TagParser::MpegAudioFrameStream::~MpegAudioFrameStream
~MpegAudioFrameStream() override
Definition mpegaudioframestream.h:37
TagParser::MpegAudioFrameStream::MpegAudioFrameStream
MpegAudioFrameStream(std::iostream &stream, std::uint64_t startOffset)
Constructs a new track for the stream at the specified startOffset.
Definition mpegaudioframestream.h:31
TagParser::MpegAudioFrameStream::addInfo
static void addInfo(const MpegAudioFrame &frame, AbstractTrack &track)
Adds the information from the specified frame to the specified track.
Definition mpegaudioframestream.cpp:23
TagParser::MpegAudioFrameStream::internalParseHeader
void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override
This method is internally called to parse header information.
Definition mpegaudioframestream.cpp:32
TagParser::MpegAudioFrame
The MpegAudioFrame class is used to parse MPEG audio frames.
Definition mpegaudioframe.h:37
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
mpegaudioframe.h
TagParser
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
TagParser::MediaType::Audio
@ Audio
Definition mediaformat.h:16
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::MpegAudioFrameStream
@ MpegAudioFrameStream
Definition abstracttrack.h:35