/** Copyright 2011 Haiku, Inc. All rights reserved.* Distributed under the terms of the MIT License.** Authors:* John Scipione, jscipione@gmail.com** Corresponds to:* headers/os/media/Buffer.h rev 42274* src/kits/media/Buffer.cpp rev 42274*//*!\file Buffer.h\ingroup media\ingroup libbe\brief Defines the buffer_clone_info struct and BBuffer class.*//*!\struct buffer_clone_info\ingroup media\ingroup libbe\brief A struct that stores where in memory a BBuffer object is in memoryas well as the buffer flags.*//*!\class BBuffer\ingroup media\ingroup libbe\brief A reference to a chunk of memory useful for sharing media databetween applications and nodes.*//*!\fn void* BBuffer::Data()\brief Gets a pointer to the data of the buffer.\returns A void* pointer to the data.*//*!\fn size_t BBuffer::SizeAvailable()\brief Gets the size of the buffer in bytes. Alias for Size().\returns The buffer size in bytes*//*!\fn size_t BBuffer::SizeUsed()\brief Gets the size of the portion of the buffer that is currently inuse in bytes.\returns The currently used portion of the buffer size in bytes.*//*!\fn void BBuffer::SetSizeUsed(size_t size_used)\brief Sets the size of the buffer that is used in bytes.This method should be called after writing data to the buffer.*//*!\fn uint32 BBuffer::Flags()\brief Gets the flags of the buffer.\returns The buffer flags.*//*!\fn void BBuffer::Recycle()\brief Recycles the buffer so that it can be reused.*//*!\fn buffer_clone_info BBuffer::CloneInfo() const\brief Gets the \c buffer_clone_info struct that describes the buffer.\returns The a clone of the \c buffer_clone_info struct.*//*!\fn media_buffer_id BBuffer::ID()\brief Gets the ID of the buffer according to the App Server.\returns The App Server's ID of the buffer.*//*!\fn media_type BBuffer::Type()\brief Gets the media type of the data in the buffer.\returns The media type of the data in the buffer.*//*!\fn media_header* BBuffer::Header()\brief Gets a pointer to the header of the buffer.\returns A pointer to the header of the buffer.*//*!\fn media_audio_header* BBuffer::AudioHeader()\brief Gets a pointer to the header of the audio buffer.\returns A pointer to the header of the audio buffer.*//*!\fn media_video_header* BBuffer::VideoHeader()\brief Gets a pointer to a header of the video buffer.\returns A pointer to a header of the video buffer.*//*!\fn size_t BBuffer::Size()\brief Gets the size of the buffer in bytes.Alias for SizeAvailable().\returns The size of the buffer in bytes.*/