mediastrm.h
Go to the documentation of this file.
/*
* mediastrm.h
*
* Media Stream classes
*
* Open Phone Abstraction Library (OPAL)
* Formally known as the Open H323 project.
*
* Copyright (c) 2001 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): ______________________________________.
*
* $Revision: 27587 $
* $Author: rjongbloed $
* $Date: 2012-05-07 21:26:25 -0500 (Mon, 07 May 2012) $
*/
#ifndef OPAL_OPAL_MEDIASTRM_H
#define OPAL_OPAL_MEDIASTRM_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <opal/buildopts.h>
#include <ptclib/delaychan.h>
#include <opal/mediafmt.h>
#include <opal/mediacmd.h>
#include <ptlib/safecoll.h>
#include <ptclib/guid.h>
class RTP_Session;
class OpalMediaPatch;
class OpalLine;
class OpalConnection;
class OpalRTPConnection;
class OpalMediaStatistics;
class OpalMediaStream : public PSafeObject
{
PCLASSINFO(OpalMediaStream, PSafeObject);
protected:
OpalMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource
);
public:
~OpalMediaStream();
public:
void PrintOn(
ostream & strm
) const;
virtual OpalMediaFormat GetMediaFormat() const;
bool UpdateMediaFormat(
const OpalMediaFormat & mediaFormat
);
virtual bool InternalUpdateMediaFormat(
const OpalMediaFormat & mediaFormat
);
virtual PBoolean ExecuteCommand(
const OpalMediaCommand & command
);
virtual PBoolean Open();
virtual PBoolean Start();
virtual PBoolean Close();
virtual void OnStartMediaPatch();
virtual void OnStopMediaPatch(
OpalMediaPatch & patch
);
virtual PBoolean WritePackets(
RTP_DataFrameList & packets
);
virtual PBoolean ReadPacket(
RTP_DataFrame & packet
);
virtual PBoolean WritePacket(
RTP_DataFrame & packet
);
virtual PBoolean ReadData(
BYTE * data,
PINDEX size,
PINDEX & length
);
virtual PBoolean WriteData(
const BYTE * data,
PINDEX length,
PINDEX & written
);
bool PushPacket(
RTP_DataFrame & packet
);
virtual PBoolean SetDataSize(
PINDEX dataSize,
PINDEX frameTime
);
PINDEX GetDataSize() const { return defaultDataSize; }
virtual PBoolean IsSynchronous() const = 0;
virtual PBoolean RequiresPatchThread(
OpalMediaStream * stream
) const;
virtual PBoolean RequiresPatchThread() const; // For backward compatibility
virtual bool EnableJitterBuffer(bool enab = true) const;
OpalConnection & GetConnection() const { return connection; }
bool IsSource() const { return isSource; }
bool IsSink() const { return !isSource; }
unsigned GetSessionID() const { return sessionID; }
void SetSessionID(unsigned id) { sessionID = id; }
PString GetID() const { return identifier; }
unsigned GetTimestamp() const { return timestamp; }
void SetTimestamp(unsigned ts) { timestamp = ts; }
bool GetMarker() const { return marker; }
void SetMarker(bool m) { marker = m; }
bool IsPaused() const { return m_paused; }
virtual bool SetPaused(
bool pause,
bool fromPatch = false
);
bool IsOpen() const { return isOpen; }
virtual PBoolean SetPatch(
OpalMediaPatch * patch
);
OpalMediaPatch * GetPatch() const { return m_mediaPatch; }
void AddFilter(
const PNotifier & filter,
const OpalMediaFormat & stage = OpalMediaFormat()
) const;
bool RemoveFilter(
const PNotifier & filter,
const OpalMediaFormat & stage = OpalMediaFormat()
) const;
#if OPAL_STATISTICS
virtual void GetStatistics(OpalMediaStatistics & statistics, bool fromPatch = false) const;
#endif
protected:
void IncrementTimestamp(PINDEX size);
bool InternalWriteData(const BYTE * data, PINDEX length, PINDEX & written);
virtual void InternalClose() = 0;
OpalConnection & connection;
unsigned sessionID;
PString identifier;
OpalMediaFormat mediaFormat;
bool m_paused;
bool isSource;
bool isOpen;
PINDEX defaultDataSize;
unsigned timestamp;
bool marker;
unsigned mismatchedPayloadTypes;
typedef PSafePtr<OpalMediaPatch, PSafePtrMultiThreaded> PatchPtr;
PatchPtr m_mediaPatch;
RTP_DataFrame::PayloadTypes m_payloadType;
unsigned m_frameTime;
PINDEX m_frameSize;
private:
P_REMOVE_VIRTUAL_VOID(OnPatchStart());
P_REMOVE_VIRTUAL_VOID(OnPatchStop());
P_REMOVE_VIRTUAL_VOID(OnStopMediaPatch());
P_REMOVE_VIRTUAL_VOID(RemovePatch(OpalMediaPatch *));
};
typedef PSafePtr<OpalMediaStream> OpalMediaStreamPtr;
class OpalMediaStreamPacing
{
public:
OpalMediaStreamPacing(
const OpalMediaFormat & mediaFormat
);
void Pace(
bool reading,
PINDEX bytes,
bool & marker
);
protected:
bool m_isAudio;
unsigned m_frameTime;
PINDEX m_frameSize;
unsigned m_timeUnits;
PAdaptiveDelay m_delay;
};
class OpalNullMediaStream : public OpalMediaStream, public OpalMediaStreamPacing
{
PCLASSINFO(OpalNullMediaStream, OpalMediaStream);
public:
OpalNullMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
bool isSynchronous = false
);
OpalNullMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
bool usePacingDelay,
bool requiresPatchThread
);
virtual PBoolean ReadData(
BYTE * data,
PINDEX size,
PINDEX & length
);
virtual PBoolean WriteData(
const BYTE * data,
PINDEX length,
PINDEX & written
);
virtual bool SetPaused(
bool pause,
bool fromPatch = false
);
virtual PBoolean RequiresPatchThread() const;
virtual PBoolean IsSynchronous() const;
protected:
virtual void InternalClose() { }
bool m_isSynchronous;
bool m_requiresPatchThread;
};
class OpalRTPMediaStream : public OpalMediaStream
{
PCLASSINFO(OpalRTPMediaStream, OpalMediaStream);
public:
OpalRTPMediaStream(
OpalRTPConnection & conn,
const OpalMediaFormat & mediaFormat,
bool isSource,
RTP_Session & rtpSession,
unsigned minAudioJitterDelay,
unsigned maxAudioJitterDelay
);
~OpalRTPMediaStream();
virtual PBoolean Open();
virtual bool SetPaused(
bool pause,
bool fromPatch = false
);
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 bool EnableJitterBuffer(bool enab = true) const;
virtual PBoolean SetPatch(
OpalMediaPatch * patch
);
virtual RTP_Session & GetRtpSession() const
{ return rtpSession; }
#if OPAL_STATISTICS
virtual void GetStatistics(OpalMediaStatistics & statistics, bool fromPatch = false) const;
#endif
protected:
virtual void InternalClose();
RTP_Session & rtpSession;
unsigned minAudioJitterDelay;
unsigned maxAudioJitterDelay;
};
class OpalRawMediaStream : public OpalMediaStream
{
PCLASSINFO(OpalRawMediaStream, OpalMediaStream);
protected:
OpalRawMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
PChannel * channel,
bool autoDelete
);
~OpalRawMediaStream();
public:
virtual PBoolean ReadData(
BYTE * data,
PINDEX size,
PINDEX & length
);
virtual PBoolean WriteData(
const BYTE * data,
PINDEX length,
PINDEX & written
);
PChannel * GetChannel() { return m_channel; }
bool SetChannel(
PChannel * channel,
bool autoDelete = true
);
virtual unsigned GetAverageSignalLevel();
protected:
virtual void InternalClose();
PChannel * m_channel;
bool m_autoDelete;
PMutex m_channelMutex;
PBYTEArray m_silence;
PUInt64 m_averageSignalSum;
unsigned m_averageSignalSamples;
PMutex m_averagingMutex;
void CollectAverage(const BYTE * buffer, PINDEX size);
};
class OpalFileMediaStream : public OpalRawMediaStream, public OpalMediaStreamPacing
{
PCLASSINFO(OpalFileMediaStream, OpalRawMediaStream);
public:
OpalFileMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
PFile * file,
bool autoDelete = true
);
OpalFileMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
const PFilePath & path
);
virtual PBoolean IsSynchronous() const;
virtual PBoolean ReadData(
BYTE * data,
PINDEX size,
PINDEX & length
);
virtual PBoolean WriteData(
const BYTE * data,
PINDEX length,
PINDEX & written
);
protected:
PFile file;
};
#if OPAL_PTLIB_AUDIO
class PSoundChannel;
class OpalAudioMediaStream : public OpalRawMediaStream
{
PCLASSINFO(OpalAudioMediaStream, OpalRawMediaStream);
public:
OpalAudioMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
PINDEX buffers,
unsigned bufferTime,
PSoundChannel * channel,
bool autoDelete = true
);
OpalAudioMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
PINDEX buffers,
unsigned bufferTime,
const PString & deviceName
);
virtual PBoolean SetDataSize(
PINDEX dataSize,
PINDEX frameTime
);
virtual PBoolean IsSynchronous() const;
protected:
PINDEX m_soundChannelBuffers;
unsigned m_soundChannelBufferTime;
};
#endif // OPAL_PTLIB_AUDIO
#if OPAL_VIDEO
class PVideoInputDevice;
class PVideoOutputDevice;
class OpalVideoMediaStream : public OpalMediaStream
{
PCLASSINFO(OpalVideoMediaStream, OpalMediaStream);
public:
OpalVideoMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
PVideoInputDevice * inputDevice,
PVideoOutputDevice * outputDevice,
bool autoDeleteInput = true,
bool autoDeleteOutput = true
);
~OpalVideoMediaStream();
virtual bool InternalUpdateMediaFormat(
const OpalMediaFormat & mediaFormat
);
virtual PBoolean Open();
virtual PBoolean ReadData(
BYTE * data,
PINDEX size,
PINDEX & length
);
virtual PBoolean WriteData(
const BYTE * data,
PINDEX length,
PINDEX & written
);
virtual PBoolean IsSynchronous() const;
virtual PBoolean SetDataSize(
PINDEX dataSize,
PINDEX frameTime
);
virtual PVideoInputDevice * GetVideoInputDevice() const
{
return m_inputDevice;
}
virtual PVideoOutputDevice * GetVideoOutputDevice() const
{
return m_outputDevice;
}
protected:
virtual void InternalClose();
PVideoInputDevice * m_inputDevice;
PVideoOutputDevice * m_outputDevice;
bool m_autoDeleteInput;
bool m_autoDeleteOutput;
PTimeInterval m_lastGrabTime;
};
#endif // OPAL_VIDEO
class OpalTransportUDP;
class OpalUDPMediaStream : public OpalMediaStream
{
PCLASSINFO(OpalUDPMediaStream, OpalMediaStream);
public:
OpalUDPMediaStream(
OpalConnection & conn,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
bool isSource,
OpalTransportUDP & transport
);
~OpalUDPMediaStream();
virtual PBoolean ReadPacket(
RTP_DataFrame & packet
);
virtual PBoolean WritePacket(
RTP_DataFrame & packet
);
virtual PBoolean IsSynchronous() const;
private:
virtual void InternalClose();
OpalTransportUDP & udpTransport;
};
#endif //OPAL_OPAL_MEDIASTRM_H
// End of File ///////////////////////////////////////////////////////////////
OpalMediaStream::UpdateMediaFormat
bool UpdateMediaFormat(const OpalMediaFormat &mediaFormat)
OpalMediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const =0
OpalRTPMediaStream::SetPatch
virtual PBoolean SetPatch(OpalMediaPatch *patch)
OpalRTPMediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const
OpalMediaStreamPacing::m_frameSize
PINDEX m_frameSize
Definition: mediastrm.h:464
OpalRTPMediaStream::InternalClose
virtual void InternalClose()
OpalRawMediaStream::SetChannel
bool SetChannel(PChannel *channel, bool autoDelete=true)
OpalRTPConnection
Definition: rtpconn.h:247
OpalMediaStream::SetSessionID
void SetSessionID(unsigned id)
Definition: mediastrm.h:336
mediacmd.h
OpalMediaStream::m_frameTime
unsigned m_frameTime
Definition: mediastrm.h:432
RTP_Session
Definition: rtp.h:502
OpalMediaStream::isSource
bool isSource
Definition: mediastrm.h:421
OpalFileMediaStream::OpalFileMediaStream
OpalFileMediaStream(OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource, PFile *file, bool autoDelete=true)
OpalMediaStreamPacing::m_timeUnits
unsigned m_timeUnits
Definition: mediastrm.h:465
OpalNullMediaStream::InternalClose
virtual void InternalClose()
Definition: mediastrm.h:538
OpalRTPMediaStream::GetStatistics
virtual void GetStatistics(OpalMediaStatistics &statistics, bool fromPatch=false) const
OpalRawMediaStream::GetChannel
PChannel * GetChannel()
Definition: mediastrm.h:705
OpalMediaCommand
Definition: mediacmd.h:43
buildopts.h
OpalFileMediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const
OpalVideoMediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const
OpalRTPMediaStream::maxAudioJitterDelay
unsigned maxAudioJitterDelay
Definition: mediastrm.h:653
OpalVideoMediaStream::m_lastGrabTime
PTimeInterval m_lastGrabTime
Definition: mediastrm.h:966
OpalMediaStream::GetID
PString GetID() const
Definition: mediastrm.h:341
OpalMediaStream::RemoveFilter
bool RemoveFilter(const PNotifier &filter, const OpalMediaFormat &stage=OpalMediaFormat()) const
OpalMediaStreamPtr
PSafePtr< OpalMediaStream > OpalMediaStreamPtr
Definition: mediastrm.h:442
OpalMediaStream::m_frameSize
PINDEX m_frameSize
Definition: mediastrm.h:433
OpalNullMediaStream::WriteData
virtual PBoolean WriteData(const BYTE *data, PINDEX length, PINDEX &written)
OpalMediaStream::ExecuteCommand
virtual PBoolean ExecuteCommand(const OpalMediaCommand &command)
OpalRTPMediaStream::EnableJitterBuffer
virtual bool EnableJitterBuffer(bool enab=true) const
OpalMediaStream::ReadData
virtual PBoolean ReadData(BYTE *data, PINDEX size, PINDEX &length)
OpalMediaStream::IsSink
bool IsSink() const
Definition: mediastrm.h:328
OpalMediaStream::marker
bool marker
Definition: mediastrm.h:425
OpalRTPMediaStream::WritePacket
virtual PBoolean WritePacket(RTP_DataFrame &packet)
OpalMediaStream::GetSessionID
unsigned GetSessionID() const
Definition: mediastrm.h:332
OpalUDPMediaStream::WritePacket
virtual PBoolean WritePacket(RTP_DataFrame &packet)
OpalMediaStream::InternalWriteData
bool InternalWriteData(const BYTE *data, PINDEX length, PINDEX &written)
OpalMediaStream::timestamp
unsigned timestamp
Definition: mediastrm.h:424
OpalMediaStream::SetMarker
void SetMarker(bool m)
Definition: mediastrm.h:357
OpalVideoMediaStream::GetVideoInputDevice
virtual PVideoInputDevice * GetVideoInputDevice() const
Definition: mediastrm.h:945
OpalNullMediaStream::m_requiresPatchThread
bool m_requiresPatchThread
Definition: mediastrm.h:541
OpalUDPMediaStream::ReadPacket
virtual PBoolean ReadPacket(RTP_DataFrame &packet)
RTP_DataFrame::PayloadTypes
PayloadTypes
Definition: rtp.h:86
OpalMediaStream::Open
virtual PBoolean Open()
OpalMediaStream::defaultDataSize
PINDEX defaultDataSize
Definition: mediastrm.h:423
OpalRTPMediaStream::SetPaused
virtual bool SetPaused(bool pause, bool fromPatch=false)
OpalMediaStreamPacing::Pace
void Pace(bool reading, PINDEX bytes, bool &marker)
Delay appropriate time for the written bytes.
OpalMediaStream::IncrementTimestamp
void IncrementTimestamp(PINDEX size)
OpalRTPMediaStream
Definition: mediastrm.h:548
OpalMediaStream::mismatchedPayloadTypes
unsigned mismatchedPayloadTypes
Definition: mediastrm.h:426
OpalUDPMediaStream::OpalUDPMediaStream
OpalUDPMediaStream(OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource, OpalTransportUDP &transport)
OpalMediaStream::PrintOn
void PrintOn(ostream &strm) const
OpalMediaStream::IsOpen
bool IsOpen() const
Definition: mediastrm.h:374
OpalMediaStream::SetPatch
virtual PBoolean SetPatch(OpalMediaPatch *patch)
OpalRTPMediaStream::rtpSession
RTP_Session & rtpSession
Definition: mediastrm.h:651
OpalRTPMediaStream::ReadPacket
virtual PBoolean ReadPacket(RTP_DataFrame &packet)
OpalFileMediaStream
Definition: mediastrm.h:739
OpalMediaStream::GetPatch
OpalMediaPatch * GetPatch() const
Definition: mediastrm.h:384
OpalMediaStream::sessionID
unsigned sessionID
Definition: mediastrm.h:417
OpalVideoMediaStream::Open
virtual PBoolean Open()
RTP_DataFrame
Definition: rtp.h:71
OpalMediaStream::GetMediaFormat
virtual OpalMediaFormat GetMediaFormat() const
OpalUDPMediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const
OpalRawMediaStream::GetAverageSignalLevel
virtual unsigned GetAverageSignalLevel()
OpalMediaPatch
Definition: patch.h:60
OpalVideoMediaStream::WriteData
virtual PBoolean WriteData(const BYTE *data, PINDEX length, PINDEX &written)
OpalRTPMediaStream::minAudioJitterDelay
unsigned minAudioJitterDelay
Definition: mediastrm.h:652
OpalMediaFormat
Definition: mediafmt.h:724
OpalMediaStream::Close
virtual PBoolean Close()
OpalMediaStream::SetPaused
virtual bool SetPaused(bool pause, bool fromPatch=false)
OpalRawMediaStream
Definition: mediastrm.h:660
OpalRTPMediaStream::SetDataSize
virtual PBoolean SetDataSize(PINDEX dataSize, PINDEX frameTime)
OpalRTPMediaStream::OpalRTPMediaStream
OpalRTPMediaStream(OpalRTPConnection &conn, const OpalMediaFormat &mediaFormat, bool isSource, RTP_Session &rtpSession, unsigned minAudioJitterDelay, unsigned maxAudioJitterDelay)
OpalVideoMediaStream::m_inputDevice
PVideoInputDevice * m_inputDevice
Definition: mediastrm.h:962
OpalMediaStreamPacing::m_delay
PAdaptiveDelay m_delay
Definition: mediastrm.h:466
OpalVideoMediaStream::InternalClose
virtual void InternalClose()
OpalNullMediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const
OpalVideoMediaStream::InternalUpdateMediaFormat
virtual bool InternalUpdateMediaFormat(const OpalMediaFormat &mediaFormat)
OpalMediaStream::InternalClose
virtual void InternalClose()=0
OpalRawMediaStream::m_channelMutex
PMutex m_channelMutex
Definition: mediastrm.h:724
OpalMediaStream::PatchPtr
PSafePtr< OpalMediaPatch, PSafePtrMultiThreaded > PatchPtr
Definition: mediastrm.h:428
OpalNullMediaStream::m_isSynchronous
bool m_isSynchronous
Definition: mediastrm.h:540
OpalVideoMediaStream::ReadData
virtual PBoolean ReadData(BYTE *data, PINDEX size, PINDEX &length)
OpalVideoMediaStream::~OpalVideoMediaStream
~OpalVideoMediaStream()
OpalNullMediaStream::OpalNullMediaStream
OpalNullMediaStream(OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource, bool isSynchronous=false)
OpalMediaStream::isOpen
bool isOpen
Definition: mediastrm.h:422
OpalRawMediaStream::m_autoDelete
bool m_autoDelete
Definition: mediastrm.h:723
OpalMediaStreamPacing
Definition: mediastrm.h:447
mediafmt.h
OpalNullMediaStream::SetPaused
virtual bool SetPaused(bool pause, bool fromPatch=false)
OpalMediaStream::WriteData
virtual PBoolean WriteData(const BYTE *data, PINDEX length, PINDEX &written)
OpalMediaStream::GetDataSize
PINDEX GetDataSize() const
Definition: mediastrm.h:283
OpalRawMediaStream::ReadData
virtual PBoolean ReadData(BYTE *data, PINDEX size, PINDEX &length)
OpalMediaStream::SetDataSize
virtual PBoolean SetDataSize(PINDEX dataSize, PINDEX frameTime)
OpalMediaStream::PushPacket
bool PushPacket(RTP_DataFrame &packet)
OpalMediaStream::GetStatistics
virtual void GetStatistics(OpalMediaStatistics &statistics, bool fromPatch=false) const
OpalUDPMediaStream
Definition: mediastrm.h:975
OpalVideoMediaStream::m_autoDeleteOutput
bool m_autoDeleteOutput
Definition: mediastrm.h:965
OpalMediaStreamPacing::m_frameTime
unsigned m_frameTime
Definition: mediastrm.h:463
OpalRawMediaStream::InternalClose
virtual void InternalClose()
OpalNullMediaStream::RequiresPatchThread
virtual PBoolean RequiresPatchThread() const
OpalMediaStream::identifier
PString identifier
Definition: mediastrm.h:418
OpalRawMediaStream::WriteData
virtual PBoolean WriteData(const BYTE *data, PINDEX length, PINDEX &written)
OpalMediaStream::RequiresPatchThread
virtual PBoolean RequiresPatchThread() const
OpalVideoMediaStream::OpalVideoMediaStream
OpalVideoMediaStream(OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, PVideoInputDevice *inputDevice, PVideoOutputDevice *outputDevice, bool autoDeleteInput=true, bool autoDeleteOutput=true)
OpalMediaStream::OnStopMediaPatch
virtual void OnStopMediaPatch(OpalMediaPatch &patch)
OpalMediaStream
Definition: mediastrm.h:111
OpalTransportUDP
Definition: transports.h:1050
OpalMediaStream::mediaFormat
OpalMediaFormat mediaFormat
Definition: mediastrm.h:419
OpalRawMediaStream::m_averageSignalSum
PUInt64 m_averageSignalSum
Definition: mediastrm.h:728
OpalVideoMediaStream::m_autoDeleteInput
bool m_autoDeleteInput
Definition: mediastrm.h:964
OpalVideoMediaStream::SetDataSize
virtual PBoolean SetDataSize(PINDEX dataSize, PINDEX frameTime)
OpalMediaStream::OnStartMediaPatch
virtual void OnStartMediaPatch()
OpalMediaStream::m_paused
bool m_paused
Definition: mediastrm.h:420
OpalMediaStream::Start
virtual PBoolean Start()
OpalMediaStream::InternalUpdateMediaFormat
virtual bool InternalUpdateMediaFormat(const OpalMediaFormat &mediaFormat)
OpalUDPMediaStream::~OpalUDPMediaStream
~OpalUDPMediaStream()
OpalMediaStream::AddFilter
void AddFilter(const PNotifier &filter, const OpalMediaFormat &stage=OpalMediaFormat()) const
OpalConnection
Definition: connection.h:353
OpalRawMediaStream::m_averageSignalSamples
unsigned m_averageSignalSamples
Definition: mediastrm.h:729
OpalNullMediaStream::ReadData
virtual PBoolean ReadData(BYTE *data, PINDEX size, PINDEX &length)
OpalMediaStream::WritePacket
virtual PBoolean WritePacket(RTP_DataFrame &packet)
OpalMediaStream::connection
OpalConnection & connection
Definition: mediastrm.h:416
OpalVideoMediaStream::GetVideoOutputDevice
virtual PVideoOutputDevice * GetVideoOutputDevice() const
Definition: mediastrm.h:952
OpalRawMediaStream::m_silence
PBYTEArray m_silence
Definition: mediastrm.h:726
OpalRTPMediaStream::~OpalRTPMediaStream
~OpalRTPMediaStream()
OpalMediaStream::GetConnection
OpalConnection & GetConnection() const
Definition: mediastrm.h:320
OpalFileMediaStream::WriteData
virtual PBoolean WriteData(const BYTE *data, PINDEX length, PINDEX &written)
OpalMediaStream::OpalMediaStream
OpalMediaStream(OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)
OpalRTPMediaStream::RequiresPatchThread
virtual PBoolean RequiresPatchThread() const
OpalRTPMediaStream::Open
virtual PBoolean Open()
OpalMediaStatistics
Definition: rtp.h:370
OpalRawMediaStream::~OpalRawMediaStream
~OpalRawMediaStream()
OpalRTPMediaStream::GetRtpSession
virtual RTP_Session & GetRtpSession() const
Definition: mediastrm.h:640
OpalMediaStream::IsPaused
bool IsPaused() const
Definition: mediastrm.h:361
OpalLine
Definition: lid.h:906
OpalMediaStream::EnableJitterBuffer
virtual bool EnableJitterBuffer(bool enab=true) const
OpalMediaStream::SetTimestamp
void SetTimestamp(unsigned ts)
Definition: mediastrm.h:349
OpalMediaStream::GetMarker
bool GetMarker() const
Definition: mediastrm.h:353
OpalVideoMediaStream::m_outputDevice
PVideoOutputDevice * m_outputDevice
Definition: mediastrm.h:963
OpalRawMediaStream::m_averagingMutex
PMutex m_averagingMutex
Definition: mediastrm.h:730
OpalVideoMediaStream
Definition: mediastrm.h:867
OpalFileMediaStream::file
PFile file
Definition: mediastrm.h:791
OpalMediaStream::ReadPacket
virtual PBoolean ReadPacket(RTP_DataFrame &packet)
OpalRawMediaStream::CollectAverage
void CollectAverage(const BYTE *buffer, PINDEX size)
OpalRawMediaStream::OpalRawMediaStream
OpalRawMediaStream(OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource, PChannel *channel, bool autoDelete)
OpalMediaStreamPacing::OpalMediaStreamPacing
OpalMediaStreamPacing(const OpalMediaFormat &mediaFormat)
OpalMediaStream::m_payloadType
RTP_DataFrame::PayloadTypes m_payloadType
Definition: mediastrm.h:431
OpalMediaStream::IsSource
bool IsSource() const
Definition: mediastrm.h:324
OpalNullMediaStream
Definition: mediastrm.h:472
OpalRawMediaStream::m_channel
PChannel * m_channel
Definition: mediastrm.h:722
OpalMediaStream::~OpalMediaStream
~OpalMediaStream()
OpalMediaStream::m_mediaPatch
PatchPtr m_mediaPatch
Definition: mediastrm.h:429
OpalFileMediaStream::ReadData
virtual PBoolean ReadData(BYTE *data, PINDEX size, PINDEX &length)
OpalMediaStream::GetTimestamp
unsigned GetTimestamp() const
Definition: mediastrm.h:345
OpalMediaStreamPacing::m_isAudio
bool m_isAudio
Definition: mediastrm.h:462
OpalMediaStream::WritePackets
virtual PBoolean WritePackets(RTP_DataFrameList &packets)