TizenRT Public API  v2.0 M2
FileInputDataSource Class Reference
Inheritance diagram for FileInputDataSource:
Collaboration diagram for FileInputDataSource:

Public Member Functions

 FileInputDataSource ()
 Constructs an empty FileInputDataSource. More...
 
virtual ~FileInputDataSource ()
 Deconstructs an empty FileInputDataSource. More...
 
 FileInputDataSource (const std::string &dataPath)
 Constructs a new object provide with path. More...
 
 FileInputDataSource (const FileInputDataSource &source)
 Copy constructs for FileInputDataSource. More...
 
FileInputDataSourceoperator= (const FileInputDataSource &source)
 Operator= for FileInputDataSource. More...
 
bool isPrepare () override
 Whether file is ready to be read. More...
 
bool open () override
 Open the file. More...
 
bool close () override
 Close the file. More...
 
ssize_t read (unsigned char *buf, size_t size) override
 Read the file. More...
 
unsigned int getChannels ()
 Gets the channel count of the stream data. More...
 
unsigned int getSampleRate ()
 Gets the sample rate of the stream data. More...
 
audio_format_type_t getPcmFormat ()
 Gets the pcm format of the stream data. More...
 
void setChannels (unsigned int channels)
 Sets the channel count of the stream data. More...
 
void setSampleRate (unsigned int sampleRate)
 Sets the sample rate of the stream data. More...
 
void setPcmFormat (audio_format_type_t pcmFormat)
 Sets the pcm format of the stream data. More...
 
void setAudioType (audio_type_t audioType)
 Sets the audio type of the stream data. More...
 
audio_type_t getAudioType ()
 Gets the audio type of the stream data. More...
 

Detailed Description

Definition at line 42 of file FileInputDataSource.h.

Constructor & Destructor Documentation

Constructs an empty FileInputDataSource.

#include <media/FileInputDataSource.h>

Since
TizenRT v2.0
virtual ~FileInputDataSource ( )
virtual

Deconstructs an empty FileInputDataSource.

#include <media/FileInputDataSource.h>

Since
TizenRT v2.0
FileInputDataSource ( const std::string &  dataPath)

Constructs a new object provide with path.

#include <media/FileInputDataSource.h> param[in] dataPath The dataPath that the path of data

Since
TizenRT v2.0

Copy constructs for FileInputDataSource.

#include <media/FileInputDataSource.h>

Since
TizenRT v2.0

Member Function Documentation

bool close ( )
overridevirtual

Close the file.

#include <media/FileInputDataSource.h>

Returns
True is Success, False is Fail
Since
TizenRT v2.0

Implements DataSource.

audio_type_t getAudioType ( )
inherited

Gets the audio type of the stream data.

#include <media/DataSource.h>

Returns
The audio type of the stream data.
Since
TizenRT v2.0
unsigned int getChannels ( )
inherited

Gets the channel count of the stream data.

#include <media/DataSource.h>

Returns
The channel count of the stream data.
Since
TizenRT v2.0
audio_format_type_t getPcmFormat ( )
inherited

Gets the pcm format of the stream data.

#include <media/DataSource.h>

Returns
The pcm format of the stream data.
Since
TizenRT v2.0
unsigned int getSampleRate ( )
inherited

Gets the sample rate of the stream data.

#include <media/DataSource.h>

Returns
The sample rate of the stream data.
Since
TizenRT v2.0
bool isPrepare ( )
overridevirtual

Whether file is ready to be read.

#include <media/FileInputDataSource.h>

Returns
True is ready, False is not ready
Since
TizenRT v2.0

Implements DataSource.

bool open ( )
overridevirtual

Open the file.

#include <media/FileInputDataSource.h>

Returns
True is Success, False is Fail
Since
TizenRT v2.0

Implements DataSource.

FileInputDataSource& operator= ( const FileInputDataSource source)

Operator= for FileInputDataSource.

#include <media/FileInputDataSource.h>

Since
TizenRT v2.0
ssize_t read ( unsigned char *  buf,
size_t  size 
)
overridevirtual

Read the file.

#include <media/FileInputDataSource.h> param[in] buf pointer to a buffer param[in] size size to be read

Returns
The number of elements read
Since
TizenRT v2.0

Implements InputDataSource.

void setAudioType ( audio_type_t  audioType)
inherited

Sets the audio type of the stream data.

#include <media/DataSource.h>

Parameters
[in]audioTypeThe audioType that the audio type of stream data
Since
TizenRT v2.0
void setChannels ( unsigned int  channels)
inherited

Sets the channel count of the stream data.

#include <media/DataSource.h>

Parameters
[in]channelsThe channels that the channel count of stream data
Since
TizenRT v2.0
void setPcmFormat ( audio_format_type_t  pcmFormat)
inherited

Sets the pcm format of the stream data.

#include <media/DataSource.h>

Parameters
[in]pcmFormatThe pcmFormat that the pcm format of stream data
Since
TizenRT v2.0
void setSampleRate ( unsigned int  sampleRate)
inherited

Sets the sample rate of the stream data.

#include <media/DataSource.h>

Parameters
[in]sampleRateThe sampleRate that the sample rate of stream data
Since
TizenRT v2.0

The documentation for this class was generated from the following file: