OpenJPEG  2.2.0
Data Structures | Typedefs | Functions
cache_manager.h File Reference
#include "metadata_manager.h"
#include "ihdrbox_manager.h"

Go to the source code of this file.

Data Structures

struct  cache_param
 cache parameters More...
 
struct  cachelist_param
 

Typedefs

typedef struct cache_param cache_param_t
 cache parameters More...
 
typedef struct cachelist_param cachelist_param_t
 

Functions

cachelist_param_tgene_cachelist (void)
 generate a cache list More...
 
void delete_cachelist (cachelist_param_t **cachelist)
 delete cache list More...
 
cache_param_tgene_cache (const char *targetname, int csn, char *tid, char *cid)
 generate a cache More...
 
void delete_cache (cache_param_t **cache)
 delete a cache More...
 
void insert_cache_into_list (cache_param_t *cache, cachelist_param_t *cachelist)
 insert a cache into list More...
 
cache_param_tsearch_cache (const char targetname[], cachelist_param_t *cachelist)
 search a cache by target name More...
 
cache_param_tsearch_cacheBycsn (int csn, cachelist_param_t *cachelist)
 search a cache by csn More...
 
cache_param_tsearch_cacheBycid (const char cid[], cachelist_param_t *cachelist)
 search a cache by cid More...
 
cache_param_tsearch_cacheBytid (const char tid[], cachelist_param_t *cachelist)
 search a cache by tid More...
 
void add_cachecid (const char *cid, cache_param_t *cache)
 add cid into a cache More...
 
void update_cachetid (const char *tid, cache_param_t *cache)
 update tid of a cache More...
 
void remove_cachecid (const char *cid, cachelist_param_t *cachelist)
 remove cid in cache More...
 
void print_cache (cache_param_t *cache)
 print cache parameters More...
 
void print_allcache (cachelist_param_t *cachelist)
 print all cache parameters More...
 

Typedef Documentation

typedef struct cache_param cache_param_t

cache parameters

cache list parameters

Function Documentation

void add_cachecid ( const char *  cid,
cache_param_t cache 
)

add cid into a cache

Parameters
[in]cidchannel identifier
[in]cachecache pointer

References cache_param::cid, and cache_param::numOfcid.

Referenced by handle_JPIPstreamMSG().

void delete_cache ( cache_param_t **  cache)

delete a cache

Parameters
[in]cacheaddress of the cache pointer

References delete_metadatalist().

Referenced by delete_cachelist().

void delete_cachelist ( cachelist_param_t **  cachelist)

delete cache list

Parameters
[in,out]cachelistaddress of the cache list pointer

References delete_cache(), and cache_param::next.

Referenced by terminate_dec_server().

cache_param_t* gene_cache ( const char *  targetname,
int  csn,
char *  tid,
char *  cid 
)

generate a cache

Parameters
[in]targetnametarget file name
[in]csncodestream number
[in]tidtarget identifier
[in]cidchannel identifier
Returns
pointer to the generated cache

References cache_param::cid, cache_param::csn, cache_param::filename, gene_metadatalist(), cache_param::ihdrbox, cache_param::metadatalist, cache_param::next, cache_param::numOfcid, and cache_param::tid.

Referenced by handle_JPIPstreamMSG().

cachelist_param_t* gene_cachelist ( void  )

generate a cache list

Returns
pointer to the generated cache list

References cachelist_param::first, and cachelist_param::last.

Referenced by init_dec_server().

void insert_cache_into_list ( cache_param_t cache,
cachelist_param_t cachelist 
)

insert a cache into list

Parameters
[in]cachecache pointer
[in]cachelistcache list pointer

References cachelist_param::first, cachelist_param::last, and cache_param::next.

Referenced by handle_JPIPstreamMSG().

void print_allcache ( cachelist_param_t cachelist)

print all cache parameters

Parameters
[in]cachelistcache list pointer

References cachelist_param::first, cache_param::next, and print_cache().

void print_cache ( cache_param_t cache)

print cache parameters

Parameters
[in]cachecache pointer

References cache_param::cid, cache_param::csn, cache_param::filename, cache_param::numOfcid, and cache_param::tid.

Referenced by print_allcache().

void remove_cachecid ( const char *  cid,
cachelist_param_t cachelist 
)

remove cid in cache

Parameters
[in]cidchannel identifier
[in]cachelistcachelist pointer

References remove_cidInCache(), and search_cacheBycid().

Referenced by handle_dstCIDreqMSG().

cache_param_t* search_cache ( const char  targetname[],
cachelist_param_t cachelist 
)

search a cache by target name

Parameters
[in]targetnametarget filename
[in]cachelistcache list pointer
Returns
found cache pointer

References cache_param::filename, cachelist_param::first, and cache_param::next.

Referenced by handle_CIDreqMSG(), handle_JPIPstreamMSG(), and handle_TIDreqMSG().

cache_param_t* search_cacheBycid ( const char  cid[],
cachelist_param_t cachelist 
)

search a cache by cid

Parameters
[in]cidchannel identifier
[in]cachelistcache list pointer
Returns
found cache pointer

References cache_param::cid, cachelist_param::first, cache_param::next, and cache_param::numOfcid.

Referenced by handle_JP2saveMSG(), handle_PNMreqMSG(), handle_SIZreqMSG(), handle_XMLreqMSG(), and remove_cachecid().

cache_param_t* search_cacheBycsn ( int  csn,
cachelist_param_t cachelist 
)

search a cache by csn

Parameters
[in]csncodestream number
[in]cachelistcache list pointer
Returns
found cache pointer

References cache_param::csn, cachelist_param::first, and cache_param::next.

Referenced by handle_JPIPstreamMSG().

cache_param_t* search_cacheBytid ( const char  tid[],
cachelist_param_t cachelist 
)

search a cache by tid

Parameters
[in]tidtarget identifier
[in]cachelistcache list pointer
Returns
found cache pointer

References cachelist_param::first, cache_param::next, and cache_param::tid.

Referenced by handle_PNMreqMSG(), and handle_SIZreqMSG().

void update_cachetid ( const char *  tid,
cache_param_t cache 
)

update tid of a cache

Parameters
[in]tidtarget identifier
[in]cachecache pointer

References cache_param::filename, and cache_param::tid.

Referenced by handle_JPIPstreamMSG().