#include <MP3FromPCM.hh>
Collaboration diagram for MP3FromPCM:
Definition at line 37 of file MP3FromPCM.hh.
Public Member Functions | |
virtual | ~MP3FromPCM () |
Static Public Member Functions | |
static MP3FromPCM * | createNew (UsageEnvironment &env, FramedSource *audio_source) |
Static method. | |
Protected Member Functions | |
MP3FromPCM (UsageEnvironment &env, FramedSource *audio_source) | |
Constructor. | |
Private Member Functions | |
virtual void | doGetNextFrame () |
Inherited function. Used to process next frame to send. | |
void | afterGettingFrame1 (unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds) |
Called just after afterGettingFrame. | |
char const * | MIMEtype () const |
Static Private Member Functions | |
static void | afterGettingFrame (void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds) |
Called after getting a frame. | |
Private Attributes | |
bool | _initialized |
Specify whether the class is initialized or not. | |
OStreamAudioEncoder * | _audio_encoder |
Pointer to a OStreamAudioEncoder instance. | |
FramedSource * | _audio_source |
"FramedSource" means something "discrete" being sent/parsed/used. | |
unsigned char * | _input_buffer |
Internal buffer for PCM data. | |
unsigned int | _input_buffer_size |
MP3FromPCM::~MP3FromPCM | ( | ) | [virtual] |
Definition at line 34 of file MP3FromPCM.cpp.
References _audio_encoder, _initialized, _input_buffer, and NULL.
MP3FromPCM::MP3FromPCM | ( | UsageEnvironment & | env, | |
FramedSource * | audio_source | |||
) | [protected] |
Definition at line 48 of file MP3FromPCM.cpp.
References _audio_encoder, _initialized, MAX_AUDIO_PACKET_SIZE, NULL, and OSTREAM_ENCODING_MP3.
Referenced by createNew().
Here is the caller graph for this function:
void MP3FromPCM::afterGettingFrame | ( | void * | clientData, | |
unsigned | frameSize, | |||
unsigned | numTruncatedBytes, | |||
struct timeval | presentationTime, | |||
unsigned | durationInMicroseconds | |||
) | [static, private] |
Called from the main loop of LiveMedia, in a event-driven fashion. Will be a callback function, being static.
clientData | Usually a "this" pointer to MP3FromPCM. | |
frameSize | Size of the received packet. | |
numTruncatedBytes | If the buffer's size is littler than the packet received then there will be some truncated bytes. | |
presentationTime | Time of presentation of the packet. Used for reordering. | |
durationInMicroseconds | Duration of the packet receiving. |
Definition at line 81 of file MP3FromPCM.cpp.
References afterGettingFrame1().
Referenced by doGetNextFrame().
Here is the call graph for this function:
Here is the caller graph for this function:
void MP3FromPCM::afterGettingFrame1 | ( | unsigned | frameSize, | |
unsigned | numTruncatedBytes, | |||
struct timeval | presentationTime, | |||
unsigned | durationInMicroseconds | |||
) | [private] |
Definition at line 90 of file MP3FromPCM.cpp.
References _audio_encoder, _input_buffer, _input_buffer_size, DEBUG_PRINT, and OStreamAudioEncoder::encode_audio_frame().
Referenced by afterGettingFrame().
Here is the call graph for this function:
Here is the caller graph for this function:
MP3FromPCM * MP3FromPCM::createNew | ( | UsageEnvironment & | env, | |
FramedSource * | audio_source | |||
) | [static] |
env | UsageEnvironment, see LiveMedia doc. here http://www.live555.com/liveMedia/public/doxygen/html | |
audio_source | A source of the kind of AudioInputDevice. |
Definition at line 28 of file MP3FromPCM.cpp.
References MP3FromPCM().
Referenced by OStreamOnDemandSMS::createNewStreamSource().
Here is the call graph for this function:
Here is the caller graph for this function:
void MP3FromPCM::doGetNextFrame | ( | ) | [private, virtual] |
Definition at line 62 of file MP3FromPCM.cpp.
References _audio_source, _input_buffer, _input_buffer_size, afterGettingFrame(), and AUDIO_BLOCK_SIZE.
Here is the call graph for this function:
char const * MP3FromPCM::MIMEtype | ( | ) | const [private] |
Definition at line 116 of file MP3FromPCM.cpp.
OStreamAudioEncoder* MP3FromPCM::_audio_encoder [private] |
Definition at line 98 of file MP3FromPCM.hh.
Referenced by afterGettingFrame1(), MP3FromPCM(), and ~MP3FromPCM().
FramedSource* MP3FromPCM::_audio_source [private] |
In this case its a PCM discrete data.
Definition at line 104 of file MP3FromPCM.hh.
Referenced by doGetNextFrame().
bool MP3FromPCM::_initialized [private] |
unsigned char* MP3FromPCM::_input_buffer [private] |
Definition at line 107 of file MP3FromPCM.hh.
Referenced by afterGettingFrame1(), doGetNextFrame(), and ~MP3FromPCM().
unsigned int MP3FromPCM::_input_buffer_size [private] |
Definition at line 108 of file MP3FromPCM.hh.
Referenced by afterGettingFrame1(), and doGetNextFrame().