MythTV  master
Macros | Functions | Variables
avformatdecoder.cpp File Reference
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
#include <iostream>
#include <unistd.h>
#include <QTextCodec>
#include <QFileInfo>
#include "mythtvexp.h"
#include "mythconfig.h"
#include "avformatdecoder.h"
#include "privatedecoder.h"
#include "audiooutput.h"
#include "audiooutpututil.h"
#include "ringbuffer.h"
#include "mythplayer.h"
#include "remoteencoder.h"
#include "programinfo.h"
#include "mythcorecontext.h"
#include "mythdbcon.h"
#include "iso639.h"
#include "mpegtables.h"
#include "atscdescriptors.h"
#include "dvbdescriptors.h"
#include "cc608decoder.h"
#include "cc708decoder.h"
#include "teletextdecoder.h"
#include "subtitlereader.h"
#include "interactivetv.h"
#include "videodisplayprofile.h"
#include "mythuihelper.h"
#include "DVD/dvdringbuffer.h"
#include "Bluray/bdringbuffer.h"
#include "mythavutil.h"
#include "lcddevice.h"
#include "libavutil/avutil.h"
#include "libavutil/error.h"
#include "libavutil/log.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavformat/internal.h"
#include "libswscale/swscale.h"
#include "libavformat/isom.h"
#include "ivtv_myth.h"
#include "libavutil/imgutils.h"
#include "libavutil/display.h"
Include dependency graph for avformatdecoder.cpp:

Go to the source code of this file.

Macros

#define LOC   QString("AFD: ")
 
#define SEQ_PKT_ERR_MAX   50
 
#define FAIL(errmsg)
 
#define SEQ_START   0x000001b3
 
#define GOP_START   0x000001b8
 
#define PICTURE_START   0x00000100
 
#define SLICE_MIN   0x00000101
 
#define SLICE_MAX   0x000001af
 
#define SEQ_END_CODE   0x000001b7
 

Functions

static int cc608_parity (uint8_t byte)
 
static int cc608_good_parity (const int *parity_table, uint16_t data)
 
static void cc608_build_parity_table (int *parity_table)
 
static QSize get_video_dim (const AVCodecContext &ctx)
 
static float get_aspect (const AVCodecContext &ctx)
 
static float get_aspect (H264Parser &p)
 
int get_avf_buffer (struct AVCodecContext *c, AVFrame *pic, int flags)
 
int get_avf_buffer_dxva2 (struct AVCodecContext *c, AVFrame *pic, int flags)
 
static bool StreamHasRequiredParameters (AVStream *Stream)
 
static void myth_av_log (void *ptr, int level, const char *fmt, va_list vl)
 
static int get_canonical_lang (const char *lang_cstr)
 
static int64_t lsb3full (int64_t lsb, int64_t base_ts, int lsb_bits)
 
void HandleStreamChange (void *data)
 
static enum AVPixelFormat get_format_dxva2 (struct AVCodecContext *, const enum AVPixelFormat *)
 
static vector< int > filter_lang (const sinfo_vec_t &tracks, int lang_key, const vector< int > &ftype)
 
static vector< int > filter_type (const sinfo_vec_t &tracks, AudioTrackType type)
 
static void extract_mono_channel (uint channel, AudioInfo *audioInfo, char *buffer, int bufsize)
 

Variables

static const int max_video_queue_size = 220
 
static bool silence_ffmpeg_logging = false
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("AFD: ")

Definition at line 81 of file avformatdecoder.cpp.

◆ SEQ_PKT_ERR_MAX

#define SEQ_PKT_ERR_MAX   50

Definition at line 90 of file avformatdecoder.cpp.

◆ FAIL

#define FAIL (   errmsg)
Value:
do { \
LOG(VB_PLAYBACK, LOG_INFO, LOC + (errmsg)); \
return false; \
} while (false)
#define LOC

Definition at line 172 of file avformatdecoder.cpp.

◆ SEQ_START

#define SEQ_START   0x000001b3

