OPAL
Version 3.14.3
|
#include <mediastrm.h>
Public Member Functions | |
Construction | |
OpalRTPMediaStream (OpalRTPConnection &conn, const OpalMediaFormat &mediaFormat, bool isSource, OpalRTPSession &rtpSession) | |
~OpalRTPMediaStream () | |
Overrides of OpalMediaStream class | |
virtual PBoolean | Open () |
virtual bool | IsOpen () const |
virtual PBoolean | ReadPacket (RTP_DataFrame &packet) |
virtual PBoolean | WritePacket (RTP_DataFrame &packet) |
virtual PBoolean | SetDataSize (PINDEX dataSize, PINDEX frameTime) |
virtual PBoolean | IsSynchronous () const |
virtual PBoolean | RequiresPatchThread () const |
virtual PBoolean | SetPatch (OpalMediaPatch *patch) |
virtual OpalRTPSession & | GetRtpSession () const |
virtual void | GetStatistics (OpalMediaStatistics &statistics, bool fromPatch=false) const |
![]() | |
virtual bool | InternalUpdateMediaFormat (const OpalMediaFormat &mediaFormat) |
virtual bool | InternalExecuteCommand (const OpalMediaCommand &command) |
void | PrintOn (ostream &strm) const |
virtual OpalMediaFormat | GetMediaFormat () const |
virtual bool | SetMediaFormat (const OpalMediaFormat &mediaFormat) |
bool | UpdateMediaFormat (const OpalMediaFormat &mediaFormat, bool mergeOnly=false) |
bool | ExecuteCommand (const OpalMediaCommand &command) const |
virtual PBoolean | Start () |
virtual PBoolean | Close () |
virtual void | OnStartMediaPatch () |
virtual void | OnStopMediaPatch (OpalMediaPatch &patch) |
virtual PBoolean | WritePackets (RTP_DataFrameList &packets) |
virtual PBoolean | ReadData (BYTE *data, PINDEX size, PINDEX &length) |
virtual PBoolean | WriteData (const BYTE *data, PINDEX length, PINDEX &written) |
bool | PushPacket (RTP_DataFrame &packet) |
PINDEX | GetDataSize () const |
virtual PBoolean | RequiresPatchThread (OpalMediaStream *stream) const |
virtual bool | EnableJitterBuffer (bool enab=true) const |
OpalConnection & | GetConnection () const |
bool | IsSource () const |
bool | IsSink () const |
unsigned | GetSessionID () const |
void | SetSessionID (unsigned id) |
PString | GetID () const |
unsigned | GetTimestamp () const |
void | SetTimestamp (unsigned ts) |
bool | GetMarker () const |
void | SetMarker (bool m) |
bool | IsPaused () const |
bool | SetPaused (bool pause) |
OpalMediaPatchPtr | GetPatch () const |
void | AddFilter (const PNotifier &filter, const OpalMediaFormat &stage=OpalMediaFormat()) const |
bool | RemoveFilter (const PNotifier &filter, const OpalMediaFormat &stage=OpalMediaFormat()) const |
P_DECLARE_BITWISE_ENUM (Details, 6,(DetailMinimum, DetailEOL, DetailNAT, DetailSecured, DetailFEC, DetailAudio, DetailAddresses)) | |
virtual void | PrintDetail (ostream &strm, const char *prefix=NULL, Details details=Details::All()) const |
~OpalMediaStream () | |
Protected Member Functions | |
virtual void | InternalClose () |
virtual bool | InternalSetJitterBuffer (const OpalJitterBuffer::Init &init) const |
virtual bool | InternalSetPaused (bool pause, bool fromUser, bool fromPatch) |
![]() | |
void | IncrementTimestamp (PINDEX size) |
bool | InternalWriteData (const BYTE *data, PINDEX length, PINDEX &written) |
OpalMediaPatchPtr | InternalSetPatchPart1 (OpalMediaPatch *newPatch) |
void | InternalSetPatchPart2 (const OpalMediaPatchPtr &oldPatch) |
OpalMediaStream (OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource) | |
Protected Attributes | |
OpalRTPSession & | rtpSession |
bool | m_forceIntraFrameFlag |
PSimpleTimer | m_forceIntraFrameTimer |
![]() | |
OpalConnection & | connection |
unsigned | sessionID |
WORD | m_sequenceNumber |
PString | identifier |
OpalMediaFormat | mediaFormat |
bool | m_paused |
bool | m_isSource |
bool | m_isOpen |
PINDEX | m_defaultDataSize |
unsigned | timestamp |
bool | marker |
OpalMediaPatchPtr | m_mediaPatch |
RTP_DataFrame::PayloadTypes | m_payloadType |
unsigned | m_frameTime |
PINDEX | m_frameSize |
Additional Inherited Members | |
![]() | |
typedef OpalMediaPatchPtr | PatchPtr |
This class describes a media stream that transfers data to/from a RTP session.
OpalRTPMediaStream::OpalRTPMediaStream | ( | OpalRTPConnection & | conn, |
const OpalMediaFormat & | mediaFormat, | ||
bool | isSource, | ||
OpalRTPSession & | rtpSession | ||
) |
Construct a new media stream for RTP sessions. This will add a reference to the rtpSession passed in.
conn | Connection that owns the stream |
mediaFormat | Media format for stream |
isSource | Is a source stream |
rtpSession | RTP session to stream to/from |
OpalRTPMediaStream::~OpalRTPMediaStream | ( | ) |
Destroy the media stream for RTP sessions. This will release the reference to the rtpSession passed into the constructor.
|
inlinevirtual |
Return current RTP session
References rtpSession.
|
virtual |
Reimplemented from OpalMediaStream.
|
protectedvirtual |
Close any internal components of the stream. This should be used in preference to overriding the Close() function as it is guaranteed to be called exactly once and avoids race conditions in the shut down sequence of a media stream.
Implements OpalMediaStream.
|
protectedvirtual |
Reimplemented from OpalMediaStream.
|
protectedvirtual |
Reimplemented from OpalMediaStream.
|
virtual |
Returns true if the media stream is open.
Reimplemented from OpalMediaStream.
|
virtual |
Indicate if the media stream is synchronous. Returns false for RTP streams.
Implements OpalMediaStream.
|
virtual |
Open the media stream using the media format.
The default behaviour simply sets the isOpen variable to true.
Reimplemented from OpalMediaStream.
|
virtual |
Read an RTP frame of data from the source media stream. The new behaviour simply calls OpalRTPSession::ReadData().
Reimplemented from OpalMediaStream.
|
virtual |
Indicate if the media stream requires a OpalMediaPatch thread (active patch). The default behaviour dermines if the media will be flowing between two RTP sessions within the same process. If so the OpalRTPConnection::OnLocalRTP() is called, and if it returns true indicating local handling then this function returns faklse to disable the patch thread.
Reimplemented from OpalMediaStream.
|
virtual |
Set the data size in bytes that is expected to be used.
dataSize | New data size (in total) |
frameTime | Individual frame time (if applicable) |
Reimplemented from OpalMediaStream.
|
virtual |
Set the patch thread that is using this stream.
patch | Media patch thread |
Reimplemented from OpalMediaStream.
|
virtual |
Write an RTP frame of data to the sink media stream. The new behaviour simply calls OpalRTPSession::WriteData().
Reimplemented from OpalMediaStream.
|
protected |
|
protected |
|
protected |
Referenced by GetRtpSession().