MythTV  master
Macros | Functions | Variables
pespacket.cpp File Reference
#include "mythlogging.h"
#include "pespacket.h"
#include "mpegtables.h"
#include "mythconfig.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/crc.h"
#include "libavutil/bswap.h"
#include <vector>
#include <map>
Include dependency graph for pespacket.cpp:

Go to the source code of this file.

Macros

#define INCR_CC(_CC_)   do { (_CC_) = ((_CC_) + 1) & 0xf; } while (false)
 
#define BLOCKS188   512
 
#define BLOCKS4096   128
 

Functions

static unsigned char * get_188_block ()
 
static bool is_188_block (unsigned char *ptr)
 
static void return_188_block (unsigned char *ptr)
 
static unsigned char * get_4096_block ()
 
static bool is_4096_block (unsigned char *ptr)
 
static void return_4096_block (unsigned char *ptr)
 
unsigned char * pes_alloc (uint size)
 
void pes_free (unsigned char *ptr)
 

Variables

static vector< unsigned char * > mem188
 
static vector< unsigned char * > free188
 
static map< unsigned char *, boolalloc188
 
static vector< unsigned char * > mem4096
 
static vector< unsigned char * > free4096
 
static map< unsigned char *, boolalloc4096
 
static QMutex pes_alloc_mutex
 

Macro Definition Documentation

◆ INCR_CC

#define INCR_CC (   _CC_)    do { (_CC_) = ((_CC_) + 1) & 0xf; } while (false)

◆ BLOCKS188

#define BLOCKS188   512

Definition at line 224 of file pespacket.cpp.

◆ BLOCKS4096

#define BLOCKS4096   128

Definition at line 266 of file pespacket.cpp.

Function Documentation

◆ get_188_block()

static unsigned char* get_188_block ( )
static

Definition at line 225 of file pespacket.cpp.

Referenced by pes_alloc().

◆ is_188_block()

static bool is_188_block ( unsigned char *  ptr)
static

Definition at line 243 of file pespacket.cpp.

Referenced by pes_free().

◆ return_188_block()

static void return_188_block ( unsigned char *  ptr)
static

Definition at line 248 of file pespacket.cpp.

Referenced by pes_free().

◆ get_4096_block()

static unsigned char* get_4096_block ( )
static

Definition at line 267 of file pespacket.cpp.

Referenced by pes_alloc().

◆ is_4096_block()

static bool is_4096_block ( unsigned char *  ptr)
static

Definition at line 285 of file pespacket.cpp.

Referenced by pes_free().

◆ return_4096_block()

static void return_4096_block ( unsigned char *  ptr)
static

Definition at line 290 of file pespacket.cpp.

Referenced by pes_free().

◆ pes_alloc()

unsigned char* pes_alloc ( uint  size)

◆ pes_free()

void pes_free ( unsigned char *  ptr)

Variable Documentation

◆ mem188

vector<unsigned char*> mem188
static

Definition at line 216 of file pespacket.cpp.

Referenced by get_188_block(), and return_188_block().

◆ free188

vector<unsigned char*> free188
static

Definition at line 217 of file pespacket.cpp.

Referenced by get_188_block(), and return_188_block().

◆ alloc188

map<unsigned char*, bool> alloc188
static

Definition at line 218 of file pespacket.cpp.

Referenced by get_188_block(), is_188_block(), and return_188_block().

◆ mem4096

vector<unsigned char*> mem4096
static

Definition at line 220 of file pespacket.cpp.

Referenced by get_4096_block(), and return_4096_block().

◆ free4096

vector<unsigned char*> free4096
static

Definition at line 221 of file pespacket.cpp.

Referenced by get_4096_block(), and return_4096_block().

◆ alloc4096

map<unsigned char*, bool> alloc4096
static

Definition at line 222 of file pespacket.cpp.

Referenced by get_4096_block(), is_4096_block(), and return_4096_block().

◆ pes_alloc_mutex

QMutex pes_alloc_mutex
static

Definition at line 328 of file pespacket.cpp.

Referenced by pes_alloc(), and pes_free().