MythTV
master
|
#include "avformatdecoder.h"
#include <unistd.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <iostream>
#include <set>
#include "libavutil/avutil.h"
#include "libavutil/error.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libswscale/swscale.h"
#include "libavutil/stereo3d.h"
#include "libavutil/imgutils.h"
#include "libavutil/display.h"
#include <QFileInfo>
#include <QStringDecoder>
#include "libmyth/audio/audiooutput.h"
#include "libmyth/audio/audiooutpututil.h"
#include "libmythbase/iso639.h"
#include "libmythbase/lcddevice.h"
#include "libmythbase/mythchrono.h"
#include "libmythbase/mythconfig.h"
#include "libmythbase/mythcorecontext.h"
#include "libmythbase/mythdate.h"
#include "libmythbase/mythdbcon.h"
#include "libmythbase/stringutil.h"
#include "libmythui/mythuihelper.h"
#include "mythtvexp.h"
#include "Bluray/mythbdbuffer.h"
#include "DVD/mythdvdbuffer.h"
#include "captions/cc608decoder.h"
#include "captions/cc708decoder.h"
#include "captions/subtitlereader.h"
#include "captions/teletextdecoder.h"
#include "io/mythmediabuffer.h"
#include "mheg/interactivetv.h"
#include "mpeg/atscdescriptors.h"
#include "mpeg/dvbdescriptors.h"
#include "mpeg/mpegtables.h"
#include "bytereader.h"
#include "mythavutil.h"
#include "mythframe.h"
#include "mythhdrvideometadata.h"
#include "mythvideoprofile.h"
#include "remoteencoder.h"
Go to the source code of this file.
Macros | |
#define | LOC QString("AFD: ") |
#define | FAIL(errmsg) |
Enumerations | |
enum | V4L2_MPEG_LINE_TYPES : std::uint8_t { V4L2_MPEG_VBI_IVTV_TELETEXT_B = 1, V4L2_MPEG_VBI_IVTV_CAPTION_525 = 4, V4L2_MPEG_VBI_IVTV_WSS_625 = 5, V4L2_MPEG_VBI_IVTV_VPS = 7 } |
Functions | |
static QSize | get_video_dim (const AVCodecContext &ctx) |
static float | get_aspect (const AVCodecContext &ctx) |
static float | get_aspect (AVCParser &p) |
int | get_avf_buffer (struct AVCodecContext *c, AVFrame *pic, int flags) |
static bool | StreamHasRequiredParameters (AVCodecContext *Context, AVStream *Stream) |
Determine if we have enough live TV data to initialize hardware decoders. More... | |
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 const char * | AVMediaTypeToString (enum AVMediaType codec_type) |
returns a human readable string for the AVMediaType enum. More... | |
static int64_t | lsb3full (int64_t lsb, int64_t base_ts, int lsb_bits) |
void | HandleStreamChange (void *data) |
static bool | cc608_good_parity (uint16_t data) |
int | get_avf_buffer_dxva2 (struct AVCodecContext *c, AVFrame *pic, int) |
static std::vector< int > | filter_lang (const sinfo_vec_t &tracks, int lang_key, const std::vector< int > &ftype) |
static std::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 constexpr int | SEQ_PKT_ERR_MAX { 50 } |
static constexpr ssize_t | kMaxVideoQueueSize = 220 |
static bool | silence_ffmpeg_logging = false |
static constexpr uint32_t | SEQ_START { 0x000001b3 } |
static constexpr uint32_t | GOP_START { 0x000001b8 } |
static constexpr uint32_t | SLICE_MIN { 0x00000101 } |
static constexpr uint32_t | SLICE_MAX { 0x000001af } |
#define LOC QString("AFD: ") |
Definition at line 121 of file avformatdecoder.cpp.
#define FAIL | ( | errmsg | ) |
Definition at line 208 of file avformatdecoder.cpp.
enum V4L2_MPEG_LINE_TYPES : std::uint8_t |
Enumerator | |
---|---|
V4L2_MPEG_VBI_IVTV_TELETEXT_B | Teletext (uses lines 6-22 for PAL, 10-21 for NTSC) |
V4L2_MPEG_VBI_IVTV_CAPTION_525 | Closed Captions (line 21 NTSC, line 22 PAL) |
V4L2_MPEG_VBI_IVTV_WSS_625 | Wide Screen Signal (line 20 NTSC, line 23 PAL) |
V4L2_MPEG_VBI_IVTV_VPS | Video Programming System (PAL) (line 16) |
Definition at line 55 of file avformatdecoder.cpp.
|
static |
Definition at line 139 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::InitVideoCodec(), AvFormatDecoder::ProcessVideoFrame(), and AvFormatDecoder::ScanStreams().
|
static |
Definition at line 143 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::H264PreProcessPkt(), and AvFormatDecoder::InitVideoCodec().
|
static |
Definition at line 164 of file avformatdecoder.cpp.
int get_avf_buffer | ( | struct AVCodecContext * | c, |
AVFrame * | pic, | ||
int | flags | ||
) |
Definition at line 2678 of file avformatdecoder.cpp.
|
static |
Determine if we have enough live TV data to initialize hardware decoders.
This was based on what is now the static int has_codec_parameters() from libavformat/demux.c
Definition at line 218 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::OpenFile().
|
static |
Definition at line 274 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::AvFormatDecoder().
|
static |
Definition at line 336 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::GetSubtitleLanguage(), and AvFormatDecoder::ScanRawTextCaptions().
|
static |
returns a human readable string for the AVMediaType enum.
av_get_media_type_string() from <libavutil/avutil.h> returns NULL for unknown or invalid codec_type, so use this instead.
Definition at line 358 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::GetFrame(), AvFormatDecoder::InitVideoCodec(), AvFormatDecoder::OpenAVCodec(), and AvFormatDecoder::ScanStreams().
|
static |
Definition at line 466 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::NormalizeVideoTimecode().
void HandleStreamChange | ( | void * | data | ) |
Definition at line 886 of file avformatdecoder.cpp.
Definition at line 1561 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::DecodeCCx08(), and AvFormatDecoder::ProcessVBIDataPacket().
int get_avf_buffer_dxva2 | ( | struct AVCodecContext * | c, |
AVFrame * | pic, | ||
int | |||
) |
Definition at line 2742 of file avformatdecoder.cpp.
|
static |
Definition at line 4219 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::AutoSelectAudioTrack().
|
static |
Definition at line 4233 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::AutoSelectAudioTrack().
|
static |
Definition at line 4537 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::ProcessAudioPacket().
|
staticconstexpr |
Definition at line 129 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::InitVideoCodec(), AvFormatDecoder::ProcessVideoPacket(), and AvFormatDecoder::ScanStreams().
|
staticconstexpr |
Definition at line 134 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::GetFrame().
Definition at line 137 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::FindStreamInfo(), and myth_av_log().
|
staticconstexpr |
Definition at line 3051 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
|
staticconstexpr |
Definition at line 3052 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
|
staticconstexpr |
Definition at line 3054 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
|
staticconstexpr |
Definition at line 3055 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().