2018-07-28 14:56:00 +02:00
|
|
|
#ifndef TAG_PARSER_IVFSTREAM_H
|
|
|
|
#define TAG_PARSER_IVFSTREAM_H
|
|
|
|
|
|
|
|
#include "./ivfframe.h"
|
|
|
|
|
|
|
|
#include "../abstracttrack.h"
|
|
|
|
|
|
|
|
namespace TagParser {
|
|
|
|
|
|
|
|
class TAG_PARSER_EXPORT IvfStream : public AbstractTrack {
|
|
|
|
public:
|
2019-03-13 19:06:42 +01:00
|
|
|
IvfStream(std::iostream &stream, std::uint64_t startOffset);
|
2018-07-28 14:56:00 +02:00
|
|
|
~IvfStream() override;
|
|
|
|
|
|
|
|
TrackType type() const override;
|
|
|
|
|
|
|
|
void readFrame(Diagnostics &diag);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void internalParseHeader(Diagnostics &diag) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<IvfFrame> m_frames;
|
2019-03-13 19:06:42 +01:00
|
|
|
std::uint16_t m_headerLength;
|
2018-07-28 14:56:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Constructs a new track for the \a stream at the specified \a startOffset.
|
|
|
|
*/
|
2019-03-13 19:06:42 +01:00
|
|
|
inline IvfStream::IvfStream(std::iostream &stream, std::uint64_t startOffset)
|
2018-07-28 14:56:00 +02:00
|
|
|
: AbstractTrack(stream, startOffset)
|
|
|
|
{
|
|
|
|
m_mediaType = MediaType::Video;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline IvfStream::~IvfStream()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
inline TrackType IvfStream::type() const
|
|
|
|
{
|
|
|
|
return TrackType::IvfStream;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace TagParser
|
|
|
|
|
|
|
|
#endif // TAG_PARSER_IVFSTREAM_H
|