# OpalNullMediaStream Class Reference

`#include <mediastrm.h>`

Inheritance diagram for OpalNullMediaStream:

List of all members.

## Public Member Functions

Overrides of OpalMediaStream class
virtual PBoolean | ReadData (BYTE *data, PINDEX size, PINDEX &length)
virtual PBoolean | WriteData (const BYTE *data, PINDEX length, PINDEX &written)
virtual PBoolean | RequiresPatchThread () const
virtual PBoolean | IsSynchronous () const

## Protected Attributes

bool | m_isSynchronous

## Detailed Description

This class describes a media stream that is used for media bypass.

## Constructor & Destructor Documentation

OpalNullMediaStream::OpalNullMediaStream | ( | OpalConnection & | conn,
|  | const OpalMediaFormat & | mediaFormat,
|  | unsigned | sessionID,
|  | bool | isSource,
|  | bool | isSynchronous = `false` |
| ) |  |  |

Construct a new media stream for RTP sessions.

Parameters:

  mediaFormat | Media format for stream
  sessionID | Session number for stream
  isSource | Is a source stream
  isSynchronous | Can accept data and block accordingly

OpalNullMediaStream::OpalNullMediaStream | ( | OpalConnection & | conn,
|  | const OpalMediaFormat & | mediaFormat,
|  | unsigned | sessionID,
|  | bool | isSource,
|  | bool | isSynchronous = `false` |
| ) |  |  |

Construct a new media stream for RTP sessions.

Parameters:

  mediaFormat | Media format for stream
  sessionID | Session number for stream
  isSource | Is a source stream
  isSynchronous | Can accept data and block accordingly

## Member Function Documentation

virtual PBoolean OpalNullMediaStream::ReadData | ( | BYTE * | data,
|  | PINDEX | size,
|  | PINDEX & | length |
| ) |  |  | `[virtual]`

Read raw media data from the source media stream. The default behaviour does nothing and returns false.

Parameters:

  data | Data buffer to read to
  size | Size of buffer
  length | Length of data actually read

Reimplemented from OpalMediaStream.

virtual PBoolean OpalNullMediaStream::WriteData | ( | const BYTE * | data,
|  | PINDEX | length,
|  | PINDEX & | written |
| ) |  |  | `[virtual]`

Write raw media data to the sink media stream. The default behaviour does nothing and returns false.

Parameters:

  data | Data to write
  length | Length of data to read.
  written | Length of data actually written

Reimplemented from OpalMediaStream.

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

Indicate if the media stream requires a OpalMediaPatch thread (active patch). The default behaviour returns false.

Reimplemented from OpalMediaStream.

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

Indicate if the media stream is synchronous. Returns false.

Implements OpalMediaStream.

## Member Data Documentation

bool OpalNullMediaStream::m_isSynchronous `[protected]`

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

- mediastrm.h