iax2medstrm.h
Go to the documentation of this file.
/*
*
* Inter Asterisk Exchange 2
*
* Open Phone Abstraction Library (OPAL)
*
* Extension of the Opal Media stream, where the media from the IAX2 side is
* linked to the OPAL
*
* Copyright (c) 2005 Indranet Technologies 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 Indranet Technologies Ltd.
*
* The author of this code is Derek J Smithies
*
* $Revision: 27149 $
* $Author: rjongbloed $
* $Date: 2012-03-07 18:32:36 -0600 (Wed, 07 Mar 2012) $
*/
#ifndef OPAL_IAX2_MEDIASTRM_H
#define OPAL_IAX2_MEDIASTRM_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <opal/buildopts.h>
#if OPAL_IAX2
#include <opal/mediafmt.h>
#include <iax2/iax2con.h>
class RTP_Session;
class OpalMediaPatch;
class OpalLine;
class OpalIAX2MediaStream : public OpalMediaStream
{
PCLASSINFO(OpalIAX2MediaStream, OpalMediaStream);
OpalIAX2MediaStream(
IAX2Connection &con,
const OpalMediaFormat & mediaFormat,
unsigned sessionID,
PBoolean isSource
);
~OpalIAX2MediaStream();
public:
virtual PBoolean Open();
virtual PBoolean Start();
virtual PBoolean ReadPacket(
RTP_DataFrame & packet
);
virtual PBoolean WriteData(
const BYTE * data,
PINDEX length,
PINDEX & written
);
virtual PBoolean IsSynchronous() const;
protected:
virtual void InternalClose() { }
IAX2Connection & connection;
PBYTEArray pendingData;
};
#endif // OPAL_IAX2
#endif // OPAL_IAX2_MEDIASTRM_H
/* The comment below is magic for those who use emacs to edit this file.
* With the comment below, the tab key does auto indent to 2 spaces.
*
* Local Variables:
* mode:c
* c-basic-offset:2
* End:
*/
OpalIAX2MediaStream::Start
virtual PBoolean Start()
OpalIAX2MediaStream
Definition: iax2medstrm.h:55
OpalIAX2MediaStream::ReadPacket
virtual PBoolean ReadPacket(RTP_DataFrame &packet)
RTP_Session
Definition: rtp.h:502
OpalMediaStream::isSource
bool isSource
Definition: mediastrm.h:421
buildopts.h
IAX2Connection
Definition: iax2con.h:63
OpalIAX2MediaStream::InternalClose
virtual void InternalClose()
Definition: iax2medstrm.h:119
OpalIAX2MediaStream::Open
virtual PBoolean Open()
iax2con.h
OpalMediaStream::sessionID
unsigned sessionID
Definition: mediastrm.h:417
RTP_DataFrame
Definition: rtp.h:71
OpalMediaPatch
Definition: patch.h:60
OpalIAX2MediaStream::WriteData
virtual PBoolean WriteData(const BYTE *data, PINDEX length, PINDEX &written)
OpalMediaFormat
Definition: mediafmt.h:724
OpalIAX2MediaStream::connection
IAX2Connection & connection
Definition: iax2medstrm.h:122
OpalIAX2MediaStream::IsSynchronous
virtual PBoolean IsSynchronous() const
mediafmt.h
OpalIAX2MediaStream::pendingData
PBYTEArray pendingData
Definition: iax2medstrm.h:127
OpalMediaStream
Definition: mediastrm.h:111
OpalMediaStream::mediaFormat
OpalMediaFormat mediaFormat
Definition: mediastrm.h:419
OpalLine
Definition: lid.h:906