2 * Copyright (C) 2010-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "threads/CriticalSection.h"
15 CCriticalSection m_critSection
;
18 unsigned int m_readPtr
;
19 unsigned int m_writePtr
;
20 unsigned int m_fillCount
;
24 bool Create(unsigned int size
);
27 bool ReadData(char *buf
, unsigned int size
);
28 bool ReadData(CRingBuffer
&rBuf
, unsigned int size
);
29 bool WriteData(const char *buf
, unsigned int size
);
30 bool WriteData(CRingBuffer
&rBuf
, unsigned int size
);
31 bool SkipBytes(int skipSize
);
32 bool Append(CRingBuffer
&rBuf
);
33 bool Copy(CRingBuffer
&rBuf
);
35 unsigned int getSize();
36 unsigned int getReadPtr() const;
37 unsigned int getWritePtr();
38 unsigned int getMaxReadSize();
39 unsigned int getMaxWriteSize();