![]() |
Blender V2.61 - r43446
|
#include <AUD_FFMPEGWriter.h>

Public Member Functions | |
| AUD_FFMPEGWriter (std::string filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate) | |
| virtual | ~AUD_FFMPEGWriter () |
| virtual int | getPosition () const |
| virtual AUD_DeviceSpecs | getSpecs () const |
| virtual void | write (unsigned int length, sample_t *buffer) |
This class writes a sound file via ffmpeg.
Definition at line 47 of file AUD_FFMPEGWriter.h.
| AUD_FFMPEGWriter::AUD_FFMPEGWriter | ( | std::string | filename, |
| AUD_DeviceSpecs | specs, | ||
| AUD_Container | format, | ||
| AUD_Codec | codec, | ||
| unsigned int | bitrate | ||
| ) |
Creates a new writer.
| filename | The path to the file to be read. |
| specs | The file's audio specification. |
| format | The file's container format. |
| codec | The codec used for encoding the audio data. |
| bitrate | The bitrate for encoding. |
| AUD_Exception | Thrown if the file specified does not exist or cannot be read with ffmpeg. |
Definition at line 51 of file AUD_FFMPEGWriter.cpp.
References AUD_CODEC_AAC, AUD_CODEC_AC3, AUD_CODEC_FLAC, AUD_CODEC_MP2, AUD_CODEC_MP3, AUD_CODEC_PCM, AUD_CODEC_VORBIS, AUD_convert_float_double(), AUD_convert_float_s16(), AUD_convert_float_s32(), AUD_convert_float_u8(), AUD_DEVICE_SAMPLE_SIZE, AUD_ERROR_FFMPEG, AUD_ERROR_FILE, AUD_ERROR_SPECS, AUD_FORMAT_FLOAT32, AUD_FORMAT_FLOAT64, AUD_FORMAT_S16, AUD_FORMAT_S24, AUD_FORMAT_S32, AUD_FORMAT_U8, AUD_MAX, AUD_SAMPLE_SIZE, AUD_THROW, AVIO_FLAG_WRITE, avio_open, AVMEDIA_TYPE_AUDIO, AUD_DeviceSpecs::channels, codec_error, context_error, file_error, AUD_DeviceSpecs::format, format_error, NULL, AUD_DeviceSpecs::rate, AUD_Buffer::resize(), and stream_error.
| AUD_FFMPEGWriter::~AUD_FFMPEGWriter | ( | ) | [virtual] |
Destroys the writer and closes the file.
Definition at line 208 of file AUD_FFMPEGWriter.cpp.
References AUD_DEVICE_SAMPLE_SIZE, avio_close, AUD_DeviceSpecs::channels, and AUD_Buffer::getBuffer().
| int AUD_FFMPEGWriter::getPosition | ( | ) | const [virtual] |
Returns how many samples have been written so far.
Implements AUD_IWriter.
Definition at line 231 of file AUD_FFMPEGWriter.cpp.
| AUD_DeviceSpecs AUD_FFMPEGWriter::getSpecs | ( | ) | const [virtual] |
Returns the specification of the audio data being written into the sink.
Implements AUD_IWriter.
Definition at line 236 of file AUD_FFMPEGWriter.cpp.
| void AUD_FFMPEGWriter::write | ( | unsigned int | length, |
| sample_t * | buffer | ||
| ) | [virtual] |
Request to write the next length samples out into the sink.
| length | The count of samples to write. |
| buffer | The pointer to the buffer containing the data. |
Implements AUD_IWriter.
Definition at line 262 of file AUD_FFMPEGWriter.cpp.
References AUD_Buffer::assureSize(), AUD_DEVICE_SAMPLE_SIZE, AUD_MAX, AUD_MIN, AUD_SAMPLE_SIZE, AUD_DeviceSpecs::channels, AUD_Buffer::getBuffer(), AUD_Buffer::getSize(), len(), length(), and AUD_Buffer::resize().