BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJSIP Reference

#include <media.hpp>

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

Public Member Functions

VidConfPortInfo getPortInfo () const PJSUA2_THROW(Error)
 
int getPortId () const
 
void startTransmit (const VideoMedia &sink, const VideoMediaTransmitParam &param) const PJSUA2_THROW(Error)
 
void stopTransmit (const VideoMedia &sink) const PJSUA2_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) PJSUA2_THROW(Error)
 

Protected Member Functions

void registerMediaPort (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

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

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)
static

Get information from specific port id.

◆ startTransmit()

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

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

Stop media flow to destination/sink port.

Parameters
sinkThe destination media.

◆ registerMediaPort()

void pj::VideoMedia::registerMediaPort ( MediaPort  port,
pj_pool_t pool 
)
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.