2015-07-15 00:10:24 +02:00
|
|
|
#ifndef MEDIA_ADTSSTREAM_H
|
|
|
|
#define MEDIA_ADTSSTREAM_H
|
|
|
|
|
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
|
|
|
|
|
|
|
namespace Media {
|
|
|
|
|
|
|
|
class LIB_EXPORT AdtsStream : public AbstractTrack
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AdtsStream(std::iostream &stream, uint64 startOffset);
|
|
|
|
~AdtsStream();
|
|
|
|
|
|
|
|
TrackType type() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void internalParseHeader();
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#endif // MEDIA_ADTSSTREAM_H
|