FFmpeg
Data Structures | Functions | Variables
hls_sample_encryption.c File Reference
#include "libavutil/aes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "hls_sample_encryption.h"
#include "libavcodec/adts_header.h"
#include "libavcodec/adts_parser.h"
#include "libavcodec/ac3tab.h"
#include "libavcodec/ac3_parser_internal.h"

Go to the source code of this file.

Data Structures

struct  NALUnit
 
struct  AudioFrame
 
struct  CodecParserContext
 

Functions

void ff_hls_senc_read_audio_setup_info (HLSAudioSetupInfo *info, const uint8_t *buf, size_t size)
 
int ff_hls_senc_parse_audio_setup_info (AVStream *st, HLSAudioSetupInfo *info)
 
static void remove_scep_3_bytes (NALUnit *nalu)
 
static int get_next_nal_unit (CodecParserContext *ctx, NALUnit *nalu)
 
static int decrypt_nal_unit (HLSCryptoContext *crypto_ctx, NALUnit *nalu)
 
static int decrypt_video_frame (HLSCryptoContext *crypto_ctx, AVPacket *pkt)
 
static int get_next_adts_frame (CodecParserContext *ctx, AudioFrame *frame)
 
static int get_next_ac3_eac3_sync_frame (CodecParserContext *ctx, AudioFrame *frame)
 
static int get_next_sync_frame (enum AVCodecID codec_id, CodecParserContext *ctx, AudioFrame *frame)
 
static int decrypt_sync_frame (enum AVCodecID codec_id, HLSCryptoContext *crypto_ctx, AudioFrame *frame)
 
static int decrypt_audio_frame (enum AVCodecID codec_id, HLSCryptoContext *crypto_ctx, AVPacket *pkt)
 
int ff_hls_senc_decrypt_frame (enum AVCodecID codec_id, HLSCryptoContext *crypto_ctx, AVPacket *pkt)
 

Variables

static const int eac3_sample_rate_tab [] = { 48000, 44100, 32000, 0 }
 

Detailed Description

Apple HTTP Live Streaming Sample Encryption https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption

Definition in file hls_sample_encryption.c.

Function Documentation

◆ ff_hls_senc_read_audio_setup_info()

void ff_hls_senc_read_audio_setup_info ( HLSAudioSetupInfo info,
const uint8_t *  buf,
size_t  size 
)

Definition at line 61 of file hls_sample_encryption.c.

Referenced by parse_id3().

◆ ff_hls_senc_parse_audio_setup_info()

int ff_hls_senc_parse_audio_setup_info ( AVStream st,
HLSAudioSetupInfo info 
)

Definition at line 93 of file hls_sample_encryption.c.

Referenced by hls_read_header().

◆ remove_scep_3_bytes()

static void remove_scep_3_bytes ( NALUnit nalu)
static

Definition at line 154 of file hls_sample_encryption.c.

Referenced by decrypt_nal_unit().

◆ get_next_nal_unit()

static int get_next_nal_unit ( CodecParserContext ctx,
NALUnit nalu 
)
static

Definition at line 174 of file hls_sample_encryption.c.

Referenced by decrypt_video_frame().

◆ decrypt_nal_unit()

static int decrypt_nal_unit ( HLSCryptoContext crypto_ctx,
NALUnit nalu 
)
static

Definition at line 202 of file hls_sample_encryption.c.

Referenced by decrypt_video_frame().

◆ decrypt_video_frame()

static int decrypt_video_frame ( HLSCryptoContext crypto_ctx,
AVPacket pkt 
)
static

Definition at line 234 of file hls_sample_encryption.c.

Referenced by ff_hls_senc_decrypt_frame().

◆ get_next_adts_frame()

static int get_next_adts_frame ( CodecParserContext ctx,
AudioFrame frame 
)
static

Definition at line 270 of file hls_sample_encryption.c.

Referenced by get_next_sync_frame().

◆ get_next_ac3_eac3_sync_frame()

static int get_next_ac3_eac3_sync_frame ( CodecParserContext ctx,
AudioFrame frame 
)
static

Definition at line 300 of file hls_sample_encryption.c.

Referenced by get_next_sync_frame().

◆ get_next_sync_frame()

static int get_next_sync_frame ( enum AVCodecID  codec_id,
CodecParserContext ctx,
AudioFrame frame 
)
static

Definition at line 332 of file hls_sample_encryption.c.

Referenced by decrypt_audio_frame().

◆ decrypt_sync_frame()

static int decrypt_sync_frame ( enum AVCodecID  codec_id,
HLSCryptoContext crypto_ctx,
AudioFrame frame 
)
static

Definition at line 342 of file hls_sample_encryption.c.

Referenced by decrypt_audio_frame().

◆ decrypt_audio_frame()

static int decrypt_audio_frame ( enum AVCodecID  codec_id,
HLSCryptoContext crypto_ctx,
AVPacket pkt 
)
static

Definition at line 361 of file hls_sample_encryption.c.

Referenced by ff_hls_senc_decrypt_frame().

◆ ff_hls_senc_decrypt_frame()

int ff_hls_senc_decrypt_frame ( enum AVCodecID  codec_id,
HLSCryptoContext crypto_ctx,
AVPacket pkt 
)

Definition at line 387 of file hls_sample_encryption.c.

Referenced by hls_read_packet().

Variable Documentation

◆ eac3_sample_rate_tab

const int eac3_sample_rate_tab[] = { 48000, 44100, 32000, 0 }
static

Definition at line 59 of file hls_sample_encryption.c.

Referenced by ff_hls_senc_parse_audio_setup_info().