MythTV  master
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
MythCodecMap Class Reference

MythCodecMap Utility class that keeps pointers to an AVStream and its AVCodecContext. More...

#include <mythavutil.h>

Public Member Functions

 MythCodecMap ()
 ~MythCodecMap ()
AVCodecContext * getCodecContext (const AVStream *, const AVCodec *pCodec=nullptr, bool nullCodec=false)
AVCodecContext * hasCodecContext (const AVStream *)
void freeCodecContext (const AVStream *)
void freeAllCodecContexts ()

Static Public Member Functions

static MythCodecMapgetInstance ()

Protected Attributes

QMap< const AVStream *, AVCodecContext * > streamMap
QMutex mapLock

Detailed Description

MythCodecMap Utility class that keeps pointers to an AVStream and its AVCodecContext.

The codec member of AVStream was previously used for this but is now deprecated.

This is a singeton class - only 1 instance gets created.

Definition at line 88 of file mythavutil.h.

Constructor & Destructor Documentation

◆ MythCodecMap()

MythCodecMap::MythCodecMap ( )

Definition at line 382 of file mythavutil.cpp.

◆ ~MythCodecMap()

MythCodecMap::~MythCodecMap ( )

Definition at line 386 of file mythavutil.cpp.

Member Function Documentation

◆ getInstance()

static MythCodecMap* MythCodecMap::getInstance ( )

◆ getCodecContext()

AVCodecContext * MythCodecMap::getCodecContext ( const AVStream *  stream,
const AVCodec *  pCodec = nullptr,
bool  nullCodec = false 

◆ hasCodecContext()

AVCodecContext * MythCodecMap::hasCodecContext ( const AVStream *  stream)

◆ freeCodecContext()

void MythCodecMap::freeCodecContext ( const AVStream *  stream)

◆ freeAllCodecContexts()

void MythCodecMap::freeAllCodecContexts ( )

Definition at line 438 of file mythavutil.cpp.

Referenced by ~MythCodecMap().

Member Data Documentation

◆ streamMap

QMap<const AVStream*, AVCodecContext*> MythCodecMap::streamMap

◆ mapLock

QMutex MythCodecMap::mapLock

Definition at line 101 of file mythavutil.h.

Referenced by freeAllCodecContexts(), freeCodecContext(), and getCodecContext().

The documentation for this class was generated from the following files: