• Yacine Bandou's avatar
    matroska: Add the WebM encrypted content support in matroskademux · 04328269
    Yacine Bandou authored
    This commit:
    
    1. Reads the WebM and Matroska ContentEncryption subelements.
    
    2. Creates a GST_PROTECTION event for each ContentEncryption, which
       will be sent before pushing the first source buffer.
       The DRM system id field in this event is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID,
       because it isn't specified neither by Matroska nor by the WebM spec.
    
    3. Reads the protection information of encrypted Block/SimpleBlock and
       extracts the IV and the partitioning format (subsamples).
    
    4. Creates the metadata protection for each encrypted Block/SimpleBlock,
       with those informations: KeyID (extracted from ContentEncryption element),
       IV and partitioning format.
    
    5. Adds a new caps for WebM encrypted content named "application/x-webm-enc",
       with the following new fields:
    
       "encryption-algorithm": The encryption algorithm used.
                               values: "None", "DES", "3DES", "Twofish", "Blowfish", "AES".
    
       "encoding-scope": The field that describes which Elements have been modified.
                         Values: "frame", "codec-data", "next-content".
    
       "cipher-mode": The cipher mode used in the encryption.
                      Values: "None", "CTR".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765275
    04328269
matroska-read-common.h 6.57 KB