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
|
|
|
|
2016-08-29 15:43:05 +02:00
|
|
|
class TAG_PARSER_EXPORT AdtsStream : public AbstractTrack
|
2015-07-15 00:10:24 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
AdtsStream(std::iostream &stream, uint64 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:
|
2018-03-07 01:11:42 +01:00
|
|
|
void internalParseHeader(Diagnostics &diag) 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.
|
|
|
|
*/
|
|
|
|
inline AdtsStream::AdtsStream(std::iostream &stream, uint64 startOffset) :
|
|
|
|
AbstractTrack(stream, startOffset)
|
|
|
|
{
|
|
|
|
m_mediaType = MediaType::Audio;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline AdtsStream::~AdtsStream()
|
|
|
|
{}
|
|
|
|
|
|
|
|
inline TrackType AdtsStream::type() const
|
|
|
|
{
|
|
|
|
return TrackType::AdtsStream;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Media
|
|
|
|
|
2018-03-06 23:09:15 +01:00
|
|
|
#endif // TAG_PARSER_ADTSSTREAM_H
|