From 6e68873d7f4076e3d659b83c2ea20fbfecc5e07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sat, 2 May 2020 02:20:44 +0200 Subject: [PATCH] qtdemux: Add 'aavd' and related fourcc codes for AAX encrypted audio The 'aavd' box is contained in the 'stsd' sample description. The 'aavd' box follows the layout of an 'mp4a' entry, i.e. it contains a single standard 'esds' extension box, and the two proprietary 'adrm' and 'aabd' extension boxes. Part-of: --- gst/isomp4/fourcc.h | 4 ++++ gst/isomp4/qtdemux.c | 1 + gst/isomp4/qtdemux_types.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h index 7952d8e3a0..89cefa1526 100644 --- a/gst/isomp4/fourcc.h +++ b/gst/isomp4/fourcc.h @@ -403,6 +403,10 @@ G_BEGIN_DECLS #define FOURCC_tenc GST_MAKE_FOURCC('t','e','n','c') #define FOURCC_cenc GST_MAKE_FOURCC('c','e','n','c') +/* Audible AAX encrypted audio */ +#define FOURCC_aavd GST_MAKE_FOURCC('a','a','v','d') +#define FOURCC_adrm GST_MAKE_FOURCC('a','d','r','m') + G_END_DECLS #endif /* __FOURCC_H__ */ diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 182d0bc06f..2929cb4a92 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -7856,6 +7856,7 @@ qtdemux_parse_node (GstQTDemux * qtdemux, GNode * node, const guint8 * buffer, case FOURCC_mp4a: case FOURCC_alac: case FOURCC_fLaC: + case FOURCC_aavd: { guint32 version; guint32 offset; diff --git a/gst/isomp4/qtdemux_types.c b/gst/isomp4/qtdemux_types.c index 9852429ba5..15ad3e5e8b 100644 --- a/gst/isomp4/qtdemux_types.c +++ b/gst/isomp4/qtdemux_types.c @@ -225,6 +225,8 @@ static const QtNodeType qt_node_types[] = { {FOURCC_av1m, "AV1 Multi-Frame sample group entry", 0}, {FOURCC_av1s, "AV1 S-Frame sample group entry", 0}, {FOURCC_av1M, "AV1 Metadata sample group entry", 0}, + {FOURCC_aavd, "AAX encrypted audio", 0}, + {FOURCC_adrm, "AAX DRM key data", 0}, {0, "unknown", 0,}, };