Definition at line 3029 of file avformatdecoder.cpp.

◆ GOP_START

#define GOP_START   0x000001b8

Definition at line 3030 of file avformatdecoder.cpp.

◆ PICTURE_START

#define PICTURE_START   0x00000100

Definition at line 3031 of file avformatdecoder.cpp.

◆ SLICE_MIN

#define SLICE_MIN   0x00000101

Definition at line 3032 of file avformatdecoder.cpp.

◆ SLICE_MAX

#define SLICE_MAX   0x000001af

Definition at line 3033 of file avformatdecoder.cpp.

◆ SEQ_END_CODE

#define SEQ_END_CODE   0x000001b7

Definition at line 3034 of file avformatdecoder.cpp.

Function Documentation

◆ cc608_parity()

static int cc608_parity ( uint8_t  byte)
static

Definition at line 1564 of file avformatdecoder.cpp.

Referenced by cc608_build_parity_table().

◆ cc608_good_parity()

static int cc608_good_parity ( const int *  parity_table,
uint16_t  data 
)
static

◆ cc608_build_parity_table()

static void cc608_build_parity_table ( int *  parity_table)
static

Definition at line 1580 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::AvFormatDecoder().

◆ get_video_dim()

static QSize get_video_dim ( const AVCodecContext &  ctx)
static

◆ get_aspect() [1/2]

static float get_aspect ( const AVCodecContext &  ctx)
static

◆ get_aspect() [2/2]

static float get_aspect ( H264Parser p)
static

Definition at line 125 of file avformatdecoder.cpp.

◆ get_avf_buffer()

int get_avf_buffer ( struct AVCodecContext *  c,
AVFrame pic,
int  flags 
)

Definition at line 2663 of file avformatdecoder.cpp.

◆ get_avf_buffer_dxva2()

int get_avf_buffer_dxva2 ( struct AVCodecContext *  c,
AVFrame pic,
int  flags 
)

Definition at line 2729 of file avformatdecoder.cpp.

◆ StreamHasRequiredParameters()

static bool StreamHasRequiredParameters ( AVStream *  Stream)
static

Definition at line 177 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::OpenFile().

◆ myth_av_log()

static void myth_av_log ( void *  ptr,
int  level,
const char *  fmt,
va_list  vl 
)
static

Definition at line 234 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::AvFormatDecoder().

◆ get_canonical_lang()

static int get_canonical_lang ( const char *  lang_cstr)
static

◆ lsb3full()

static int64_t lsb3full ( int64_t  lsb,
int64_t  base_ts,
int  lsb_bits 
)
static

◆ HandleStreamChange()

void HandleStreamChange ( void *  data)

Definition at line 914 of file avformatdecoder.cpp.

◆ get_format_dxva2()

enum AVPixelFormat get_format_dxva2 ( struct AVCodecContext *  avctx,
const enum AVPixelFormat *  valid_fmts 
)
static

Definition at line 1356 of file avformatdecoder.cpp.

◆ filter_lang()

static vector<int> filter_lang ( const sinfo_vec_t tracks,
int  lang_key,
const vector< int > &  ftype 
)
static

Definition at line 4160 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::AutoSelectAudioTrack().

◆ filter_type()

static vector<int> filter_type ( const sinfo_vec_t tracks,
AudioTrackType  type 
)
static

Definition at line 4175 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::AutoSelectAudioTrack().

◆ extract_mono_channel()

static void extract_mono_channel ( uint  channel,
AudioInfo audioInfo,
char *  buffer,
int  bufsize 
)
static

Definition at line 4481 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::ProcessAudioPacket().

Variable Documentation

◆ max_video_queue_size

const int max_video_queue_size = 220
static

Definition at line 92 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::GetFrame().

◆ silence_ffmpeg_logging

bool silence_ffmpeg_logging = false
static

Definition at line 98 of file avformatdecoder.cpp.

Referenced by AvFormatDecoder::FindStreamInfo(), and myth_av_log().