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

Public Member Functions

 SocketOutputDataSource ()=delete
 Constructs an empty SocketOutputDataSource. More...
 
 SocketOutputDataSource (const std::string &ipAddr, const uint16_t port)
 Constructs an empty SocketOutputDataSource. More...
 
 SocketOutputDataSource (unsigned int channels, unsigned int sampleRate, audio_format_type_t pcmFormat, const std::string &ipAddr, const uint16_t port)
 Constructs a new object provide with audio configuration. More...
 
 SocketOutputDataSource (const SocketOutputDataSource &source)
 Copy constructs for SocketOutputDataSource. More...
 
SocketOutputDataSourceoperator= (const SocketOutputDataSource &source)
 Operator= for SocketOutputDataSource. More...
 
virtual ~SocketOutputDataSource ()
 Deconstructs an empty SocketOutputDataSource. More...
 
bool isPrepare () override
 Whether file is ready to be write. More...
 
bool open () override
 Open the file. More...
 
bool close () override
 Close the file. More...
 
ssize_t write (unsigned char *buf, size_t size) override
 Puts the file data. More...
 
void setRecorder (std::shared_ptr< MediaRecorderImpl > mr)
 Register current recorder to get data souce state and other infomations. 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 46 of file SocketOutputDataSource.h.

Constructor & Destructor Documentation

Constructs an empty SocketOutputDataSource.

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

Since
TizenRT v2.0
SocketOutputDataSource ( const std::string &  ipAddr,
const uint16_t  port 
)

Constructs an empty SocketOutputDataSource.

#include <media/SocketOutputDataSource.h> param[in] ipAddr The IP address for connecting to the socket server param[in] port The port number for connecting to the socket server

Since
TizenRT v2.0
SocketOutputDataSource ( unsigned int  channels,
unsigned int  sampleRate,
audio_format_type_t  pcmFormat,
const std::string &  ipAddr,
const uint16_t  port 
)

Constructs a new object provide with audio configuration.

#include <media/SocketOutputDataSource.h> param[in] channels The channels that the channels of audio param[in] sampleRate The sampleRate that the sample rate of audio param[in] pcmFormat The pcmFormat that the pcm format of audio param[in] ipAddr The IP address for connecting to the socket server param[in] port The port number for connecting to the socket server

Since
TizenRT v2.0

Copy constructs for SocketOutputDataSource.

#include <media/SocketOutputDataSource.h>

Since
TizenRT v2.0
virtual ~SocketOutputDataSource ( )
virtual

Deconstructs an empty SocketOutputDataSource.

#include <media/SocketOutputDataSource.h>

Since
TizenRT v2.0

Member Function Documentation

bool close ( )
overridevirtual

Close the file.

#include <media/SocketOutputDataSource.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 write.

#include <media/SocketOutputDataSource.h>

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

Implements DataSource.

bool open ( )
overridevirtual

Open the file.

#include <media/SocketOutputDataSource.h>

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

Implements DataSource.

SocketOutputDataSource& operator= ( const SocketOutputDataSource source)

Operator= for SocketOutputDataSource.

#include <media/SocketOutputDataSource.h>

Since
TizenRT v2.0
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 setRecorder ( std::shared_ptr< MediaRecorderImpl >  mr)
inlineinherited

Register current recorder to get data souce state and other infomations.

#include <media/OutputDataSource.h>

Since
TizenRT v2.0

Definition at line 100 of file OutputDataSource.h.

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
ssize_t write ( unsigned char *  buf,
size_t  size 
)
overridevirtual

Puts the file data.

#include <media/SocketOutputDataSource.h>

Parameters
[in]bufThe buf that buffer to be written to the file
[in]sizeThe size that the size of the buffer
Returns
if there is nothing to write, it returns 0 if error occurred, it returns -1, else written size returns
Since
TizenRT v2.0

Implements OutputDataSource.


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