The IFileInput interface represents a file input plugin that can create file input readers from filenames or buffers.
More...
#include <IFileInput.h>
|
virtual | ~IFileInput () |
| Destroys the file input.
|
|
virtual std::shared_ptr< IReader > | createReader (const std::string &filename, int stream=0)=0 |
| Creates a reader for a file to be read.
|
|
virtual std::shared_ptr< IReader > | createReader (std::shared_ptr< Buffer > buffer, int stream=0)=0 |
| Creates a reader for a file to be read from memory.
|
|
virtual std::vector< StreamInfo > | queryStreams (const std::string &filename)=0 |
| Queries the streams of a sound file.
|
|
virtual std::vector< StreamInfo > | queryStreams (std::shared_ptr< Buffer > buffer)=0 |
| Queries the streams of a sound file.
|
|
The IFileInput interface represents a file input plugin that can create file input readers from filenames or buffers.
◆ createReader() [1/2]
virtual std::shared_ptr< IReader > IFileInput::createReader |
( |
const std::string & | filename, |
|
|
int | stream = 0 ) |
|
pure virtual |
Creates a reader for a file to be read.
- Parameters
-
filename | Path to the file to be read. |
stream | The index of the audio stream within the file if it contains multiple audio streams. |
- Returns
- The reader that reads the file.
- Exceptions
-
Exception | Thrown if the file specified cannot be read. |
Implemented in FFMPEG, and SndFile.
◆ createReader() [2/2]
virtual std::shared_ptr< IReader > IFileInput::createReader |
( |
std::shared_ptr< Buffer > | buffer, |
|
|
int | stream = 0 ) |
|
pure virtual |
Creates a reader for a file to be read from memory.
- Parameters
-
buffer | The in-memory file buffer. |
stream | The index of the audio stream within the file if it contains multiple audio streams. |
- Returns
- The reader that reads the file.
- Exceptions
-
Exception | Thrown if the file specified cannot be read. |
Implemented in FFMPEG, and SndFile.
◆ queryStreams() [1/2]
virtual std::vector< StreamInfo > IFileInput::queryStreams |
( |
const std::string & | filename | ) |
|
|
pure virtual |
Queries the streams of a sound file.
- Parameters
-
filename | Path to the file to be read. |
- Returns
- A vector with as many streams as there are in the file.
- Exceptions
-
Exception | Thrown if the file specified cannot be read. |
Implemented in FFMPEG, and SndFile.
◆ queryStreams() [2/2]
virtual std::vector< StreamInfo > IFileInput::queryStreams |
( |
std::shared_ptr< Buffer > | buffer | ) |
|
|
pure virtual |
Queries the streams of a sound file.
- Parameters
-
buffer | The in-memory file buffer. |
- Returns
- A vector with as many streams as there are in the file.
- Exceptions
-
Exception | Thrown if the file specified cannot be read. |
Implemented in FFMPEG, and SndFile.
The documentation for this interface was generated from the following file: