Commit 3932dcb3 authored by Seungha Yang's avatar Seungha Yang

qtdemux: Add support HEIF compatible media

HEIF file format is a variant of ISOBMFF for image (or image sequence).
Although HEIF files are compatible with ISOBMFF, there should be special
concern since 'moov' atom is not mandatory for that specification.
For instance, top-level 'meta' atom can take the role of moov.
Also, top-level 'meta' and 'moov' can co-exist in a file.

See http://standards.iso.org/ittf/PubliclyAvailableStandards/c066067_ISO_IEC_23008-12_2017.zip
parent d7e1dcce
...@@ -58,6 +58,7 @@ G_BEGIN_DECLS ...@@ -58,6 +58,7 @@ G_BEGIN_DECLS
#define FOURCC_MAC6 GST_MAKE_FOURCC('M','A','C','6') #define FOURCC_MAC6 GST_MAKE_FOURCC('M','A','C','6')
#define FOURCC_MP4V GST_MAKE_FOURCC('M','P','4','V') #define FOURCC_MP4V GST_MAKE_FOURCC('M','P','4','V')
#define FOURCC_PICT GST_MAKE_FOURCC('P','I','C','T') #define FOURCC_PICT GST_MAKE_FOURCC('P','I','C','T')
#define FOURCC_pict GST_MAKE_FOURCC('p','i','c','t')
#define FOURCC_QDM2 GST_MAKE_FOURCC('Q','D','M','2') #define FOURCC_QDM2 GST_MAKE_FOURCC('Q','D','M','2')
#define FOURCC_SVQ3 GST_MAKE_FOURCC('S','V','Q','3') #define FOURCC_SVQ3 GST_MAKE_FOURCC('S','V','Q','3')
#define FOURCC_VP31 GST_MAKE_FOURCC('V','P','3','1') #define FOURCC_VP31 GST_MAKE_FOURCC('V','P','3','1')
...@@ -391,6 +392,21 @@ G_BEGIN_DECLS ...@@ -391,6 +392,21 @@ G_BEGIN_DECLS
#define FOURCC_tenc GST_MAKE_FOURCC('t','e','n','c') #define FOURCC_tenc GST_MAKE_FOURCC('t','e','n','c')
#define FOURCC_cenc GST_MAKE_FOURCC('c','e','n','c') #define FOURCC_cenc GST_MAKE_FOURCC('c','e','n','c')
/* child atoms of meta */
#define FOURCC_pitm GST_MAKE_FOURCC('p','i','t','m')
#define FOURCC_iloc GST_MAKE_FOURCC('i','l','o','c')
#define FOURCC_iinf GST_MAKE_FOURCC('i','i','n','f')
#define FOURCC_infe GST_MAKE_FOURCC('i','n','f','e')
#define FOURCC_iref GST_MAKE_FOURCC('i','r','e','f')
/* High Efficiency Image File Format (HEIF) */
#define FOURCC_mif1 GST_MAKE_FOURCC('m','i','f','1')
#define FOURCC_msf1 GST_MAKE_FOURCC('m','s','f','1')
#define FOURCC_iprp GST_MAKE_FOURCC('i','p','r','p')
#define FOURCC_ipco GST_MAKE_FOURCC('i','p','c','o')
#define FOURCC_ispe GST_MAKE_FOURCC('i','s','p','e')
#define FOURCC_ipma GST_MAKE_FOURCC('i','p','m','a')
G_END_DECLS G_END_DECLS
#endif /* __FOURCC_H__ */ #endif /* __FOURCC_H__ */
This diff is collapsed.
...@@ -104,6 +104,10 @@ struct _GstQTDemux { ...@@ -104,6 +104,10 @@ struct _GstQTDemux {
* to a temporary variable ? */ * to a temporary variable ? */
GNode *moov_node; GNode *moov_node;
/* top-level [meta] header */
GNode *meta_node;
GstBuffer *metabuffer;
/* FIXME : This is never freed. It is only assigned once. memleak ? */ /* FIXME : This is never freed. It is only assigned once. memleak ? */
GNode *moov_node_compressed; GNode *moov_node_compressed;
......
This diff is collapsed.
...@@ -91,6 +91,18 @@ gboolean qtdemux_dump_fLaC (GstQTDemux * qtdemux, GstByteReader * data, ...@@ -91,6 +91,18 @@ gboolean qtdemux_dump_fLaC (GstQTDemux * qtdemux, GstByteReader * data,
int depth); int depth);
gboolean qtdemux_dump_gmin (GstQTDemux * qtdemux, GstByteReader * data, gboolean qtdemux_dump_gmin (GstQTDemux * qtdemux, GstByteReader * data,
int depth); int depth);
gboolean qtdemux_dump_pitm (GstQTDemux * qtdemux, GstByteReader * data,
int depth);
gboolean qtdemux_dump_iloc (GstQTDemux * qtdemux, GstByteReader * data,
int depth);
gboolean qtdemux_dump_iinf (GstQTDemux * qtdemux, GstByteReader * data,
int depth);
gboolean qtdemux_dump_infe (GstQTDemux * qtdemux, GstByteReader * data,
int depth);
gboolean qtdemux_dump_ispe (GstQTDemux * qtdemux, GstByteReader * data,
int depth);
gboolean qtdemux_dump_ipma (GstQTDemux * qtdemux, GstByteReader * data,
int depth);
gboolean qtdemux_node_dump (GstQTDemux * qtdemux, GNode * node); gboolean qtdemux_node_dump (GstQTDemux * qtdemux, GNode * node);
......
...@@ -220,6 +220,15 @@ static const QtNodeType qt_node_types[] = { ...@@ -220,6 +220,15 @@ static const QtNodeType qt_node_types[] = {
{FOURCC_av1m, "AV1 Multi-Frame sample group entry", 0}, {FOURCC_av1m, "AV1 Multi-Frame sample group entry", 0},
{FOURCC_av1s, "AV1 S-Frame sample group entry", 0}, {FOURCC_av1s, "AV1 S-Frame sample group entry", 0},
{FOURCC_av1M, "AV1 Metadata sample group entry", 0}, {FOURCC_av1M, "AV1 Metadata sample group entry", 0},
{FOURCC_pitm, "primary item", 0, qtdemux_dump_pitm},
{FOURCC_iloc, "item location", 0, qtdemux_dump_iloc},
{FOURCC_iinf, "item information", 0, qtdemux_dump_iinf},
{FOURCC_infe, "item information entry", 0, qtdemux_dump_infe},
{FOURCC_iref, "item reference", 0},
{FOURCC_iprp, "item properties", QT_FLAG_CONTAINER},
{FOURCC_ipco, "item property container", QT_FLAG_CONTAINER},
{FOURCC_ispe, "item spatial extents", 0, qtdemux_dump_ispe},
{FOURCC_ipma, "item property association", 0, qtdemux_dump_ipma},
{0, "unknown", 0,}, {0, "unknown", 0,},
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment