[vlc-devel] Append metadata to block_t
Vladimir Davydov
davydov.vladimir at gmail.com
Fri Jul 13 13:44:47 CEST 2018
Hello dear VLC developers,
I'm trying to implement playback of DASH streams protected by Widevine DRM on
Android.
I have added Sample Encryption Box ('senc') parsing to MP4 demuxer module.
So, after parsing, I have some encryption info (AES Initial Vector and etc)
for each media sample.
I need to somehow pass this crypto info to mediacodec module with media sample
data.
Original implementation sends media sample in block_t structure. This
structure has some metadata like i_flags but doesn't have any special storage
for more big metadata like Initial Vectors.
I have analyzed the code of other modules but didn't find good solution.
What is the usual way to resolve problem like this?
One of the ways I see is to append metadata at the begin of p_buffer (before
media sample payload) and set some new flag to i_flags. But it requires
adding of new global flag like BLOCK_FLAG_CENC_ENCRYPTED.
Something like adding to vlc_block.h :
#define BLOCK_FLAG_CENC_ENCRYPTED 0x4000
That is not good because flags range is pretty limited.
Do you have any better ideas to implement it?
Best regards,
Vladimir
More information about the vlc-devel
mailing list