RDK Documentation (Open Sourced RDK Components)
fragmentcollector_hls.h File Reference

This file handles HLS Streaming functionality for AAMP player
More...

#include <memory>
#include "StreamAbstractionAAMP.h"
#include "mediaprocessor.h"
#include <sys/time.h>
#include "HlsDrmBase.h"
Include dependency graph for fragmentcollector_hls.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HlsProtectionInfo
 HlsStreamInfo structure for stream related information. More...
 
struct  HlsStreamInfo
 HlsStreamInfo structure for stream related information. More...
 
struct  MediaInfo
 MediaInfo structure for Media related information. More...
 
struct  IndexNode
 IndexNode structure for Node/DRM Index. More...
 
struct  KeyTagStruct
 KeyTagStruct structure to store all Keytags with Hash. More...
 
struct  DiscontinuityIndexNode
 Index Node structure for Discontinuity Index. More...
 
class  TrackState
 State Machine for each Media Track. More...
 
class  StreamAbstractionAAMP_HLS
 HLS Stream handler class. More...
 

Macros

#define MAX_PROFILE   128
 
#define FOG_FRAG_BW_IDENTIFIER   "bandwidth-"
 
#define FOG_FRAG_BW_IDENTIFIER_LEN   10
 
#define FOG_FRAG_BW_DELIMITER   "-"
 
#define CHAR_CR   0x0d
 
#define CHAR_LF   0x0a
 
#define BOOLSTR(boolValue)   (boolValue?"true":"false")
 
#define PLAYLIST_TIME_DIFF_THRESHOLD_SECONDS   (0.1f)
 
#define MAX_MANIFEST_DOWNLOAD_RETRY   3
 
#define MAX_DELAY_BETWEEN_PLAYLIST_UPDATE_MS   (6*1000)
 
#define MIN_DELAY_BETWEEN_PLAYLIST_UPDATE_MS   (500)
 
#define DRM_IV_LEN   16
 
#define MAX_SEQ_NUMBER_LAG_COUNT   50
 
#define MAX_SEQ_NUMBER_DIFF_FOR_SEQ_NUM_BASED_SYNC   2
 
#define MAX_PLAYLIST_REFRESH_FOR_DISCONTINUITY_CHECK_EVENT   5
 
#define MAX_PLAYLIST_REFRESH_FOR_DISCONTINUITY_CHECK_LIVE   3
 
#define MAX_PDT_DISCONTINUITIY_DELTA_LIMIT   1.0f
 

Typedefs

typedef struct HlsProtectionInfo HlsProtectionInfo
 
typedef HlsStreamInfo HlsStreamInfo
 
typedef struct MediaInfo MediaInfo
 

Enumerations

enum  DrmKeyMethod
 Enum for various EXT-X-KEY:METHOD= values. More...
 

yes

This file handles HLS Streaming functionality for AAMP player

DESCRIPTION

This file handles HLS Streaming functionality for AAMP player. Class/structures required for hls fragment collector is defined here.
Major functionalities include a) Manifest / fragment collector and trick play handling b) DRM Initialization / Key acquisition c) Decrypt and inject fragments for playback d) Synchronize audio/video tracks .

Definition in file fragmentcollector_hls.h.


Data Structure Documentation

◆ HlsProtectionInfo

struct HlsProtectionInfo

HlsStreamInfo structure for stream related information.

Definition at line 69 of file fragmentcollector_hls.h.

Collaboration diagram for HlsProtectionInfo:
Collaboration graph
Data Fields
struct DrmSessionParams * drmData

Session data

HlsProtectionInfo * next

pointer to access next element of Queue

◆ MediaInfo

struct MediaInfo

MediaInfo structure for Media related information.

Definition at line 97 of file fragmentcollector_hls.h.

Collaboration diagram for MediaInfo:
Collaboration graph
Data Fields
MediaType type

Media Type

const char * group_id

Group ID

const char * name

Name of Media

const char * language

Language

bool autoselect

AutoSelect

bool isDefault

IsDefault

const char * uri

URI Information

StreamOutputFormat audioFormat

Audio codec format

int channels

Channel

const char * instreamID

StreamID

bool forced

Forced Flag

const char * characteristics

Characteristics

bool isCC

True if the text track is closed-captions

◆ IndexNode

struct IndexNode

IndexNode structure for Node/DRM Index.

Definition at line 119 of file fragmentcollector_hls.h.

Collaboration diagram for IndexNode:
Collaboration graph
Data Fields
double completionTimeSecondsFromStart

Time of index from start

const char * pFragmentInfo

Fragment Information pointer

int drmMetadataIdx

DRM Index for Fragment

const char * initFragmentPtr

Fragmented MP4 specific pointer to associated (preceding) initialization fragment

◆ DiscontinuityIndexNode

struct DiscontinuityIndexNode

Index Node structure for Discontinuity Index.

Definition at line 145 of file fragmentcollector_hls.h.

Collaboration diagram for DiscontinuityIndexNode:
Collaboration graph
Data Fields
int fragmentIdx

Idx of fragment in index table

double position

Time of index from start

double fragmentDuration

Fragment duration of current discontinuity index

double discontinuityPDT

Program Date time value

Macro Definition Documentation

◆ MAX_SEQ_NUMBER_LAG_COUNT

#define MAX_SEQ_NUMBER_LAG_COUNT   50

Configured sequence number max count to avoid continuous looping for an edge case scenario, which leads crash due to hung

Definition at line 57 of file fragmentcollector_hls.h.

◆ MAX_SEQ_NUMBER_DIFF_FOR_SEQ_NUM_BASED_SYNC

#define MAX_SEQ_NUMBER_DIFF_FOR_SEQ_NUM_BASED_SYNC   2

Maximum difference in sequence number to sync tracks using sequence number.

Definition at line 58 of file fragmentcollector_hls.h.

◆ MAX_PLAYLIST_REFRESH_FOR_DISCONTINUITY_CHECK_EVENT

#define MAX_PLAYLIST_REFRESH_FOR_DISCONTINUITY_CHECK_EVENT   5

Maximum playlist refresh count for discontinuity check for TSB/cDvr

Definition at line 59 of file fragmentcollector_hls.h.

◆ MAX_PLAYLIST_REFRESH_FOR_DISCONTINUITY_CHECK_LIVE

#define MAX_PLAYLIST_REFRESH_FOR_DISCONTINUITY_CHECK_LIVE   3

Maximum playlist refresh count for discontinuity check for live without TSB

Definition at line 60 of file fragmentcollector_hls.h.

◆ MAX_PDT_DISCONTINUITIY_DELTA_LIMIT

#define MAX_PDT_DISCONTINUITIY_DELTA_LIMIT   1.0f

maximum audio/video track PDT delta to determine discontiuity using PDT

Definition at line 61 of file fragmentcollector_hls.h.

Enumeration Type Documentation

◆ DrmKeyMethod

Enum for various EXT-X-KEY:METHOD= values.

Enumerator
eDRM_KEY_METHOD_NONE 

DRM key is none

eDRM_KEY_METHOD_AES_128 

DRM key is AES 128 Method

eDRM_KEY_METHOD_SAMPLE_AES 

DRM key is Sample AES method

eDRM_KEY_METHOD_SAMPLE_AES_CTR 

DRM key is Sample AES CTR method

eDRM_KEY_METHOD_UNKNOWN 

DRM key is unkown method

Definition at line 157 of file fragmentcollector_hls.h.