FFmpeg  4.1.9
Data Structures | Functions
encryption_info.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  AVSubsampleEncryptionInfo
 This file is part of FFmpeg. More...
 
struct  AVEncryptionInfo
 This describes encryption info for a packet. More...
 
struct  AVEncryptionInitInfo
 This describes info used to initialize an encryption key system. More...
 

Functions

AVEncryptionInfoav_encryption_info_alloc (uint32_t subsample_count, uint32_t key_id_size, uint32_t iv_size)
 Allocates an AVEncryptionInfo structure and sub-pointers to hold the given number of subsamples. More...
 
AVEncryptionInfoav_encryption_info_clone (const AVEncryptionInfo *info)
 Allocates an AVEncryptionInfo structure with a copy of the given data. More...
 
void av_encryption_info_free (AVEncryptionInfo *info)
 Frees the given encryption info object. More...
 
AVEncryptionInfoav_encryption_info_get_side_data (const uint8_t *side_data, size_t side_data_size)
 Creates a copy of the AVEncryptionInfo that is contained in the given side data. More...
 
uint8_t * av_encryption_info_add_side_data (const AVEncryptionInfo *info, size_t *side_data_size)
 Allocates and initializes side data that holds a copy of the given encryption info. More...
 
AVEncryptionInitInfoav_encryption_init_info_alloc (uint32_t system_id_size, uint32_t num_key_ids, uint32_t key_id_size, uint32_t data_size)
 Allocates an AVEncryptionInitInfo structure and sub-pointers to hold the given sizes. More...
 
void av_encryption_init_info_free (AVEncryptionInitInfo *info)
 Frees the given encryption init info object. More...
 
AVEncryptionInitInfoav_encryption_init_info_get_side_data (const uint8_t *side_data, size_t side_data_size)
 Creates a copy of the AVEncryptionInitInfo that is contained in the given side data. More...
 
uint8_t * av_encryption_init_info_add_side_data (const AVEncryptionInitInfo *info, size_t *side_data_size)
 Allocates and initializes side data that holds a copy of the given encryption init info. More...
 

Function Documentation

◆ av_encryption_info_alloc()

AVEncryptionInfo* av_encryption_info_alloc ( uint32_t  subsample_count,
uint32_t  key_id_size,
uint32_t  iv_size 
)

Allocates an AVEncryptionInfo structure and sub-pointers to hold the given number of subsamples.

This will allocate pointers for the key ID, IV, and subsample entries, set the size members, and zero-initialize the rest.

Parameters
subsample_countThe number of subsamples.
key_id_sizeThe number of bytes in the key ID, should be 16.
iv_sizeThe number of bytes in the IV, should be 16.
Returns
The new AVEncryptionInfo structure, or NULL on error.

◆ av_encryption_info_clone()

AVEncryptionInfo* av_encryption_info_clone (