Intel® Collaboration Suite for WebRTC  version 4.3.1
Open WebRTC Toolkit (OWT) Client SDK for Windows*
owt::base::Stream Class Reference

Base class of all streams with media stream. More...

#include <owt/base/stream.h>

Inheritance diagram for owt::base::Stream:

Public Member Functions

 Stream (MediaStreamInterface *media_stream, StreamSourceInfo source)
 
virtual std::string Id () const
 Get the ID of the stream. More...
 
virtual void DisableAudio ()
 Disable all audio tracks of the stream.
 
virtual void DisableVideo ()
 Disable all video tracks of the stream.
 
virtual void EnableAudio ()
 Enable all audio tracks of the stream.
 
virtual void EnableVideo ()
 Enable all video tracks of the stream.
 
virtual const std::unordered_map< std::string, std::string > Attributes () const
 Returns a user-defined attribute map. More...
 
virtual StreamSourceInfo Source () const
 Returns the audio/video source info of the stream. More...
 
virtual void AttachVideoRenderer (VideoRendererInterface &renderer)
 
virtual void AttachVideoRenderer (VideoRenderWindow &render_window)
 
virtual void AttachAudioPlayer (AudioPlayerInterface &player)
 
virtual void DetachVideoRenderer ()
 Detach the stream from its renderer.
 
virtual void DetachAudioPlayer ()
 Detach the stream from the audio player.
 
void AddObserver (StreamObserver &observer)
 Register an observer on the stream.
 
void RemoveObserver (StreamObserver &observer)
 De-Register an observer on the stream.
 

Detailed Description

Base class of all streams with media stream.

Member Function Documentation

◆ AttachAudioPlayer()

virtual void owt::base::Stream::AttachAudioPlayer ( AudioPlayerInterface player)
virtual

Attach the stream to an audio player that receives PCM data besides sending to audio output device.

◆ AttachVideoRenderer() [1/2]

virtual void owt::base::Stream::AttachVideoRenderer ( VideoRendererInterface renderer)
virtual

Attach the stream to a renderer to receive ARGB/I420 frames for local or remote stream. Be noted if you turned hardware acceleration on, calling this API on remote stream will have no effect.

◆ AttachVideoRenderer() [2/2]

virtual void owt::base::Stream::AttachVideoRenderer ( VideoRenderWindow render_window)
virtual

Attach the stream to a renderer to receive frames from decoder. Both I420 frame and native surface is supported.

◆ Attributes()

virtual const std::unordered_map<std::string, std::string> owt::base::Stream::Attributes ( ) const
inlinevirtual

Returns a user-defined attribute map.

These attributes are defined by publisher. P2P mode always return empty map because it is not supported yet.

◆ Id()

virtual std::string owt::base::Stream::Id ( ) const
virtual

Get the ID of the stream.

Returns
Stream's ID

◆ Source()

virtual StreamSourceInfo owt::base::Stream::Source ( ) const
virtual

Returns the audio/video source info of the stream.

The source info of video/audio indicates the device source type of video/audio track source. For conference mode, if the video/audio track is from mixed stream, it will be set as kMixed.