7#ifndef TEXT_SUBTITLE_PARSER_H
8#define TEXT_SUBTITLE_PARSER_H
11#include <libavcodec/avcodec.h>
12#include <libavformat/avformat.h>
21#include <QMutexLocker>
52 QMutexLocker locker(&
m_lock);
58 QMutexLocker locker(&
m_lock);
63 QMutexLocker locker(&
m_lock);
98 static int read_packet(
void *opaque, uint8_t *buf,
int buf_size);
99 static int64_t
seek_packet(
void *opaque, int64_t offset,
int whence);
static int64_t seek_packet(void *opaque, int64_t offset, int whence)
Seek in the file buffer.
QByteArray GetSubHeader()
SubtitleReader * m_parent
TextSubtitleParser(SubtitleReader *parent, QString fileName, TextSubtitles *target)
AVFormatContext * m_fmtCtx
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Read data from the file buffer into the avio context buffer.
void LoadSubtitles(bool inBackground)
void SeekFrame(int64_t ts, int flags)
AVCodecContext * m_decCtx
int decode(AVPacket *pkt)
int ReadNextSubtitle(void)
Read the next subtitle in the AV stream.
SubtitleLoadHelper * m_loadHelper
void SetHasSubtitles(bool hasSubs)
off_t GetByteCount(void) const
void SetByteCount(off_t count)
void TextSubtitlesUpdated()
bool GetHasSubtitles() const
void SetFilename(const QString &fileName)
~TextSubtitles() override
void SetInProgress(bool isInProgress)
TextSubtitles Copyright (c) 2006 by Pekka Jääskeläinen Distributed as part of MythTV under GPL v2 and...
text_subtitle_t & operator=(const text_subtitle_t &)=default
uint64_t m_start
Starting time in msec or starting frame.
text_subtitle_t()=default
uint64_t m_end
Ending time in msec or ending frame.
text_subtitle_t(const text_subtitle_t &)=default
text_subtitle_t(long start_, long end_)
std::vector< text_subtitle_t > TextSubtitleList