20#ifndef MATROSKAVIDEO_HPP_
21#define MATROSKAVIDEO_HPP_
24#include "exiv2lib_export.h"
41enum matroskaTypeEnum :
char {
55enum matroskaProcessEnum :
char {
65 matroskaTypeEnum _type;
66 matroskaProcessEnum _process;
68 MatroskaTag(uint64_t
id, std::string label, matroskaTypeEnum type, matroskaProcessEnum process) :
69 _id(
id), _label(std::move(label)), _type(type), _process(process) {
72 MatroskaTag(uint64_t
id, std::string label) :
74 _label(std::move(label)),
75 _type(matroskaTypeEnum::UndefinedType),
76 _process(matroskaProcessEnum::Undefined) {
79 bool operator==(uint64_t
id)
const {
83 [[nodiscard]]
bool isSkipped()
const {
84 return _process == Skip;
86 [[nodiscard]]
bool isComposite()
const {
87 return _process == Composite;
89 void dump(std::ostream& os)
const {
91 <<
" id: [0x" << std::hex << _id <<
"] label:[" << _label <<
"] type:[" << _type <<
"] process :[" << _process
126 [[nodiscard]] std::string
mimeType()
const override;
161 bool continueTraversing_{};
165 uint32_t track_count_{};
166 double time_code_scale_ = 1.0;
169 static constexpr double bytesMB = 1048576;
An interface for simple binary IO.
Definition basicio.hpp:35
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
Image(ImageType type, uint16_t supportedMetadata, BasicIo::UniquePtr io)
Constructor taking the image type, a bitmap of the supported metadata types and an auto-pointer that ...
Definition image.cpp:132
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:680
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
std::string mimeType() const override
Return the MIME type of the image.
Definition matroskavideo.cpp:607
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition matroskavideo.cpp:614
void decodeBlock()
Check for a valid tag and decode the block at the current IO position. Calls contentManagement() or s...
Definition matroskavideo.cpp:639
void decodeInternalTags(const Internal::MatroskaTag *tag, const byte *buf)
Interpret tag information, and save it in the respective XMP container.
Definition matroskavideo.cpp:722
void writeMetadata() override
Write metadata back to the image.
Definition matroskavideo.cpp:611
static uint32_t findBlockSize(byte b)
Function used to calculate the size of a block. This information is only stored in one byte....
Definition matroskavideo.cpp:902
MatroskaVideo(BasicIo::UniquePtr io)
Constructor for a Matroska video. Since the constructor can not return a result, callers should check...
Definition matroskavideo.cpp:604
Helper structure for the Matroska tags lookup table.
Definition matroskavideo.hpp:39
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
EXIV2API Image::UniquePtr newMkvInstance(BasicIo::UniquePtr io, bool create)
Create a new MatroskaVideo instance and return an auto-pointer to it. Caller owns the returned object...
Definition matroskavideo.cpp:922
EXIV2API bool isMkvType(BasicIo &iIo, bool advance)
Check if the file iIo is a Matroska Video.
Definition matroskavideo.cpp:930
Definition matroskavideo.hpp:62