kodi
PltFrameStream.h
1 /*****************************************************************
2 |
3 | Platinum - Frame Stream
4 |
5 | Copyright (c) 2004-2010, Plutinosoft, LLC.
6 | All rights reserved.
7 | http://www.plutinosoft.com
8 |
9 | This program is free software; you can redistribute it and/or
10 | modify it under the terms of the GNU General Public License
11 | as published by the Free Software Foundation; either version 2
12 | of the License, or (at your option) any later version.
13 |
14 | OEMs, ISVs, VARs and other distributors that combine and
15 | distribute commercially licensed software with Platinum software
16 | and do not wish to distribute the source code for the commercially
17 | licensed software under version 2, or (at your option) any later
18 | version, of the GNU General Public License (the "GPL") must enter
19 | into a commercial license agreement with Plutinosoft, LLC.
20 | licensing@plutinosoft.com
21 |
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | GNU General Public License for more details.
26 |
27 | You should have received a copy of the GNU General Public License
28 | along with this program; see the file LICENSE.txt. If not, write to
29 | the Free Software Foundation, Inc.,
30 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 | http://www.gnu.org/licenses/gpl-2.0.html
32 |
33 ****************************************************************/
34 
35 #ifndef _PLT_FRAMESTREAM_H_
36 #define _PLT_FRAMESTREAM_H_
37 
38 /*----------------------------------------------------------------------
39 | includes
40 +---------------------------------------------------------------------*/
41 #include "Neptune.h"
42 #include "PltFrameBuffer.h"
43 
44 /*----------------------------------------------------------------------
45 | PLT_InputFrameStream
46 +---------------------------------------------------------------------*/
48 {
49 public:
50  // methods
52  const char* boundary);
53  ~PLT_InputFrameStream() override;
54 
55  // NPT_InputStream methods
56  NPT_Result Read(void* buffer,
57  NPT_Size bytes_to_read,
58  NPT_Size* bytes_read = 0) override;
59 
60  NPT_Result Seek(NPT_Position offset) override { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
61  NPT_Result Skip(NPT_Size offset) override { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
62  NPT_Result Tell(NPT_Position& offset) override { NPT_COMPILER_UNUSED(offset); return NPT_FAILURE; }
63  NPT_Result GetSize(NPT_LargeSize& size) override { NPT_COMPILER_UNUSED(size); return NPT_FAILURE; }
64  NPT_Result GetAvailable(NPT_LargeSize& available) override;
65 
66 private:
67  NPT_Result FillBuffer();
68 
69 protected:
70  NPT_Reference<PLT_FrameBuffer> m_FrameBuffer;
71  NPT_MemoryStream m_Part;
72  NPT_UInt32 m_LastFrameIndex;
73  NPT_String m_Boundary;
74  bool m_Eos;
75 };
76 
78 
79 #endif /* _PLT_FRAMESTREAM_H_ */
Definition: NptStreams.h:60
Definition: PltFrameStream.h:47
Definition: NptStreams.h:184
Definition: NptStrings.h:57