# OpalMixerMediaStream Class Reference

`#include <opalmixer.h>`

Inheritance diagram for OpalMixerMediaStream:

[legend]
Collaboration diagram for OpalMixerMediaStream:
[legend]

## Public Member Functions

Construction
| OpalMixerMediaStream (OpalConnection &conn, const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource, PSafePtr< OpalMixerNode > node, bool listenOnly)
| ~OpalMixerMediaStream ()
Overrides of OpalMediaStream class
virtual PBoolean | Open ()
virtual PBoolean | WritePacket (RTP_DataFrame &packet)
virtual PBoolean | IsSynchronous () const
virtual PBoolean | RequiresPatchThread () const
Member variable access
PSafePtr< OpalMixerNode > | GetNode ()

## Protected Member Functions

virtual void | InternalClose ()
virtual bool | InternalSetJitterBuffer (const OpalJitterBuffer::Init &init) const

## Protected Attributes

PSafePtr< OpalMixerNode > | m_node
bool | m_listenOnly
bool | m_video

## Detailed Description

Mixer media stream. This class represents a media stream that will send/get media from a mixer.

## Constructor & Destructor Documentation

OpalMixerMediaStream::OpalMixerMediaStream | ( | OpalConnection & | conn,
|  | const OpalMediaFormat & | mediaFormat,
|  | unsigned | sessionID,
|  | bool | isSource,
|  | PSafePtr< OpalMixerNode > | node,
|  | bool | listenOnly |
| ) |  |  |

Construct a new media stream for mixer.

Parameters:

  conn | Connection for media stream
  mediaFormat | Media format for stream
  sessionID | Session number for stream
  isSource | Is a source stream
  node | Mixer node to send data
  listenOnly | Effectively initial pause state

OpalMixerMediaStream::~OpalMixerMediaStream | ( |  | ) |

Destroy stream.

## Member Function Documentation

PSafePtr<OpalMixerNode> OpalMixerMediaStream::GetNode | ( |  | ) | `[inline]`

Get the mixer node for this stream.

virtual void OpalMixerMediaStream::InternalClose | ( |  | ) | `[protected, virtual]`

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.

virtual bool OpalMixerMediaStream::InternalSetJitterBuffer | ( | const OpalJitterBuffer::Init & | init | ) | const`[protected, virtual]`

Reimplemented from OpalMediaStream.

virtual PBoolean OpalMixerMediaStream::IsSynchronous | ( |  | ) | const`[virtual]`

Indicate if the media stream is synchronous. Returns true for LID streams.

Implements OpalMediaStream.

virtual PBoolean OpalMixerMediaStream::Open | ( |  | ) | `[virtual]`

Open the media stream using the media format.

Reimplemented from OpalMediaStream.

virtual PBoolean OpalMixerMediaStream::RequiresPatchThread | ( |  | ) | const`[virtual]`

Indicate if the media stream requires a OpalMediaPatch thread (active patch). This is called on the source/sink stream and is passed the sink/source stream that the patch will initially be using. The function could conditionally require the patch thread to execute a thread reading and writing data, or prevent it from doing so as it can do so in hardware in some way.

The default behaviour returns true if a sink stream. If source stream then threading is from the mixer class.

Reimplemented from OpalMediaStream.

virtual PBoolean OpalMixerMediaStream::WritePacket | ( | RTP_DataFrame & | packet | ) | `[virtual]`

Write an RTP frame of data to the sink media stream. The default behaviour simply calls WriteData() on the data portion of the RTP_DataFrame and and sets the internal timestamp and marker from the member variables of the media stream class.

Reimplemented from OpalMediaStream.

## Field Documentation

bool OpalMixerMediaStream::m_listenOnly `[protected]`

PSafePtr<OpalMixerNode> OpalMixerMediaStream::m_node `[protected]`

bool OpalMixerMediaStream::m_video `[protected]`

The documentation for this class was generated from the following file:

- opalmixer.h