Go to the documentation of this file.
3 #ifndef STREAM_HANDLER_H
4 #define STREAM_HANDLER_H
10 #include <QWaitCondition>
14 #include <QRecursiveMutex>
36 virtual bool Open(
const QString &,
bool )
38 virtual bool Close(
const QString &) {
return false; }
60 bool allow_section_reader =
false,
61 bool needs_buffering =
false,
62 const QString& output_file= QString());
82 bool using_section_reader);
100 {
return new PIDInfo(pid, stream_type, pes_type); }
148 #endif // STREAM_HANDLER_H
QHash< MPEGStreamData *, QString > StreamDataList
virtual bool Close(const QString &)
bool RemoveAllPIDFilters(void)
void SetRunning(bool running, bool using_buffering, bool using_section_reader)
A QElapsedTimer based timer to replace use of QTime as a timer.
void WriteMPTS(const unsigned char *buffer, uint len)
Write out a copy of the raw MPTS.
virtual void CycleFiltersByPriority()
ThreadedFileWriter * m_mptsTfw
bool HasError(void) const
PIDInfo(uint pid, uint stream_type, int pes_type)
virtual bool AddNamedOutputFile(const QString &filename)
Called with _listener_lock locked just after adding new output file.
StreamHandler(QString device, int inputid)
PIDPriority GetPIDPriority(uint pid) const
uint m_streamType
StreamID.
virtual void RemoveListener(MPEGStreamData *data)
void PriorityEvent(int fd) override
bool m_usingSectionReader
void ReaderPaused(int fd) override
QRecursiveMutex m_listenerLock
QRecursiveMutex m_pidLock
virtual void SetRunningDesired(bool desired)
At minimum this sets _running_desired, this may also send signals to anything that might be blocking ...
bool UpdateFiltersFromStreamData(void)
Encapsulates data about MPEG stream and emits events for each table.
virtual void RemoveNamedOutputFile(const QString &filename)
Called with _listener_lock locked just before removing old output file.
virtual PIDInfo * CreatePIDInfo(uint pid, uint stream_type, int pes_type)
~StreamHandler() override
void UpdateListeningForEIT(void)
bool AddPIDFilter(PIDInfo *info)
This class supports the writing of recordings to disk.
QSet< QString > m_mptsFiles
virtual bool UpdateFilters(void)
int m_pesType
PESStreamID.
volatile bool m_runningDesired
QMap< uint, PIDInfo * > PIDInfoMap
int m_filterFd
Input filter file descriptor.
QWaitCondition m_runningStateChanged
virtual bool Open(const QString &, bool)
StreamDataList m_streamDataList
This is a wrapper around QThread that does several additional things.
bool RemovePIDFilter(uint pid)
std::vector< uint > m_eitPids
virtual void AddListener(MPEGStreamData *data, bool allow_section_reader=false, bool needs_buffering=false, const QString &output_file=QString())
bool IsRunning(void) const
bool m_allowSectionReader