BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

#include <media.hpp>

Inheritance diagram for pj::VideoMedia:
pj::Media

Public Member Functions

VidConfPortInfo getPortInfo () const throw (Error)
 
int getPortId () const
 
void startTransmit (const VideoMedia &sink, const VideoMediaTransmitParam &param) const throw (Error)
 
void stopTransmit (const VideoMedia &sink) const throw (Error)
 
void update () const throw (Error)
 
 VideoMedia ()
 
virtual ~VideoMedia ()
 
- Public Member Functions inherited from pj::Media
virtual ~Media ()
 
pjmedia_type getType () const
 

Static Public Member Functions

static VidConfPortInfo getPortInfoFromId (int port_id) throw (Error)
 

Protected Member Functions

void registerMediaPort (MediaPort port, pj_pool_t *pool) throw (Error)
 
void unregisterMediaPort ()
 
- Protected Member Functions inherited from pj::Media
 Media (pjmedia_type med_type)
 

Protected Attributes

int id
 

Detailed Description

Video Media.

Constructor & Destructor Documentation

◆ VideoMedia()

pj::VideoMedia::VideoMedia ( )

Default Constructor.

Normally application will not create VideoMedia object directly, but it instantiates a VideoMedia derived class. This is set as public because some STL vector implementations require it.

◆ ~VideoMedia()

virtual pj::VideoMedia::~VideoMedia ( )
virtual

Virtual Destructor

Member Function Documentation

◆ getPortInfo()

VidConfPortInfo pj::VideoMedia::getPortInfo ( ) const
throw (Error
)

Get information about the specified conference port.

◆ getPortId()

int pj::VideoMedia::getPortId ( ) const

Get port Id.

◆ getPortInfoFromId()

static VidConfPortInfo pj::VideoMedia::getPortInfoFromId ( int  port_id)
throw (Error
)
static

Get information from specific port id.

◆ startTransmit()

void pj::VideoMedia::startTransmit ( const VideoMedia sink,
const VideoMediaTransmitParam param 
) const
throw (Error
)

Establish unidirectional media flow to sink. This media port will act as a source, and it may transmit to multiple destinations/sink. And if multiple sources are transmitting to the same sink, the media will be mixed together. Source and sink may refer to the same Media, effectively looping the media.

If bidirectional media flow is desired, application needs to call this method twice, with the second one called from the opposite source media.

Parameters
sinkThe destination Media.
paramThe parameter.

◆ stopTransmit()

void pj::VideoMedia::stopTransmit ( const VideoMedia sink) const
throw (Error
)

Stop media flow to destination/sink port.

Parameters
sinkThe destination media.

◆ update()

void pj::VideoMedia::update ( ) const
throw (Error
)

Update or refresh port states from video port info. Some port may change its port info in the middle of a session, for example when a video stream decoder learns that incoming video size or frame rate has changed, video conference needs to be informed to update its internal states.

◆ registerMediaPort()

void pj::VideoMedia::registerMediaPort ( MediaPort  port,
pj_pool_t pool 
)
throw (Error
)
protected

This method needs to be called by descendants of this class to register the media port created to the conference bridge and Endpoint's media list.

param port The media port to be registered to the conference bridge. param pool The memory pool.

◆ unregisterMediaPort()

void pj::VideoMedia::unregisterMediaPort ( )
protected

This method needs to be called by descendants of this class to remove the media port from the conference bridge and Endpoint's media list. Descendant should only call this method if it has registered the media with the previous call to registerMediaPort().

Field Documentation

◆ id

int pj::VideoMedia::id
protected

Conference port Id.


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.