2018-03-06 23:09:15 +01:00
|
|
|
#ifndef TAG_PARSER_ADTSSTREAM_H
|
|
|
|
#define TAG_PARSER_ADTSSTREAM_H
|
2015-07-15 00:10:24 +02:00
|
|
|
|
2015-09-06 19:57:33 +02:00
|
|
|
#include "./adtsframe.h"
|
2015-09-06 15:42:18 +02:00
|
|
|
|
2015-09-06 19:57:33 +02:00
|
|
|
#include "../abstracttrack.h"
|
2015-07-15 00:10:24 +02:00
|
|
|
|
2018-03-06 23:09:15 +01:00
|
|
|
namespace TagParser {
|
2015-07-15 00:10:24 +02:00
|
|
|
|
2020-12-18 21:13:52 +01:00
|
|
|
class TAG_PARSER_EXPORT AdtsStream final : public AbstractTrack {
|
2015-07-15 00:10:24 +02:00
|
|
|
public:
|
2019-03-13 19:06:42 +01:00
|
|
|
AdtsStream(std::iostream &stream, std::uint64_t startOffset);
|
2018-03-07 01:11:42 +01:00
|
|
|
~AdtsStream() override;
|
2015-07-15 00:10:24 +02:00
|
|
|
|
2018-03-07 01:11:42 +01:00
|
|
|
TrackType type() const override;
|
2015-07-15 00:10:24 +02:00
|
|
|
|
|
|
|
protected:
|
2021-02-04 23:21:50 +01:00
|
|
|
void internalParseHeader(Diagnostics &diag, AbortableProgressFeedback &progress) override;
|
2015-07-15 00:10:24 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
AdtsFrame m_firstFrame;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Constructs a new track for the \a stream at the specified \a startOffset.
|
|
|
|
*/
|
2019-03-13 19:06:42 +01:00
|
|
|
inline AdtsStream::AdtsStream(std::iostream &stream, std::uint64_t startOffset)
|
2018-03-07 01:17:50 +01:00
|
|
|
: AbstractTrack(stream, startOffset)
|
2015-07-15 00:10:24 +02:00
|
|
|
{
|
|
|
|
m_mediaType = MediaType::Audio;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline AdtsStream::~AdtsStream()
|
2018-03-07 01:17:50 +01:00
|
|
|
{
|
|
|
|
}
|
2015-07-15 00:10:24 +02:00
|
|
|
|
|
|
|
inline TrackType AdtsStream::type() const
|
|
|
|
{
|
|
|
|
return TrackType::AdtsStream;
|
|
|
|
}
|
|
|
|
|
2018-03-07 01:17:50 +01:00
|
|
|
} // namespace TagParser
|
2015-07-15 00:10:24 +02:00
|
|
|
|
2018-03-06 23:09:15 +01:00
|
|
|
#endif // TAG_PARSER_ADTSSTREAM_H
|