MythTV  master
mythstreamingbuffer.h
Go to the documentation of this file.
1 #ifndef STREAMINGRINGBUFFER_H
2 #define STREAMINGRINGBUFFER_H
3 
4 // MythTV
5 #include "io/mythmediabuffer.h"
6 
8 {
9  public:
10  explicit MythStreamingBuffer(const QString &Filename);
11  ~MythStreamingBuffer() override;
12 
13  bool IsOpen (void) const override;
14  long long GetReadPosition (void) const override;
15  bool OpenFile (const QString &Filename, std::chrono::milliseconds Retry = kDefaultOpenTimeout) override;
16  bool IsStreamed (void) override { return m_streamed; }
17  bool IsSeekingAllowed (void) override { return m_allowSeeks; }
18  bool IsBookmarkAllowed (void) override { return false; }
19 
20  protected:
21  int SafeRead (void *Buffer, uint Size) override;
22  long long GetRealFileSizeInternal(void) const override;
23  long long SeekInternal (long long Position, int Whence) override;
24 
25  private:
26  struct AVIOContext *m_context { nullptr };
27  bool m_streamed { true };
28  bool m_allowSeeks { false };
29 };
30 
31 #endif // STREAMINGRINGBUFFER_H
MythStreamingBuffer::GetRealFileSizeInternal
long long GetRealFileSizeInternal(void) const override
Definition: mythstreamingbuffer.cpp:132
MythStreamingBuffer::IsOpen
bool IsOpen(void) const override
Definition: mythstreamingbuffer.cpp:34
MythStreamingBuffer::m_allowSeeks
bool m_allowSeeks
Definition: mythstreamingbuffer.h:28
MythMediaBuffer
Definition: mythmediabuffer.h:59
MythStreamingBuffer::m_streamed
bool m_streamed
Definition: mythstreamingbuffer.h:27
MythStreamingBuffer::SafeRead
int SafeRead(void *Buffer, uint Size) override
Definition: mythstreamingbuffer.cpp:107
MythStreamingBuffer::GetReadPosition
long long GetReadPosition(void) const override
Definition: mythstreamingbuffer.cpp:42
MythStreamingBuffer::~MythStreamingBuffer
~MythStreamingBuffer() override
Definition: mythstreamingbuffer.cpp:24
MythStreamingBuffer::OpenFile
bool OpenFile(const QString &Filename, std::chrono::milliseconds Retry=kDefaultOpenTimeout) override
Definition: mythstreamingbuffer.cpp:55
mythmediabuffer.h
MythStreamingBuffer::m_context
struct AVIOContext * m_context
Definition: mythstreamingbuffer.h:26
Buffer
Definition: MythExternControl.h:36
MythStreamingBuffer
Definition: mythstreamingbuffer.h:7
MythStreamingBuffer::SeekInternal
long long SeekInternal(long long Position, int Whence) override
Definition: mythstreamingbuffer.cpp:90
MythStreamingBuffer::IsBookmarkAllowed
bool IsBookmarkAllowed(void) override
Definition: mythstreamingbuffer.h:18
MythStreamingBuffer::MythStreamingBuffer
MythStreamingBuffer(const QString &Filename)
Definition: mythstreamingbuffer.cpp:17
MythMediaBuffer::kDefaultOpenTimeout
static constexpr std::chrono::milliseconds kDefaultOpenTimeout
Definition: mythmediabuffer.h:71
MythStreamingBuffer::IsStreamed
bool IsStreamed(void) override
Definition: mythstreamingbuffer.h:16
MythStreamingBuffer::IsSeekingAllowed
bool IsSeekingAllowed(void) override
Definition: mythstreamingbuffer.h:17
uint
unsigned int uint
Definition: freesurround.h:24