diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-08 00:18:19 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-08 00:21:49 +0300 |
commit | 499aca4ebf01dec35a0af702e682643028d274da (patch) | |
tree | 9728fffae0cad730810e1b05639d9ed64a0bf244 /common | |
parent | 29c988c1aad43a4ccc065f61529e98ac34a17cce (diff) |
Export HEVC HDR metadata to the renderer
Diffstat (limited to 'common')
-rw-r--r-- | common/includes/IMediaSideData.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/common/includes/IMediaSideData.h b/common/includes/IMediaSideData.h new file mode 100644 index 00000000..20d2ce5d --- /dev/null +++ b/common/includes/IMediaSideData.h @@ -0,0 +1,45 @@ +// ----------------------------------------------------------------- +// IMediaSideData interface and data structure definitions +// ----------------------------------------------------------------- + +#pragma once + +// ----------------------------------------------------------------- +// Interface to exchange binary side data +// ----------------------------------------------------------------- +// This interface should be implemented in IMediaSample objects and accessed through IUnknown +// It allows binary side data to be attached to the media samples and delivered with them +// Restrictions: Only one side data per type can be attached +[uuid("F940AE7F-48EB-4377-806C-8FC48CAB2292")] +interface IMediaSideData : public IUnknown +{ + // Set the side data identified by guidType to the data provided + // The provided data will be copied and stored internally + STDMETHOD(SetSideData)(GUID guidType, const BYTE *pData, size_t size) PURE; + + // Get the side data identified by guidType + // The caller receives pointers to the internal data, and the pointers shall stay + // valid for the lifetime of the object + STDMETHOD(GetSideData)(GUID guidType, const BYTE **pData, size_t *pSize) PURE; +}; + + +// ----------------------------------------------------------------- +// High-Dynamic-Range (HDR) Side Data +// ----------------------------------------------------------------- + +// {53820DBC-A7B8-49C4-B17B-E511591A790C} +DEFINE_GUID(IID_MediaSideDataHDR, +0x53820dbc, 0xa7b8, 0x49c4, 0xb1, 0x7b, 0xe5, 0x11, 0x59, 0x1a, 0x79, 0xc); + +#pragma pack(push, 1) +struct MediaSideDataHDR +{ + double display_primaries_x[3]; + double display_primaries_y[3]; + double white_point_x; + double white_point_y; + double max_display_mastering_luminance; + double min_display_mastering_luminance; +}; +#pragma pack(pop) |