MythTV master
Classes | Typedefs | Functions | Variables
pespacket.cpp File Reference
#include "libmythbase/mythlogging.h"
#include "libmythbase/sizetliteral.h"
#include "pespacket.h"
#include "mpegtables.h"
#include "libmythbase/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.

Classes

class  groupof188s
 
class  groupof4096s
 

Typedefs

using block188 = std::array< uint8_t, 188_UZ >
 
using block4096 = std::array< uint8_t, 4096_UZ >
 

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 constexpr size_t BLOCKS188 { 512 }
 
static constexpr size_t BLOCKS4096 { 128 }
 
static std::vector< groupof188s * > mem188
 
static std::vector< unsigned char * > free188
 
static std::map< unsigned char *, bool > alloc188
 
static std::vector< groupof4096s * > mem4096
 
static std::vector< unsigned char * > free4096
 
static std::map< unsigned char *, bool > alloc4096
 
static QMutex pes_alloc_mutex
 

Typedef Documentation

◆ block188

using block188 = std::array<uint8_t, 188_UZ>

Definition at line 257 of file pespacket.cpp.

◆ block4096

using block4096 = std::array<uint8_t, 4096_UZ>

Definition at line 267 of file pespacket.cpp.

Function Documentation

◆ get_188_block()

static unsigned char * get_188_block ( )
static

Definition at line 286 of file pespacket.cpp.

Referenced by pes_alloc().

◆ get_4096_block()

static unsigned char * get_4096_block ( )
static

Definition at line 324 of file pespacket.cpp.

Referenced by pes_alloc().

◆ is_188_block()

static bool is_188_block ( unsigned char *  ptr)
static

Definition at line 302 of file pespacket.cpp.

Referenced by pes_free().

◆ is_4096_block()

static bool is_4096_block ( unsigned char *  ptr)
static

Definition at line 340 of file pespacket.cpp.

Referenced by pes_free().

◆ pes_alloc()

unsigned char * pes_alloc ( uint  size)

◆ pes_free()

void pes_free ( unsigned char *  ptr)

◆ return_188_block()

static void return_188_block ( unsigned char *  ptr)
static

Definition at line 307 of file pespacket.cpp.

Referenced by pes_free().

◆ return_4096_block()

static void return_4096_block ( unsigned char *  ptr)
static

Definition at line 345 of file pespacket.cpp.

Referenced by pes_free().

Variable Documentation

◆ alloc188

std::map<unsigned char*, bool> alloc188
static

Definition at line 279 of file pespacket.cpp.

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

◆ alloc4096

std::map<unsigned char*, bool> alloc4096
static

Definition at line 283 of file pespacket.cpp.

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

◆ BLOCKS188

constexpr size_t BLOCKS188 { 512 }
staticconstexpr

Definition at line 256 of file pespacket.cpp.

Referenced by get_188_block().

◆ BLOCKS4096

constexpr size_t BLOCKS4096 { 128 }
staticconstexpr

Definition at line 266 of file pespacket.cpp.

Referenced by get_4096_block().

◆ free188

std::vector<unsigned char*> free188
static

Definition at line 278 of file pespacket.cpp.

Referenced by get_188_block(), and return_188_block().

◆ free4096

std::vector<unsigned char*> free4096
static

Definition at line 282 of file pespacket.cpp.

Referenced by get_4096_block(), and return_4096_block().

◆ mem188

std::vector<groupof188s*> mem188
static

Definition at line 277 of file pespacket.cpp.

Referenced by get_188_block(), and return_188_block().

◆ mem4096

std::vector<groupof4096s*> mem4096
static

Definition at line 281 of file pespacket.cpp.

Referenced by get_4096_block(), and return_4096_block().

◆ pes_alloc_mutex

QMutex pes_alloc_mutex
static

Definition at line 382 of file pespacket.cpp.

Referenced by pes_alloc(), and pes_free().