![]() |
Intel® Collaboration Suite for WebRTC
version 4.3.1
Open WebRTC Toolkit (OWT) Client SDK for Windows*
|
This class represents a local stream. More...
#include <owt/base/stream.h>
Public Member Functions | |
virtual void | Attributes (const std::unordered_map< std::string, std::string > &attributes) |
Set a user-defined attribute map. More... | |
void | Close () |
Close a local stream. More... | |
virtual const std::unordered_map< std::string, std::string > | Attributes () const |
Returns a user-defined attribute map. More... | |
![]() | |
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. | |
Static Public Member Functions | |
static std::shared_ptr< LocalStream > | Create (const LocalCameraStreamParameters ¶meters, int &error_code) |
Create a local camera stream. This creates a local camera stream with specified device settings. More... | |
static std::shared_ptr< LocalStream > | Create (const bool is_audio_enabled, webrtc::VideoTrackSourceInterface *video_source, int &error_code) |
Create a local camera stream with video track source. This creates a local camera stream with specified video track source. More... | |
static std::shared_ptr< LocalStream > | Create (std::shared_ptr< LocalCustomizedStreamParameters > parameters, std::unique_ptr< VideoFrameGeneratorInterface > framer) |
Initialize a LocalCustomizedStream with parameters and frame generator. More... | |
static std::shared_ptr< LocalStream > | Create (std::shared_ptr< LocalCustomizedStreamParameters > parameters, VideoEncoderInterface *encoder) |
static std::shared_ptr< LocalStream > | Create (std::shared_ptr< LocalDesktopStreamParameters > parameters, std::unique_ptr< LocalScreenStreamObserver > observer) |
Initialize a local screen stream with parameters. More... | |
This class represents a local stream.
A local stream can be published to remote side.
|
inline |
Returns a user-defined attribute map.
These attributes are defined by publisher. P2P mode always return empty map because it is not supported yet.
|
inlinevirtual |
Set a user-defined attribute map.
Remote user can get attribute map by calling Attributes(). P2P mode does not support setting attributes.
void owt::base::LocalStream::Close | ( | ) |
Close a local stream.
This will remote all tracks on the stream, and detach any sink previously attached.
|
static |
Create a local camera stream. This creates a local camera stream with specified device settings.
parameters | Local camera stream settings for stream creation. |
error_code | Error code will be set if creation fails. |
|
static |
Create a local camera stream with video track source. This creates a local camera stream with specified video track source.
is_audio_enabled | If audio is enabled in the stream. |
video_source | Pointer to VideoTrackSourceInterface used for stream creation. |
error_code | Error code will be set if creation fails. |
|
static |
Initialize a LocalCustomizedStream with parameters and frame generator.
The input of the video stream MUST be YUV frame if initializing with frame generator.
parameters | Parameters for creating the stream. The stream will not be impacted if changing parameters after it is created. |
framer | Pointer to an instance implemented VideoFrameGeneratorInterface. This instance will be destroyed by SDK when stream is closed. |
|
static |
a local customized stream with parameters and encoder interface.
The input of the video stream MUST be encoded frame if initializing with video encoder interface.
parameters | Parameters for creating the stream. The stream will not be impacted if changing parameters after it is created. |
encoder | Pointer to an instance implementing VideoEncoderInterface. |
|
static |
Initialize a local screen stream with parameters.
parameters | Parameters for creating the stream. The stream will not be impacted if changing parameters after it is created. |
observer | Source callback required for application to specify capture window/screen source. |