Public Member Functions | List of all members
BBuffer Class Reference

A reference to a chunk of memory useful for sharing media data between applications and nodes. More...

Inherited by BSmallBuffer.

Public Member Functions

media_audio_header * AudioHeader ()
 Gets a pointer to the header of the audio buffer. More...
 
buffer_clone_info CloneInfo () const
 Gets the buffer_clone_info struct that describes the buffer. More...
 
void * Data ()
 Gets a pointer to the data of the buffer. More...
 
uint32 Flags ()
 Gets the flags of the buffer. More...
 
media_header * Header ()
 Gets a pointer to the header of the buffer. More...
 
media_buffer_id ID ()
 Gets the ID of the buffer according to the App Server. More...
 
void Recycle ()
 Recycles the buffer so that it can be reused.
 
void SetSizeUsed (size_t used)
 Sets the size of the buffer that is used in bytes. More...
 
size_t Size ()
 Gets the size of the buffer in bytes. More...
 
size_t SizeAvailable ()
 Gets the size of the buffer in bytes. Alias for Size(). More...
 
size_t SizeUsed ()
 Gets the size of the portion of the buffer that is currently in use in bytes. More...
 
media_type Type ()
 Gets the media type of the data in the buffer. More...
 
media_video_header * VideoHeader ()
 Gets a pointer to a header of the video buffer. More...
 

Detailed Description

A reference to a chunk of memory useful for sharing media data between applications and nodes.

Member Function Documentation

◆ AudioHeader()

media_audio_header * BBuffer::AudioHeader ( )

Gets a pointer to the header of the audio buffer.

Returns
A pointer to the header of the audio buffer.

◆ CloneInfo()

buffer_clone_info BBuffer::CloneInfo ( ) const

Gets the buffer_clone_info struct that describes the buffer.

Returns
The a clone of the buffer_clone_info struct.

◆ Data()

void * BBuffer::Data ( )

Gets a pointer to the data of the buffer.

Returns
A void* pointer to the data.

◆ Flags()

uint32 BBuffer::Flags ( )

Gets the flags of the buffer.

Returns
The buffer flags.

◆ Header()

media_header * BBuffer::Header ( )

Gets a pointer to the header of the buffer.

Returns
A pointer to the header of the buffer.

◆ ID()

media_buffer_id BBuffer::ID ( )

Gets the ID of the buffer according to the App Server.

Returns
The App Server's ID of the buffer.

◆ SetSizeUsed()

void BBuffer::SetSizeUsed ( size_t  size_used)

Sets the size of the buffer that is used in bytes.

This method should be called after writing data to the buffer.

◆ Size()

size_t BBuffer::Size ( )

Gets the size of the buffer in bytes.

Alias for SizeAvailable().

Returns
The size of the buffer in bytes.

◆ SizeAvailable()

size_t BBuffer::SizeAvailable ( )

Gets the size of the buffer in bytes. Alias for Size().

Returns
The buffer size in bytes

◆ SizeUsed()

size_t BBuffer::SizeUsed ( )

Gets the size of the portion of the buffer that is currently in use in bytes.

Returns
The currently used portion of the buffer size in bytes.

◆ Type()

media_type BBuffer::Type ( )

Gets the media type of the data in the buffer.

Returns
The media type of the data in the buffer.

◆ VideoHeader()

media_video_header * BBuffer::VideoHeader ( )

Gets a pointer to a header of the video buffer.

Returns
A pointer to a header of the video buffer.