Support MPEG2 compression.
[libdcp.git] / src / frame_info.h
index a49f52a912c8f06ba6f67214c47b4cb430e270a2..325350c49cb0cf99bc4b7cf0a5e25a139b8a22a0 100644 (file)
 #define LIBDCP_FRAME_INFO_H
 
 
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
+#include <asdcp/AS_DCP.h>
+LIBDCP_ENABLE_WARNINGS
 #include <stdint.h>
 #include <string>
 
@@ -72,6 +76,33 @@ struct J2KFrameInfo : public FrameInfo
 };
 
 
+struct MPEG2FrameInfo : public FrameInfo
+{
+       MPEG2FrameInfo() = default;
+
+       MPEG2FrameInfo(
+               uint64_t offset_,
+               uint64_t size_,
+               std::string hash_,
+               ASDCP::MPEG2::FrameType_t type_,
+               bool gop_start_,
+               bool closed_gop_,
+               uint8_t temporal_offset_
+               )
+               : FrameInfo(offset_, size_, hash_)
+               , type(type_)
+               , gop_start(gop_start_)
+               , closed_gop(closed_gop_)
+               , temporal_offset(temporal_offset_)
+       {}
+
+       ASDCP::MPEG2::FrameType_t type;
+       bool gop_start;
+       bool closed_gop;
+       uint8_t temporal_offset;
+};
+
+
 }