MythTV  master
mythinteractivebuffer.h
Go to the documentation of this file.
1 #ifndef ICRINGBUFFER_H
2 #define ICRINGBUFFER_H
3 
4 // MythTV
5 #include "io/mythmediabuffer.h"
6 
7 class NetStream;
8 
10 {
11  public:
12  explicit MythInteractiveBuffer(const QString &Url, MythMediaBuffer *Parent = nullptr);
13  ~MythInteractiveBuffer() override;
14 
15  bool IsOpen (void) const override;
16  long long GetReadPosition (void) const override;
17  bool OpenFile (const QString &Url, uint Retry = static_cast<uint>(kDefaultOpenTimeout)) override;
18  bool IsStreamed (void) override { return false; }
19  bool IsSeekingAllowed (void) override { return true; }
20  bool IsBookmarkAllowed (void) override { return false; }
21 
23 
24  protected:
25  int SafeRead (void *Buffer, uint Size) override;
26  long long GetRealFileSizeInternal(void) const override;
27  long long SeekInternal (long long Position, int Whence) override;
28 
29  private:
30  NetStream *m_stream { nullptr };
31  MythMediaBuffer *m_parent { nullptr };
32 };
33 #endif
MythInteractiveBuffer::GetRealFileSizeInternal
long long GetRealFileSizeInternal(void) const override
Definition: mythinteractivebuffer.cpp:145
MythInteractiveBuffer::OpenFile
bool OpenFile(const QString &Url, uint Retry=static_cast< uint >(kDefaultOpenTimeout)) override
Opens a BBC NetStream for reading.
Definition: mythinteractivebuffer.cpp:41
MythMediaBuffer
Definition: mythmediabuffer.h:49
MythMediaBuffer::kDefaultOpenTimeout
static const int kDefaultOpenTimeout
Definition: mythmediabuffer.h:61
MythInteractiveBuffer::SeekInternal
long long SeekInternal(long long Position, int Whence) override
Definition: mythinteractivebuffer.cpp:92
MythInteractiveBuffer::IsStreamed
bool IsStreamed(void) override
Definition: mythinteractivebuffer.h:18
MythInteractiveBuffer::GetReadPosition
long long GetReadPosition(void) const override
Definition: mythinteractivebuffer.cpp:87
MythInteractiveBuffer::IsOpen
bool IsOpen(void) const override
Definition: mythinteractivebuffer.cpp:30
MythInteractiveBuffer::IsBookmarkAllowed
bool IsBookmarkAllowed(void) override
Definition: mythinteractivebuffer.h:20
MythInteractiveBuffer::m_parent
MythMediaBuffer * m_parent
Definition: mythinteractivebuffer.h:31
MythInteractiveBuffer::m_stream
NetStream * m_stream
Definition: mythinteractivebuffer.h:30
NetStream
Stream content from a URI.
Definition: netstream.h:30
uint
unsigned int uint
Definition: compat.h:141
mythmediabuffer.h
Buffer
Definition: MythExternControl.h:36
MythInteractiveBuffer::IsSeekingAllowed
bool IsSeekingAllowed(void) override
Definition: mythinteractivebuffer.h:19
MythInteractiveBuffer::~MythInteractiveBuffer
~MythInteractiveBuffer() override
Definition: mythinteractivebuffer.cpp:23
MythInteractiveBuffer
Definition: mythinteractivebuffer.h:9
MythInteractiveBuffer::SafeRead
int SafeRead(void *Buffer, uint Size) override
Definition: mythinteractivebuffer.cpp:137
MythInteractiveBuffer::TakeBuffer
MythMediaBuffer * TakeBuffer(void)
Definition: mythinteractivebuffer.cpp:150
MythMediaBuffer::MythInteractiveBuffer
friend class MythInteractiveBuffer
Definition: mythmediabuffer.h:51