Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2011-08-16 17:00:55 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-08-16 17:00:55 +0400
commit02d2472baacd8ac091a29392a2bc9ac8693fb5e7 (patch)
treedfd8a80ce8c1771a318a46120c81514836ed4b2d /intern/audaspace/ffmpeg
parenta67562e73cbc2f4a9641fbc4d1147b4b2cc935c4 (diff)
3D Audio GSoC:
Code documentation. Also: * Fix: rlint for MSVC. * Minor other small fixes/changes.
Diffstat (limited to 'intern/audaspace/ffmpeg')
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp1
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h2
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGReader.h2
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h26
4 files changed, 27 insertions, 4 deletions
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
index 909f41302d7..e9d045bd303 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
@@ -36,7 +36,6 @@
#include "AUD_FFMPEGFactory.h"
#include "AUD_FFMPEGReader.h"
-#include "AUD_Buffer.h"
AUD_FFMPEGFactory::AUD_FFMPEGFactory(std::string filename) :
m_filename(filename)
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h
index af95e3a3b81..18510d8db8b 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h
@@ -34,7 +34,7 @@
#include "AUD_IFactory.h"
#include "AUD_Reference.h"
-class AUD_Buffer;
+#include "AUD_Buffer.h"
#include <string>
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h
index 222a3d8581a..a83477b50d6 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h
@@ -49,8 +49,6 @@ extern "C" {
* \warning Seeking may not be accurate! Moreover the position is updated after
* a buffer reading call. So calling getPosition right after seek
* normally results in a wrong value.
- * \warning Playback of an ogg with some outdated ffmpeg versions results in a
- * segfault on windows.
*/
class AUD_FFMPEGReader : public AUD_IReader
{
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h
index 618ec9402ce..92460eed7ca 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h
@@ -69,16 +69,34 @@ private:
*/
AVCodecContext* m_codecCtx;
+ /**
+ * The AVOutputFormat structure for using ffmpeg.
+ */
AVOutputFormat* m_outputFmt;
+ /**
+ * The AVStream structure for using ffmpeg.
+ */
AVStream* m_stream;
+ /**
+ * The input buffer for the format converted data before encoding.
+ */
AUD_Buffer m_input_buffer;
+ /**
+ * The output buffer for the encoded audio data.
+ */
AUD_Buffer m_output_buffer;
+ /**
+ * The count of input samples we have so far.
+ */
unsigned int m_input_samples;
+ /**
+ * The count of input samples necessary to encode a packet.
+ */
unsigned int m_input_size;
/**
@@ -90,12 +108,20 @@ private:
AUD_FFMPEGWriter(const AUD_FFMPEGWriter&);
AUD_FFMPEGWriter& operator=(const AUD_FFMPEGWriter&);
+ /**
+ * Encodes to the output buffer.
+ * \param data Pointer to the data to encode.
+ */
void encode(sample_t* data);
public:
/**
* Creates a new writer.
* \param filename The path to the file to be read.
+ * \param specs The file's audio specification.
+ * \param format The file's container format.
+ * \param codec The codec used for encoding the audio data.
+ * \param bitrate The bitrate for encoding.
* \exception AUD_Exception Thrown if the file specified does not exist or
* cannot be read with ffmpeg.
*/