Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QMediaRtpStream Class Reference
[QtMediaModule]

The QMediaRtpStream class manages a single stream in an RTP session. More...

    #include <QMediaRtpStream>

Inherits QObject.

Inherited by QMediaRtpAudioStream and QMediaRtpVideoStream.

Public Types

Public Functions

Public Slots

Signals

Protected Functions

Additional Inherited Members


Detailed Description

The QMediaRtpStream class manages a single stream in an RTP session.

A QMediaRtpStream is composed of an inbound data stream, an outbound data stream or a combined inbound and outbound stream. The inbound and outbound connections are established separately so it is possible for example to start a stream listening for incoming data and start sending sometime later.

The payload of an outbound stream must be set with setOutboundPayload() before it can be connected.

The payload of an inbound streams is determined from the stream data. When the payload changes the stream will emit the inboundPayloadChanged() signal.

RTP streams can be created using QMediaRtpSession.


Member Type Documentation

enum QMediaRtpStream::Direction

Identifies the direction of an RTP stream.

ConstantValueDescription
QMediaRtpStream::SendOnly0x01The stream sends data.
QMediaRtpStream::ReceiveOnly0x02The stream receives data.
QMediaRtpStream::SendReceiveSendOnly | ReceiveOnlyThe stream both sends and receives data.

enum QMediaRtpStream::State

Identifies the current state of an RTP stream.

ConstantValueDescription
QMediaRtpStream::Connecting0The stream is in the process of establishing a connection.
QMediaRtpStream::Connected1The stream is connected.
QMediaRtpStream::Disconnecting2The stream is in the process of tearing down a connection.
QMediaRtpStream::Disconnected3The stream is disconnected.

enum QMediaRtpStream::Type

Identifies the type of an RTP stream.

ConstantValueDescription
QMediaRtpStream::Audio0The stream is an audio stream.
QMediaRtpStream::Video1The stream is a video stream.


Member Function Documentation

QMediaRtpStream::QMediaRtpStream ( Type type, Direction direction, QObject * parent = 0 )

Constructs a type RTP stream with the given parent which sends and/or receives data according to direction.

QMediaRtpStream::~QMediaRtpStream ()

Destroys a stream.

void QMediaRtpStream::connectInbound ( const QHostAddress & address, qint16 port )   [pure virtual slot]

Starts the inbound stream listening for data on the given address and port.

See also inboundAddress(), inboundPort(), inboundState(), disconnectInbound(), and connectOutbound().

void QMediaRtpStream::connectOutbound ( const QHostAddress & address, qint16 port )   [pure virtual slot]

Starts the outbound stream sending data to a host with the given address and port.

See also outboundAddress(), outboundPort(), outboundState(), disconnectOutbound(), and connectInbound().

Direction QMediaRtpStream::direction () const

Returns the direction of a stream.

void QMediaRtpStream::disconnectInbound ()   [pure virtual slot]

Stops the inbound stream receiving data.

void QMediaRtpStream::disconnectOutbound ()   [pure virtual slot]

Stops the outbound stream sending data.

QHostAddress QMediaRtpStream::inboundAddress () const

Returns the address the inbound stream is receiving data at.

See also setInboundAddress().

void QMediaRtpStream::inboundConnected ()   [signal]

Signals that the inbound stream has been connected.

void QMediaRtpStream::inboundDisconnected ()   [signal]

Signals that the inbound stream has been disconnected.

void QMediaRtpStream::inboundError ( const QString & error )   [signal]

Signals that an error occurred in the inbound stream.

See also setInboundError().

QString QMediaRtpStream::inboundErrorString () const

Returns a string describing the last error to occur to the inbound stream.

QMediaRtpPayload QMediaRtpStream::inboundPayload () const

Returns the payload of the inbound stream.

See also setInboundPayload().

void QMediaRtpStream::inboundPayloadChanged ( const QMediaRtpPayload & payload )   [signal]

Signals that the payload of the incoming stream has changed.

QList<QMediaRtpPayload> QMediaRtpStream::inboundPayloads () const   [pure virtual]

Returns a list of payloads the inbound stream can expect to receive.

See also setInboundPayloads().

qint16 QMediaRtpStream::inboundPort () const

Returns the port number the inbound stream is receiving data on.

See also setInboundPort().

State QMediaRtpStream::inboundState () const

Returns the state of the inbound stream.

See also setInboundState().

void QMediaRtpStream::inboundStateChanged ( QMediaRtpStream::State state )   [signal]

Signals that the state of the inbound stream has changed.

QHostAddress QMediaRtpStream::outboundAddress () const

Returns the address the outbound stream is sending to.

See also setOutboundAddress().

void QMediaRtpStream::outboundConnected ()   [signal]

Signals that the outbound streamm has been connected.

void QMediaRtpStream::outboundDisconnected ()   [signal]

Signals that the outbound stream has been disconnected.

void QMediaRtpStream::outboundError ( const QString & error )   [signal]

Signals that an error occurred in the outbound stream.

See also setOutboundError().

QString QMediaRtpStream::outboundErrorString () const

Returns a string describing the last error to occur to the outbound stream.

QMediaRtpPayload QMediaRtpStream::outboundPayload () const   [pure virtual]

Returns the payload used for outbound data.

See also setOutboundPayload().

qint16 QMediaRtpStream::outboundPort () const

Returns the port number the outbound stream is sending to.

See also setOutboundPort().

State QMediaRtpStream::outboundState () const

Returns the current state of the outbound stream.

See also setOutboundState().

void QMediaRtpStream::outboundStateChanged ( QMediaRtpStream::State state )   [signal]

Signals that the state of the outbound stream has changed.

void QMediaRtpStream::setInboundAddress ( const QHostAddress & address )   [protected]

Sets the address the inbound stream listens for data at.

See also inboundAddress().

void QMediaRtpStream::setInboundError ( const QString & error )   [protected]

Sets a string describing the last error to the inbound stream.

This will emit the inboundError() signal.

See also inboundError().

void QMediaRtpStream::setInboundPayload ( const QMediaRtpPayload & payload )   [protected]

Sets the payload of the inbound stream.

See also inboundPayload().

void QMediaRtpStream::setInboundPayloads ( const QList<QMediaRtpPayload> & payloads )   [pure virtual]

Sets a list of payloads the inbound stream can expect to receive.

See also inboundPayloads().

void QMediaRtpStream::setInboundPort ( qint16 port )   [protected]

Sets the port the inbound stream listens for data on.

See also inboundPort().

void QMediaRtpStream::setInboundState ( State state )   [protected]

Sets the current state of the inbound stream.

This emits the inboundStateChanged() signal.

See also inboundState().

void QMediaRtpStream::setOutboundAddress ( const QHostAddress & address )   [protected]

Sets the address the outbound stream sends data to.

See also outboundAddress().

void QMediaRtpStream::setOutboundError ( const QString & error )   [protected]

Sets a string describing the last error to occur the the outbound stream.

See also outboundError().

void QMediaRtpStream::setOutboundPayload ( const QMediaRtpPayload & payload )   [pure virtual]

Sets the payload to used for outbound data.

Returns true if the payload could be set and false otherwise.

Setting the payload will fail if the session does not support any equivalent outbound payload.

See also outboundPayload(), QMediaRtpSession::supportedOutboundPayloads(), and QMediaRtpPayload::isEquivalent().

void QMediaRtpStream::setOutboundPort ( qint16 port )   [protected]

Sets the port the outbound stream sends data to.

See also outboundPort().

void QMediaRtpStream::setOutboundState ( State state )   [protected]

Sets the state of the outbound stream.

This will emit the outboundStateChanged() signal.

See also outboundState().

Type QMediaRtpStream::type () const

Returns the type of a stream.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3