Handles Aamp Cahe operations.
More...
#include <AampCacheHandler.h>
|
|
| AampCacheHandler (AampLogManager *logObj) |
| | Default Constructor.
|
| |
|
| ~AampCacheHandler () |
| | Destructor Function.
|
| |
| void | StartPlaylistCache () |
| | Start playlist caching. More...
|
| |
| void | StopPlaylistCache () |
| | Stop playlist caching. More...
|
| |
| void | InsertToPlaylistCache (const std::string url, const GrowableBuffer *buffer, std::string effectiveUrl, bool trackLiveStatus, MediaType fileType=eMEDIATYPE_DEFAULT) |
| | Retrieve playlist from cache
More...
|
| |
| bool | RetrieveFromPlaylistCache (const std::string url, GrowableBuffer *buffer, std::string &effectiveUrl) |
| | Retrieve playlist from cache. More...
|
| |
| void | RemoveFromPlaylistCache (const std::string url) |
| | Remove specific playlist cache. More...
|
| |
| void | SetMaxPlaylistCacheSize (int maxPlaylistCacheSz) |
| | SetMaxPlaylistCacheSize - Set Max Cache Size. More...
|
| |
|
int | GetMaxPlaylistCacheSize () |
| |
| bool | IsUrlCached (std::string) |
| | IsUrlCached - Check if URL is already cached. More...
|
| |
| void | InsertToInitFragCache (const std::string url, const GrowableBuffer *buffer, std::string effectiveUrl, MediaType fileType) |
| | Insert init fragment into cache table. More...
|
| |
| bool | RetrieveFromInitFragCache (const std::string url, GrowableBuffer *buffer, std::string &effectiveUrl) |
| | Retrieve init fragment from cache. More...
|
| |
| void | SetMaxInitFragCacheSize (int maxInitFragCacheSz) |
| | SetMaxInitFragCacheSize - Set Max Cache Size. More...
|
| |
| int | GetMaxInitFragCacheSize () |
| | GetMaxPlaylistCacheSize - Get present CacheSize. More...
|
| |
| | AampCacheHandler (const AampCacheHandler &)=delete |
| | Copy constructor disabled. More...
|
| |
| AampCacheHandler & | operator= (const AampCacheHandler &)=delete |
| | assignment operator disabled More...
|
| |
|
|
PlaylistCache | mPlaylistCache |
| |
|
int | mCacheStoredSize |
| |
|
bool | mInitialized |
| |
|
bool | mCacheActive |
| |
|
bool | mAsyncCacheCleanUpThread |
| |
|
bool | mAsyncThreadStartedFlag |
| |
|
int | mMaxPlaylistCacheSize |
| |
|
pthread_mutex_t | mMutex |
| |
|
pthread_mutex_t | mCondVarMutex |
| |
|
pthread_cond_t | mCondVar |
| |
|
pthread_t | mAsyncCleanUpTaskThreadId |
| |
|
AampLogManager * | mLogObj |
| |
|
InitFragCache | umInitFragCache |
| |
|
CacheTrackQueue | umCacheTrackQ |
| |
|
pthread_mutex_t | mInitFragMutex |
| |
|
bool | bInitFragCache |
| |
| int | MaxInitCacheSlot |
| |
Handles Aamp Cahe operations.
Definition at line 110 of file AampCacheHandler.h.
◆ AampCacheHandler()
Copy constructor disabled.
◆ AsyncCacheCleanUpTask()
| AampCacheHandler::AsyncCacheCleanUpTask |
( |
| ) |
|
|
private |
◆ AampCacheThreadFunction()
| static void* AampCacheHandler::AampCacheThreadFunction |
( |
void * |
This | ) |
|
|
inlinestaticprivate |
◆ ClearPlaylistCache()
| AampCacheHandler::ClearPlaylistCache |
( |
| ) |
|
|
private |
◆ AllocatePlaylistCacheSlot()
| AampCacheHandler::AllocatePlaylistCacheSlot |
( |
MediaType |
fileType, |
|
|
size_t |
newLen |
|
) |
| |
|
private |
AllocatePlaylistCacheSlot Allocate Slot for adding new playlist.
- Parameters
-
| [in] | fileType | - Indicate the type of playlist to store/remove |
| [in] | newLen | - Size required to store new playlist |
- Returns
- bool Success or Failure
Definition at line 189 of file AampCacheHandler.cpp.
◆ ClearInitFragCache()
| AampCacheHandler::ClearInitFragCache |
( |
| ) |
|
|
private |
◆ RemoveInitFragCacheEntry()
| AampCacheHandler::RemoveInitFragCacheEntry |
( |
MediaType |
fileType | ) |
|
|
private |
Removes very first inserted entry ( and duplicate entry, if present) of given filetype from fragment cache table in FIFO order, also removes the corresponding url from track queue.
- Parameters
-
| fileType | type of file format to be removed from cache table |
- Returns
- void
Definition at line 538 of file AampCacheHandler.cpp.
◆ StartPlaylistCache()
| void AampCacheHandler::StartPlaylistCache |
( |
| ) |
|
◆ StopPlaylistCache()
| void AampCacheHandler::StopPlaylistCache |
( |
| ) |
|
◆ InsertToPlaylistCache()
Retrieve playlist from cache
- Parameters
-
| [in] | url | - URL |
| [in] | buffer | - Pointer to growable buffer |
| [in] | effectiveUrl | - Final URL |
| [in] | trackLiveStatus | - Live Status of the track inserted |
| [in] | fileType | - Type of the file inserted |
- Returns
- void
Definition at line 31 of file AampCacheHandler.cpp.
◆ RetrieveFromPlaylistCache()
| bool AampCacheHandler::RetrieveFromPlaylistCache |
( |
const std::string |
url, |
|
|
GrowableBuffer * |
buffer, |
|
|
std::string & |
effectiveUrl |
|
) |
| |
Retrieve playlist from cache.
- Parameters
-
| [in] | url | - URL |
| [out] | buffer | - Pointer to growable buffer |
| [out] | effectiveUrl | - Final URL |
- Returns
- true: found, false: not found
Definition at line 111 of file AampCacheHandler.cpp.
◆ RemoveFromPlaylistCache()
| void AampCacheHandler::RemoveFromPlaylistCache |
( |
const std::string |
url | ) |
|
◆ SetMaxPlaylistCacheSize()
| void AampCacheHandler::SetMaxPlaylistCacheSize |
( |
int |
maxPlaylistCacheSz | ) |
|
SetMaxPlaylistCacheSize - Set Max Cache Size.
- Parameters
-
| [in] | maxPlaylistCacheSz | - CacheSize |
- Returns
- None
Definition at line 396 of file AampCacheHandler.cpp.
◆ IsUrlCached()
| bool AampCacheHandler::IsUrlCached |
( |
std::string |
url | ) |
|
IsUrlCached - Check if URL is already cached.
- Returns
- bool - true if file found, else false
Definition at line 407 of file AampCacheHandler.cpp.
◆ InsertToInitFragCache()
| AampCacheHandler::InsertToInitFragCache |
( |
const std::string |
url, |
|
|
const GrowableBuffer * |
buffer, |
|
|
std::string |
effectiveUrl, |
|
|
MediaType |
fileType |
|
) |
| |
Insert init fragment into cache table.
- Parameters
-
| [in] | url | - URL |
| [in] | buffer | - Pointer to growable buffer |
| [in] | effectiveUrl | - Final URL |
| [in] | fileType | - Type of the file inserted |
- Returns
- void
Definition at line 423 of file AampCacheHandler.cpp.
◆ RetrieveFromInitFragCache()
| AampCacheHandler::RetrieveFromInitFragCache |
( |
const std::string |
url, |
|
|
GrowableBuffer * |
buffer, |
|
|
std::string & |
effectiveUrl |
|
) |
| |
Retrieve init fragment from cache.
- Parameters
-
| [in] | url | - URL |
| [out] | buffer | - Pointer to growable buffer |
| [out] | effectiveUrl | - Final URL |
- Returns
- true: found, false: not found
Definition at line 506 of file AampCacheHandler.cpp.
◆ SetMaxInitFragCacheSize()
| void AampCacheHandler::SetMaxInitFragCacheSize |
( |
int |
maxInitFragCacheSz | ) |
|
SetMaxInitFragCacheSize - Set Max Cache Size.
- Parameters
-
| [in] | maxInitFragCacheSz | - CacheSize |
- Returns
- None
Definition at line 618 of file AampCacheHandler.cpp.
◆ GetMaxInitFragCacheSize()
| int AampCacheHandler::GetMaxInitFragCacheSize |
( |
| ) |
|
|
inline |
GetMaxPlaylistCacheSize - Get present CacheSize.
- Returns
- int - maxCacheSize
Definition at line 303 of file AampCacheHandler.h.
◆ operator=()
assignment operator disabled
◆ MaxInitCacheSlot
| int AampCacheHandler::MaxInitCacheSlot |
|
private |
The documentation for this class was generated from the following files: