Commit 7d7e54ce authored by Alex Ashley's avatar Alex Ashley Committed by Tim-Philipp Müller

qtdemux: add support for ISOBMFF Common Encryption

This commit adds support for ISOBMFF Common Encryption (cenc), as
defined in ISO/IEC 23001-7. It uses a GstProtection event to
pass the contents of PSSH boxes to downstream decryptor elements
and attached GstProtectionMeta to each sample.

https://bugzilla.gnome.org/show_bug.cgi?id=705991
parent 9c5c16eb
......@@ -235,6 +235,8 @@ G_BEGIN_DECLS
#define FOURCC_apcs GST_MAKE_FOURCC('a','p','c','s')
#define FOURCC_m1v GST_MAKE_FOURCC('m','1','v',' ')
#define FOURCC_vivo GST_MAKE_FOURCC('v','i','v','o')
#define FOURCC_saiz GST_MAKE_FOURCC('s','a','i','z')
#define FOURCC_saio GST_MAKE_FOURCC('s','a','i','o')
#define FOURCC_3gg6 GST_MAKE_FOURCC('3','g','g','6')
#define FOURCC_3gg7 GST_MAKE_FOURCC('3','g','g','7')
......@@ -329,6 +331,21 @@ G_BEGIN_DECLS
#define FOURCC_svmi GST_MAKE_FOURCC('s','v','m','i')
#define FOURCC_scdi GST_MAKE_FOURCC('s','c','d','i')
/* Protected streams */
#define FOURCC_encv GST_MAKE_FOURCC('e','n','c','v')
#define FOURCC_enca GST_MAKE_FOURCC('e','n','c','a')
#define FOURCC_enct GST_MAKE_FOURCC('e','n','c','t')
#define FOURCC_encs GST_MAKE_FOURCC('e','n','c','s')
#define FOURCC_sinf GST_MAKE_FOURCC('s','i','n','f')
#define FOURCC_frma GST_MAKE_FOURCC('f','r','m','a')
#define FOURCC_schm GST_MAKE_FOURCC('s','c','h','m')
#define FOURCC_schi GST_MAKE_FOURCC('s','c','h','i')
/* Common Encryption */
#define FOURCC_pssh GST_MAKE_FOURCC('p','s','s','h')
#define FOURCC_tenc GST_MAKE_FOURCC('t','e','n','c')
#define FOURCC_cenc GST_MAKE_FOURCC('c','e','n','c')
G_END_DECLS
#endif /* __FOURCC_H__ */
This diff is collapsed.
......@@ -145,6 +145,10 @@ struct _GstQTDemux {
guint64 fragment_start_offset;
gint64 chapters_track_id;
/* protection support */
GPtrArray *protection_system_ids; /* Holds identifiers of all content protection systems for all tracks */
GQueue protection_event_queue; /* holds copy of upstream protection events */
};
struct _GstQTDemuxClass {
......
......@@ -189,6 +189,18 @@ static const QtNodeType qt_node_types[] = {
qtdemux_dump_svmi},
{FOURCC_scdi, "Stereoscopic Camera and Display Information", 0,
qtdemux_dump_unknown},
{FOURCC_saiz, "sample auxiliary information sizes", 0},
{FOURCC_saio, "sample auxiliary information offsets", 0},
{FOURCC_encv, "encrypted visual sample entry", 0},
{FOURCC_enca, "encrypted audio sample entry", 0},
{FOURCC_enct, "encrypted text sample entry", 0},
{FOURCC_encs, "encrypted system sample entry", 0},
{FOURCC_sinf, "protection scheme information", QT_FLAG_CONTAINER},
{FOURCC_frma, "original format", 0},
{FOURCC_schm, "scheme type", 0},
{FOURCC_schi, "scheme information", QT_FLAG_CONTAINER},
{FOURCC_pssh, "protection system specific header", 0},
{FOURCC_tenc, "track encryption", 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