MythTV
master
|
#include <textsubtitleparser.h>
Public Member Functions | |
TextSubtitleParser (SubtitleReader *parent, QString fileName, TextSubtitles *target) | |
~TextSubtitleParser () | |
void | LoadSubtitles (bool inBackground) |
int | decode (AVPacket *pkt) |
QByteArray | GetSubHeader () |
void | SeekFrame (int64_t ts, int flags) |
int | ReadNextSubtitle (void) |
Read the next subtitle in the AV stream. More... | |
Static Private Member Functions | |
static int | read_packet (void *opaque, uint8_t *buf, int buf_size) |
Read data from the file buffer into the avio context buffer. More... | |
static int64_t | seek_packet (void *opaque, int64_t offset, int whence) |
Seek in the file buffer. More... | |
Private Attributes | |
SubtitleReader * | m_parent {nullptr} |
SubtitleLoadHelper * | m_loadHelper {nullptr} |
TextSubtitles * | m_target {nullptr} |
QString | m_fileName |
AVFormatContext * | m_fmtCtx {nullptr} |
AVCodecContext * | m_decCtx {nullptr} |
AVStream * | m_stream {nullptr} |
AVPacket * | m_pkt {nullptr} |
Definition at line 90 of file textsubtitleparser.h.
TextSubtitleParser::TextSubtitleParser | ( | SubtitleReader * | parent, |
QString | fileName, | ||
TextSubtitles * | target | ||
) |
Definition at line 174 of file textsubtitleparser.cpp.
TextSubtitleParser::~TextSubtitleParser | ( | ) |
Definition at line 180 of file textsubtitleparser.cpp.
void TextSubtitleParser::LoadSubtitles | ( | bool | inBackground | ) |
Definition at line 262 of file textsubtitleparser.cpp.
Referenced by SubtitleReader::LoadExternalSubtitles(), and SubtitleLoadHelper::run().
int TextSubtitleParser::decode | ( | AVPacket * | pkt | ) |
QByteArray TextSubtitleParser::GetSubHeader | ( | ) |
Definition at line 417 of file textsubtitleparser.cpp.
void TextSubtitleParser::SeekFrame | ( | int64_t | ts, |
int | flags | ||
) |
Definition at line 425 of file textsubtitleparser.cpp.
Referenced by SubtitleReader::SeekFrame().
int TextSubtitleParser::ReadNextSubtitle | ( | void | ) |
Read the next subtitle in the AV stream.
av_read_frame guarantees that pkt->pts, pkt->dts and pkt->duration are always set to correct values in AVStream.time_base units (and guessed if the format cannot provide them). pkt->pts can be AV_NOPTS_VALUE if the video format has B-frames, so it is better to rely on pkt->dts if you do not decompress the payload.
Definition at line 240 of file textsubtitleparser.cpp.
Referenced by SubtitleReader::ReadNextSubtitle().
|
staticprivate |
Read data from the file buffer into the avio context buffer.
Definition at line 190 of file textsubtitleparser.cpp.
Referenced by LoadSubtitles().
|
staticprivate |
Seek in the file buffer.
Definition at line 206 of file textsubtitleparser.cpp.
Referenced by LoadSubtitles().
|
private |
Definition at line 105 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), and ReadNextSubtitle().
|
private |
Definition at line 106 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), and ~TextSubtitleParser().
|
private |
Definition at line 107 of file textsubtitleparser.h.
Referenced by LoadSubtitles().
|
private |
Definition at line 108 of file textsubtitleparser.h.
Referenced by LoadSubtitles().
|
private |
Definition at line 110 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), ReadNextSubtitle(), SeekFrame(), and ~TextSubtitleParser().
|
private |
Definition at line 111 of file textsubtitleparser.h.
Referenced by GetSubHeader(), LoadSubtitles(), ReadNextSubtitle(), and ~TextSubtitleParser().
|
private |
Definition at line 112 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), ReadNextSubtitle(), and ~TextSubtitleParser().
|
private |
Definition at line 113 of file textsubtitleparser.h.
Referenced by ReadNextSubtitle(), TextSubtitleParser(), and ~TextSubtitleParser().