|
MythTV master
|
#include "avformatdecoder.h"#include <unistd.h>#include <algorithm>#include <array>#include <cmath>#include <cstdint>#include <cstring>#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 "libmythtv/audio/audiooutput.h"#include "libmythtv/audio/audiooutputsettings.h"#include "libmythtv/mythaverror.h"#include "libmythtv/mythavframe.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/mythlogging.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 "mythavbufferref.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) |
| static void | HandleStreamChange (void *data, int avprogram_id) |
| static bool | cc608_good_parity (uint16_t data) |
| static AVBufferRef * | get_pmt_section_from_AVProgram (const AVProgram *program) |
| static AVBufferRef * | get_pmt_section_for_AVStream_index (AVFormatContext *context, int stream_index) |
| static bool | is_dual_mono (const AVChannelLayout &ch_layout) |
| 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 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 FAIL | ( | errmsg | ) |
Definition at line 199 of file avformatdecoder.cpp.
| #define LOC QString("AFD: ") |
Definition at line 114 of file avformatdecoder.cpp.
| enum V4L2_MPEG_LINE_TYPES : std::uint8_t |
Definition at line 56 of file avformatdecoder.cpp.
|
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 348 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::autoSelectVideoTrack(), AvFormatDecoder::GetFrame(), AvFormatDecoder::InitVideoCodec(), AvFormatDecoder::OpenAVCodec(), and AvFormatDecoder::ScanStreams().
Definition at line 1571 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::DecodeCCx08(), and AvFormatDecoder::ProcessVBIDataPacket().
|
static |
Definition at line 4368 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::ProcessAudioPacket().
|
static |
Definition at line 4067 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::selectBestAudioTrack().
|
static |
Definition at line 4081 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::AutoSelectAudioTrack().
|
static |
Definition at line 155 of file avformatdecoder.cpp.
|
static |
Definition at line 134 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::H264PreProcessPkt(), and AvFormatDecoder::InitVideoCodec().
| int get_avf_buffer | ( | struct AVCodecContext * | c, |
| AVFrame * | pic, | ||
| int | flags | ||
| ) |
Definition at line 2705 of file avformatdecoder.cpp.
|
static |
Definition at line 326 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::GetSubtitleLanguage(), and AvFormatDecoder::ScanRawTextCaptions().
|
static |
Definition at line 1611 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::ScanATSCCaptionStreams(), and AvFormatDecoder::ScanStreams().
|
static |
Definition at line 1602 of file avformatdecoder.cpp.
Referenced by get_pmt_section_for_AVStream_index(), and AvFormatDecoder::HasVideo().
|
static |
Definition at line 130 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::autoSelectVideoTrack(), AvFormatDecoder::InitVideoCodec(), and AvFormatDecoder::ProcessVideoFrame().
|
static |
Definition at line 872 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::OpenFile().
|
static |
Definition at line 2124 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::ProcessAudioPacket(), and AvFormatDecoder::ScanStreams().
|
static |
Definition at line 457 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::NormalizeVideoTimecode().
|
static |
Definition at line 265 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::AvFormatDecoder().
|
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 209 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::OpenFile().
|
staticconstexpr |
Definition at line 3022 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
|
staticconstexpr |
Definition at line 127 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::GetFrame().
|
staticconstexpr |
Definition at line 122 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::autoSelectVideoTrack(), AvFormatDecoder::InitVideoCodec(), and AvFormatDecoder::ProcessVideoPacket().
|
staticconstexpr |
Definition at line 3021 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
|
staticconstexpr |
Definition at line 3025 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
|
staticconstexpr |
Definition at line 3024 of file avformatdecoder.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().