Go to the documentation of this file. 1 #ifndef MYTHMEDIABUFFER_H
2 #define MYTHMEDIABUFFER_H
5 #include <QReadWriteLock>
6 #include <QWaitCondition>
13 #include "mythconfig.h"
18 #include "libavcodec/avcodec.h"
22 #define kReadTestSize 20
25 #define BUFFER_SIZE_MINIMUM (4 * 1024 * 1024)
26 #define BUFFER_FACTOR_NETWORK 2
27 #define BUFFER_FACTOR_BITRATE 2
28 #define BUFFER_FACTOR_MATROSKA 2
30 #define DEFAULT_CHUNK_SIZE 32768
55 bool UseReadAhead =
true,
57 bool StreamOnly =
false);
87 bool IsDVD (
void)
const;
88 bool IsBD (
void)
const;
96 void Reset (
bool Full =
false,
bool ToAdjust =
false,
bool ResetInternal =
false);
103 long long Seek (
long long Position,
int Whence,
bool HasLock =
false);
119 long long WriterSeek (
long long Position,
int Whence,
bool HasLock =
false);
123 virtual bool IsOpen (
void)
const = 0;
130 virtual bool IsInMenu (
void)
const {
return false; }
133 virtual bool HandleAction (
const QStringList &, int64_t ) {
return false; }
135 virtual bool ReOpen (
const QString& =
"") {
return false; }
140 void run(
void)
override;
157 virtual long long SeekInternal (
long long Position,
int Whence) = 0;
bool OpenFile(const QString &Url, uint Retry=static_cast< uint >(kDefaultOpenTimeout)) override
Opens a BBC NetStream for reading.
long long SeekInternal(long long Position, int Whence) override
long long GetReadPosition(void) const override
bool IsOpen(void) const override
virtual void run(void)
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
This class supports the writing of recordings to disk.
This is a wrapper around QThread that does several additional things.
int SafeRead(void *Buffer, uint Size) override
Keeps track of recordings in a current LiveTV instance.