Tag Parser  8.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
waveaudiostream.h
Go to the documentation of this file.
1 #ifndef TAG_PARSER_WAVEAUDIOSTREAM_H
2 #define TAG_PARSER_WAVEAUDIOSTREAM_H
3 
4 #include "../abstracttrack.h"
5 
6 namespace TagParser {
7 
9 public:
10  constexpr WaveFormatHeader();
11 
12  void parse(IoUtilities::BinaryReader &reader);
13  MediaFormat format() const;
14  constexpr uint32 bitrate() const;
15 
16  uint16 formatTag;
17  uint16 channelCount;
18  uint16 sampleRate;
20  uint16 chunkSize;
21  uint16 bitsPerSample;
22 };
23 
28  : formatTag(0)
29  , channelCount(0)
30  , sampleRate(0)
31  , bytesPerSecond(0)
32  , chunkSize(0)
33  , bitsPerSample(0)
34 {
35 }
36 
40 constexpr uint32 WaveFormatHeader::bitrate() const
41 {
43 }
44 
46 public:
47  WaveAudioStream(std::iostream &stream, uint64 startOffset);
48  ~WaveAudioStream() override;
49 
50  TrackType type() const override;
51 
52  static void addInfo(const WaveFormatHeader &waveHeader, AbstractTrack &track);
53 
54 protected:
55  void internalParseHeader(Diagnostics &diag) override;
56 
57 private:
58  uint64 m_dataOffset;
59 };
60 
61 } // namespace TagParser
62 
63 #endif // TAG_PARSER_WAVEAUDIOSTREAM_H
TAG_PARSER_EXPORT byte channelCount(byte config)
Returns the channel count for the specified MPEG-4 channel config.
Definition: mp4ids.cpp:452
Implementation of TagParser::AbstractTrack for the RIFF WAVE container format.
constexpr WaveFormatHeader()
Constructs a new WaveFormatHeader.
The MediaFormat class specifies the format of media data.
Definition: mediaformat.h:244
The WaveFormatHeader class parses the WAVEFORMATEX structure defined by MS.
constexpr TAG_PARSER_EXPORT const char * bitrate()
The track's bit rate in bits per second.
The AbstractTrack class parses and stores technical information about video, audio and other kinds of...
Definition: abstracttrack.h:40
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
TrackType
Specifies the track type.
Definition: abstracttrack.h:28
constexpr uint32 bitrate() const
Calculates the bitrate from the header data.
The Diagnostics class is a container for DiagMessage.
Definition: diagnostics.h:156