MythTV master
mythdvdstream.h
Go to the documentation of this file.
1/* DVD stream
2 * Copyright 2011 Lawrence Rust <lvr at softsystem dot co dot uk>
3 */
4#ifndef DVDSTREAM_H
5#define DVDSTREAM_H
6
7// Qt
8#include <QString>
9#include <QList>
10
11// MythTV
12#include "io/mythmediabuffer.h"
13
14// Std
15#include <cstdint>
16
17using dvd_reader_t = struct dvd_reader_s;
18
20{
21 public:
22 class BlockRange;
23
24 explicit MythDVDStream(const QString &Filename);
25 ~MythDVDStream() override;
26
27 long long GetReadPosition (void) const override;
28 bool IsOpen (void) const override;
29 bool OpenFile (const QString &Filename, std::chrono::milliseconds Retry = 0ms) override;
30
31 protected:
32 int SafeRead (void *Buffer, uint Size) override;
33 long long SeekInternal (long long Position, int Whence) override;
34
35 private:
36 Q_DISABLE_COPY(MythDVDStream)
37
38 dvd_reader_t *m_reader { nullptr };
39 uint32_t m_start { 0 };
40 QList<BlockRange> m_blocks; // List of possibly encrypted block ranges
41 uint32_t m_pos { 0 }; // Current read position (blocks)
42 int m_title { -1 }; // Last title decrypted
43};
44#endif
QList< BlockRange > m_blocks
Definition: mythdvdstream.h:40
virtual bool OpenFile(const QString &Filename, std::chrono::milliseconds Retry=kDefaultOpenTimeout)=0
virtual bool IsOpen(void) const =0
virtual long long GetReadPosition(void) const =0
virtual long long SeekInternal(long long Position, int Whence)=0
virtual int SafeRead(void *Buffer, uint Size)=0
unsigned int uint
Definition: freesurround.h:24
dvd_reader_s dvd_reader_t
Definition: mythdvdstream.h:17
#define MTV_PUBLIC
Definition: mythtvexp.h:15