|
MythTV master
|
#include <libmythtv/captions/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 86 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 182 of file textsubtitleparser.cpp.
| int TextSubtitleParser::decode | ( | AVPacket * | pkt | ) |
| QByteArray TextSubtitleParser::GetSubHeader | ( | ) |
Definition at line 419 of file textsubtitleparser.cpp.
| void TextSubtitleParser::LoadSubtitles | ( | bool | inBackground | ) |
Definition at line 264 of file textsubtitleparser.cpp.
Referenced by SubtitleReader::LoadExternalSubtitles(), and SubtitleLoadHelper::run().
|
staticprivate |
Read data from the file buffer into the avio context buffer.
Definition at line 192 of file textsubtitleparser.cpp.
Referenced by LoadSubtitles().
| 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 242 of file textsubtitleparser.cpp.
Referenced by SubtitleReader::ReadNextSubtitle().
|
staticprivate |
Seek in the file buffer.
Definition at line 208 of file textsubtitleparser.cpp.
Referenced by LoadSubtitles().
| void TextSubtitleParser::SeekFrame | ( | int64_t | ts, |
| int | flags | ||
| ) |
Definition at line 427 of file textsubtitleparser.cpp.
Referenced by SubtitleReader::SeekFrame().
|
private |
Definition at line 107 of file textsubtitleparser.h.
Referenced by GetSubHeader(), LoadSubtitles(), ReadNextSubtitle(), and ~TextSubtitleParser().
|
private |
Definition at line 104 of file textsubtitleparser.h.
Referenced by LoadSubtitles().
|
private |
Definition at line 106 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), ReadNextSubtitle(), SeekFrame(), and ~TextSubtitleParser().
|
private |
Definition at line 102 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), and ~TextSubtitleParser().
|
private |
Definition at line 101 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), and ReadNextSubtitle().
|
private |
Definition at line 109 of file textsubtitleparser.h.
Referenced by ReadNextSubtitle(), and ~TextSubtitleParser().
|
private |
Definition at line 108 of file textsubtitleparser.h.
Referenced by LoadSubtitles(), ReadNextSubtitle(), and ~TextSubtitleParser().
|
private |
Definition at line 103 of file textsubtitleparser.h.
Referenced by LoadSubtitles().