The Source base class.
More...
#include <source.h>
◆ Ptr
◆ SourcePtr
◆ Type
The Source type.
Enumerator |
---|
DEVICE | Hardware sources, camera, playback devices, ...
|
MONITOR | Fullscreen capture source
|
APP | Application screen capture source
|
MIC | Microphone devices source
|
NDI | Ndi sources (input and output)
|
DECKLINK | DeckLink devices sources (input and output)
|
TVOS | tvOS devices sources (output only)
|
CUSTOM | Provide your own audio/video data
|
◆ ~Source()
◆ Source()
◆ id()
Get the id of the source.
- Returns
- The id of the source
◆ is_capturing()
virtual MILLICAST_API bool millicast::Source::is_capturing |
( |
| ) |
const |
|
pure virtual |
◆ name()
MILLICAST_API const std::string & millicast::Source::name |
( |
| ) |
const |
Get the name of the source.
- Returns
- The name of the source
◆ set_track_name()
MILLICAST_API void millicast::Source::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.
- Parameters
-
track_name | Name of the track |
◆ start_capture()
Start a capture from this source, this will init and start the capture device and create the corresponding track.
- Returns
- The track corresponding to this source. The source's must keep the ownership of the track pointer, that is why the track is returned as a weak_ptr
Implemented in millicast::CustomAudioSource, and millicast::CustomVideoSource.
◆ stop_capture()
◆ track_name()
MILLICAST_API const std::string & millicast::Source::track_name |
( |
| ) |
const |
Get the name of the track. If you did not set one, it will be the default one.
- Returns
- The name of the track.
◆ type()
template<typename T = Type>
T millicast::Source::type |
( |
| ) |
const |
Get the video source's type.
- Template Parameters
-
T | Get the source's type in the specified type. Supported value are std::string or Source::Type. The default is Source::Type |
◆ unique_id()
MILLICAST_API const std::string & millicast::Source::unique_id |
( |
| ) |
const |
Get the source's unique_id.
- Returns
- The unique id of the source
◆ AudioPlayback
The documentation for this class was generated from the following file: