2
* $Id: AUD_FFMPEGFactory.h 22686 2009-08-21 19:39:28Z nexyon $
4
* ***** BEGIN LGPL LICENSE BLOCK *****
6
* Copyright 2009 Jörg Hermann Müller
2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* Copyright 2009-2011 Jörg Hermann Müller
8
6
* This file is part of AudaSpace.
10
* AudaSpace is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU Lesser General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
8
* Audaspace is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
13
11
* (at your option) any later version.
15
13
* AudaSpace is distributed in the hope that it will be useful,
16
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Lesser General Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public License
21
* along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
23
* ***** END LGPL LICENSE BLOCK *****
26
#ifndef AUD_FFMPEGFACTORY
27
#define AUD_FFMPEGFACTORY
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with Audaspace; if not, write to the Free Software Foundation,
20
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
* ***** END GPL LICENSE BLOCK *****
25
/** \file audaspace/ffmpeg/AUD_FFMPEGFactory.h
30
#ifndef __AUD_FFMPEGFACTORY_H__
31
#define __AUD_FFMPEGFACTORY_H__
29
33
#include "AUD_IFactory.h"
30
34
#include "AUD_Reference.h"
35
#include "AUD_Buffer.h"
34
40
* This factory reads a sound file via ffmpeg.
42
48
* The filename of the sound source file.
50
const std::string m_filename;
47
53
* The buffer to read from.
49
55
AUD_Reference<AUD_Buffer> m_buffer;
57
// hide copy constructor and operator=
58
AUD_FFMPEGFactory(const AUD_FFMPEGFactory&);
59
AUD_FFMPEGFactory& operator=(const AUD_FFMPEGFactory&);
53
63
* Creates a new factory.
54
64
* \param filename The sound file path.
56
AUD_FFMPEGFactory(const char* filename);
66
AUD_FFMPEGFactory(std::string filename);
59
69
* Creates a new factory.
60
70
* \param buffer The buffer to read from.
61
71
* \param size The size of the buffer.
63
AUD_FFMPEGFactory(unsigned char* buffer, int size);
66
* Destroys the factory.
70
virtual AUD_IReader* createReader();
73
AUD_FFMPEGFactory(const data_t* buffer, int size);
75
virtual AUD_Reference<AUD_IReader> createReader();
73
#endif //AUD_FFMPEGFACTORY
78
#endif //__AUD_FFMPEGFACTORY_H__