BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJSIP Reference

#include <media.hpp>

Inheritance diagram for pj::AudioMediaRecorder:
pj::AudioMedia pj::Media

Public Member Functions

 AudioMediaRecorder ()
 
void createRecorder (const string &file_name, unsigned enc_type=0, long max_size=0, unsigned options=0) PJSUA2_THROW(Error)
 
virtual ~AudioMediaRecorder ()
 
- Public Member Functions inherited from pj::AudioMedia
ConfPortInfo getPortInfo () const PJSUA2_THROW(Error)
 
int getPortId () const
 
void startTransmit (const AudioMedia &sink) const PJSUA2_THROW(Error)
 
void startTransmit2 (const AudioMedia &sink, const AudioMediaTransmitParam &param) const PJSUA2_THROW(Error)
 
void stopTransmit (const AudioMedia &sink) const PJSUA2_THROW(Error)
 
void adjustRxLevel (float level) PJSUA2_THROW(Error)
 
void adjustTxLevel (float level) PJSUA2_THROW(Error)
 
unsigned getRxLevel () const PJSUA2_THROW(Error)
 
unsigned getTxLevel () const PJSUA2_THROW(Error)
 
 AudioMedia ()
 
virtual ~AudioMedia ()
 
- Public Member Functions inherited from pj::Media
virtual ~Media ()
 
pjmedia_type getType () const
 

Static Public Member Functions

static AudioMediaRecordertypecastFromAudioMedia (AudioMedia *media)
 
- Static Public Member Functions inherited from pj::AudioMedia
static ConfPortInfo getPortInfoFromId (int port_id) PJSUA2_THROW(Error)
 
static AudioMediatypecastFromMedia (Media *media)
 

Additional Inherited Members

- Protected Member Functions inherited from pj::AudioMedia
void registerMediaPort (MediaPort port) PJSUA2_THROW(Error)
 
void registerMediaPort2 (MediaPort port, pj_pool_t *pool) PJSUA2_THROW(Error)
 
void unregisterMediaPort ()
 
- Protected Member Functions inherited from pj::Media
 Media (pjmedia_type med_type)
 
- Protected Attributes inherited from pj::AudioMedia
int id
 

Detailed Description

Audio Media Recorder.

Constructor & Destructor Documentation

◆ AudioMediaRecorder()

pj::AudioMediaRecorder::AudioMediaRecorder ( )

Constructor.

◆ ~AudioMediaRecorder()

virtual pj::AudioMediaRecorder::~AudioMediaRecorder ( )
virtual

Destructor. This will unregister the recorder port from the conference bridge.

Member Function Documentation

◆ createRecorder()

void pj::AudioMediaRecorder::createRecorder ( const string &  file_name,
unsigned  enc_type = 0,
long  max_size = 0,
unsigned  options = 0 
)

Create a file recorder, and automatically connect this recorder to the conference bridge. The recorder currently supports recording WAV file. The type of the recorder to use is determined by the extension of the file (e.g. ".wav").

Parameters
file_nameOutput file name. The function will determine the default format to be used based on the file extension. Currently ".wav" is supported on all platforms.
enc_typeOptionally specify the type of encoder to be used to compress the media, if the file can support different encodings. This value must be zero for now.
max_sizeMaximum file size. Specify zero or -1 to remove size limitation. This value must be zero or -1 for now.
optionsOptional options, which can be used to specify the recording file format. Supported options are PJMEDIA_FILE_WRITE_PCM, PJMEDIA_FILE_WRITE_ALAW, and PJMEDIA_FILE_WRITE_ULAW. Default is zero or PJMEDIA_FILE_WRITE_PCM.

◆ typecastFromAudioMedia()

static AudioMediaRecorder* pj::AudioMediaRecorder::typecastFromAudioMedia ( AudioMedia media)
static

Warning: deprecated and will be removed in future release.

Typecast from base class AudioMedia. This is useful for application written in language that does not support downcasting such as Python.

Parameters
mediaThe object to be downcasted
Returns
The object as AudioMediaRecorder instance

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

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.