# AP4_DataBuffer Class Reference

`#include <Ap4DataBuffer.h>`

List of all members.

## Public Member Functions
| AP4_DataBuffer ()
| AP4_DataBuffer (AP4_Size size)
| AP4_DataBuffer (const void *data, AP4_Size data_size)
| AP4_DataBuffer (const AP4_DataBuffer &other)
virtual | ~AP4_DataBuffer ()
AP4_Result | SetBuffer (AP4_Byte *buffer, AP4_Size buffer_size)
AP4_Result | SetBufferSize (AP4_Size buffer_size)
AP4_Size | GetBufferSize () const
const AP4_Byte * | GetData () const
AP4_Byte * | UseData ()
AP4_Size | GetDataSize () const
AP4_Result | SetDataSize (AP4_Size size)
AP4_Result | SetData (const AP4_Byte *data, AP4_Size data_size)
AP4_Result | Reserve (AP4_Size size)
## Protected Member Functions
AP4_Result | ReallocateBuffer (AP4_Size size)
## Protected Attributes
bool | m_BufferIsLocal
AP4_Byte * | m_Buffer
AP4_Size | m_BufferSize
AP4_Size | m_DataSize

## Detailed Description

Definition at line 40 of file Ap4DataBuffer.h.

## Constructor & Destructor Documentation

AP4_DataBuffer::AP4_DataBuffer | ( |  | ) |

AP4_DataBuffer::AP4_DataBuffer | ( | AP4_Size | size | ) |

AP4_DataBuffer::AP4_DataBuffer | ( | const void * | data,
|  | AP4_Size | data_size |
| ) |  |  |

AP4_DataBuffer::AP4_DataBuffer | ( | const AP4_DataBuffer & | other | ) |

virtual AP4_DataBuffer::~AP4_DataBuffer | ( |  | ) | `[virtual]`

## Member Function Documentation

AP4_Result AP4_DataBuffer::SetBuffer | ( | AP4_Byte * | buffer,
|  | AP4_Size | buffer_size |
| ) |  |  |

AP4_Result AP4_DataBuffer::SetBufferSize | ( | AP4_Size | buffer_size | ) |

AP4_Size AP4_DataBuffer::GetBufferSize | ( |  | ) | const`[inline]`

Definition at line 53 of file Ap4DataBuffer.h.

References m_BufferSize.

const AP4_Byte* AP4_DataBuffer::GetData | ( |  | ) | const`[inline]`

Definition at line 56 of file Ap4DataBuffer.h.

References m_Buffer.

Referenced by AP4_MemoryByteStream::GetData().

AP4_Byte* AP4_DataBuffer::UseData | ( |  | ) | `[inline]`

Definition at line 57 of file Ap4DataBuffer.h.

References m_Buffer.

Referenced by AP4_MemoryByteStream::UseData().

AP4_Size AP4_DataBuffer::GetDataSize | ( |  | ) | const`[inline]`

Definition at line 58 of file Ap4DataBuffer.h.

References m_DataSize.

Referenced by AP4_ImmediateRtpConstructor::GetConstructedDataSize(), AP4_MemoryByteStream::GetDataSize(), and AP4_MemoryByteStream::GetSize().

AP4_Result AP4_DataBuffer::SetDataSize | ( | AP4_Size | size | ) |

AP4_Result AP4_DataBuffer::SetData | ( | const AP4_Byte * | data,
|  | AP4_Size | data_size |
| ) |  |  |

AP4_Result AP4_DataBuffer::Reserve | ( | AP4_Size | size | ) |

AP4_Result AP4_DataBuffer::ReallocateBuffer | ( | AP4_Size | size | ) | `[protected]`

## Member Data Documentation

bool AP4_DataBuffer::m_BufferIsLocal`[protected]`

Definition at line 67 of file Ap4DataBuffer.h.

AP4_Byte* AP4_DataBuffer::m_Buffer`[protected]`

Definition at line 68 of file Ap4DataBuffer.h.

Referenced by GetData(), and UseData().

AP4_Size AP4_DataBuffer::m_BufferSize`[protected]`

Definition at line 69 of file Ap4DataBuffer.h.

Referenced by GetBufferSize().

AP4_Size AP4_DataBuffer::m_DataSize`[protected]`

Definition at line 70 of file Ap4DataBuffer.h.

Referenced by GetDataSize().

The documentation for this class was generated from the following file:

- Ap4DataBuffer.h