MP3FromPCM Class Reference

#include <MP3FromPCM.hh>

Collaboration diagram for MP3FromPCM:

Collaboration graph
[legend]
List of all members.

Detailed Description

Uses internally ffmpeg for this conversion.

Definition at line 37 of file MP3FromPCM.hh.

Public Member Functions

virtual ~MP3FromPCM ()

Static Public Member Functions

static MP3FromPCMcreateNew (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


Constructor & Destructor Documentation

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]

See also:
createNew-

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:


Member Function Documentation

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.

Parameters:
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]

See also:
afterGettingFrame.

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]

Parameters:
env UsageEnvironment, see LiveMedia doc. here http://www.live555.com/liveMedia/public/doxygen/html
audio_source A source of the kind of AudioInputDevice.
See also:
LinuxAudioInputDevice, WindowsAudioInputDevice.

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]

Returns:
MIME type string. Something like "audio/MPEG"

Definition at line 116 of file MP3FromPCM.cpp.


Member Data Documentation

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]

Definition at line 95 of file MP3FromPCM.hh.

Referenced by MP3FromPCM(), and ~MP3FromPCM().

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().


The documentation for this class was generated from the following files:
Generated on Tue Dec 26 10:37:23 2006 for Omnimeeting by  doxygen 1.4.7