Debian Codegraph @

src/lib/tsreader/MemoryReader.h

raw
1 #pragma once
2 /*
3 * Copyright (C) 2005-2012 Team Kodi
4 * https://kodi.tv
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 *************************************************************************
20 * This file is a modified version from Team MediaPortal's
21 * TsReader DirectShow filter
22 * MediaPortal is a GPL'ed HTPC-Application
23 * Copyright (C) 2005-2012 Team MediaPortal
24 * http://www.team-mediaportal.com
25 *
26 * Changes compared to Team MediaPortal's version:
27 * - Code cleanup for PVR addon usage
28 * - Code refactoring for cross platform usage
29 */
30
31 #ifdef LIVE555
32
33 #include "FileReader.h"
34 #include "MemoryBuffer.h"
35 #include "os-dependent.h"
36
37 namespace MPTV
38 {
39 class CMemoryReader : public FileReader
40 {
41 public:
42 CMemoryReader(CMemoryBuffer& buffer);
43 virtual ~CMemoryReader(void);
44 virtual long Read(unsigned char* pbData, size_t lDataLength, size_t *dwReadBytes);
45 virtual int64_t SetFilePointer(int64_t llDistanceToMove, unsigned long dwMoveMethod);
46 virtual bool IsBuffer() { return true; };
47 virtual long CloseFile() { return S_OK; };
48 virtual size_t HasData();
49
50 private:
51 CMemoryBuffer& m_buffer;
52 CMemoryReader& operator=(const CMemoryReader& memoryreader) {};
53 };
54 }
55 #endif //LIVE555