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

Public Member Functions

 HttpInputDataSource ()=delete
 Constructs an empty HttpInputDataSource. More...
 
virtual ~HttpInputDataSource ()
 Deconstructs an HttpInputDataSource. More...
 
 HttpInputDataSource (const std::string &url)
 Constructs a new object provide with url. More...
 
 HttpInputDataSource (const HttpInputDataSource &source)
 Copy constructs for HttpInputDataSource. More...
 
HttpInputDataSourceoperator= (const HttpInputDataSource &source)
 Operator= for HttpInputDataSource. More...
 
bool isPrepared () override
 Whether http source is ready to be read. More...
 
bool open () override
 Open the http source. More...
 
bool close () override
 Close the http source. More...
 
ssize_t read (unsigned char *buf, size_t size) override
 Read the audio stream data. More...
 
void onBufferOverrun () override
 
void onBufferUnderrun () override
 Called when buffer underrun. More...
 
void onBufferUpdated (ssize_t change, size_t current) override
 Called when buffer updated. 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 56 of file HttpInputDataSource.h.

Constructor & Destructor Documentation

HttpInputDataSource ( )
delete

Constructs an empty HttpInputDataSource.

#include <media/HttpInputDataSource.h> Delete the default construct

Since
TizenRT v2.0
virtual ~HttpInputDataSource ( )
virtual

Deconstructs an HttpInputDataSource.

#include <media/HttpInputDataSource.h>

Since
TizenRT v2.0
HttpInputDataSource ( const std::string &  url)

Constructs a new object provide with url.

#include <media/HttpInputDataSource.h> param[in] url The URL of the internet audio stream

Since
TizenRT v2.0

Copy constructs for HttpInputDataSource.

#include <media/HttpInputDataSource.h>

Since
TizenRT v2.0

Member Function Documentation

bool close ( )
overridevirtual

Close the http source.

#include <media/HttpInputDataSource.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 isPrepared ( )
overridevirtual

Whether http source is ready to be read.

#include <media/HttpInputDataSource.h>

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

Implements DataSource.

void onBufferOverrun ( )
overridevirtual
void onBufferUnderrun ( )
overridevirtual

Called when buffer underrun.

#include <media/BufferObserverInterface.h>

Since
TizenRT v2.0

Implements BufferObserverInterface.

void onBufferUpdated ( ssize_t  change,
size_t  current 
)
overridevirtual

Called when buffer updated.

#include <media/BufferObserverInterface.h>

Since
TizenRT v2.0

Implements BufferObserverInterface.

bool open ( )
overridevirtual

Open the http source.

#include <media/HttpInputDataSource.h>

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

Implements DataSource.

HttpInputDataSource& operator= ( const HttpInputDataSource source)

Operator= for HttpInputDataSource.

#include <media/HttpInputDataSource.h>

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

Read the audio stream data.

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

Returns
The number of elements read. On failure, it return negative value.
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: