MillicastSDK 2.0.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
millicast::VideoSource Class Reference

The VideoSource class. More...

#include <source.h>

Inheritance diagram for millicast::VideoSource:
Inheritance graph
[legend]
Collaboration diagram for millicast::VideoSource:
Collaboration graph
[legend]

Classes

struct  Builder
 The Builder struct to build a video source. More...
 

Public Types

using Ptr = Source::SourcePtr< VideoSource >
 
- Public Types inherited from millicast::Source
enum class  Type {
  DEVICE , MONITOR , APP , MIC ,
  NDI , DECKLINK , TVOS , CUSTOM
}
 The Source type. More...
 
template<typename T >
using SourcePtr = std::shared_ptr< T >
 
using Ptr = SourcePtr< Source >
 

Public Member Functions

MILLICAST_API const std::vector< VideoCapabilities > & capabilities () const
 Get the source's capabilities.
 
MILLICAST_API void set_capabilities (std::vector< VideoCapabilities > &capabilities)
 
MILLICAST_API const VideoCapabilitiescapability () const
 Get the current capability of the source.
 
MILLICAST_API void set_capability (const VideoCapabilities &capability)
 Set the capability to use for the capture.
 
MILLICAST_API void set_capability (VideoCapabilities &&capability)
 
virtual MILLICAST_API void change_video_source (bool ascending, const std::string &unique_device_id="")
 
 ~VideoSource () override=default
 
- Public Member Functions inherited from millicast::Source
template<typename T = Type>
type () const
 Get the video source's type.
 
MILLICAST_API int id () const
 Get the id of the source.
 
MILLICAST_API const std::string & name () const
 Get the name of the source.
 
MILLICAST_API const std::string & unique_id () const
 Get the source's unique_id.
 
MILLICAST_API void set_track_name (std::string track_name)
 Set the name of the track. The name of the track is the name used to identify the track in the SDP.
 
MILLICAST_API const std::string & track_name () const
 Get the name of the track. If you did not set one, it will be the default one.
 
virtual MILLICAST_API std::weak_ptr< Trackstart_capture ()=0
 Start a capture from this source, this will init and start the capture device and create the corresponding track.
 
virtual MILLICAST_API void stop_capture ()=0
 Stop a capture adn release the track and the underlying devices.
 
virtual MILLICAST_API bool is_capturing () const =0
 Tell is the source is currently capturing.
 
virtual MILLICAST_API ~Source ()=default
 

Protected Member Functions

 Source (const SourceInformation &information) noexcept
 
- Protected Member Functions inherited from millicast::Source
 Source (const SourceInformation &information) noexcept
 

Protected Attributes

std::vector< VideoCapabilities_capabilities
 
VideoCapabilities _capability
 

Detailed Description

The VideoSource class.

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ ~VideoSource()

millicast::VideoSource::~VideoSource ( )
overridedefault

Member Function Documentation

◆ capabilities()

MILLICAST_API const std::vector< VideoCapabilities > & millicast::VideoSource::capabilities ( ) const

Get the source's capabilities.

Returns
The source's capabilities.

◆ capability()

MILLICAST_API const VideoCapabilities & millicast::VideoSource::capability ( ) const

Get the current capability of the source.

Returns
The current capability.

◆ change_video_source()

virtual MILLICAST_API void millicast::VideoSource::change_video_source ( bool  ascending,
const std::string &  unique_device_id = "" 
)
inlinevirtual

◆ set_capabilities()

MILLICAST_API void millicast::VideoSource::set_capabilities ( std::vector< VideoCapabilities > &  capabilities)

◆ set_capability() [1/2]

MILLICAST_API void millicast::VideoSource::set_capability ( const VideoCapabilities capability)

Set the capability to use for the capture.

Parameters
capabilityThe capability.
Remarks
Must be called before start_capture.

◆ set_capability() [2/2]

MILLICAST_API void millicast::VideoSource::set_capability ( VideoCapabilities &&  capability)

◆ Source()

millicast::Source::Source ( const SourceInformation information)
protectednoexcept

Member Data Documentation

◆ _capabilities

std::vector<VideoCapabilities> millicast::VideoSource::_capabilities
protected

◆ _capability

VideoCapabilities millicast::VideoSource::_capability
protected

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