FFmpeg
Data Structures | Functions | Variables
hls_sample_encryption.c File Reference
#include "libavutil/channel_layout.h"
#include "hls_sample_encryption.h"
#include "libavcodec/adts_header.h"
#include "libavcodec/adts_parser.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 58 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 89 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 149 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 169 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 197 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 229 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 265 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 295 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 328 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 338 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 357 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 383 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 56 of file hls_sample_encryption.c.

Referenced by ff_hls_senc_parse_audio_setup_info().