1#ifndef MILLICAST_API_SOURCE_H
2#define MILLICAST_API_SOURCE_H
68 template <
typename T = Type>
142 std::string _unique_id;
143 std::string _track_name;
168 std::vector<VideoCapabilities>
205 const
std::
string& unique_device_id = ""){};
296 std::weak_ptr<Track> start_capture()
override = 0;
297 void stop_capture()
override = 0;
298 [[nodiscard]]
bool is_capturing()
const override = 0;
The AudioControl class.
Definition source.h:221
virtual void set_volume(uint32_t v)=0
Set the microphone / speaker volume.
virtual bool is_muted() const =0
Tell whether the mic / speaker is muted or not.
virtual void mute(bool m)=0
Mute the microphone or the speakers.
virtual uint32_t get_volume()=0
Get the current volume.
virtual void set_num_channel(uint8_t n)=0
Set the number of channels to use.
The AudioPlayback class.
Definition source.h:294
Source::SourcePtr< AudioPlayback > Ptr
Definition source.h:301
The AudioSource class.
Definition source.h:265
Source::SourcePtr< AudioSource > Ptr
Definition source.h:267
Source::SourcePtr< CustomAudioSource > Ptr
Definition source.h:337
Source::SourcePtr< CustomVideoSource > Ptr
Definition source.h:372
The Source base class.
Definition source.h:31
MILLICAST_API int id() const
Get the id of the source.
Type
The Source type.
Definition source.h:39
virtual MILLICAST_API std::weak_ptr< Track > start_capture()=0
Start a capture from this source, this will init and start the capture device and create the correspo...
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.
virtual MILLICAST_API bool is_capturing() const =0
Tell is the source is currently capturing.
SourcePtr< Source > Ptr
Definition source.h:53
virtual MILLICAST_API void stop_capture()=0
Stop a capture adn release the track and the underlying devices.
MILLICAST_API const std::string & name() const
Get the name of the source.
Source(const SourceInformation &information) noexcept
T type() const
Get the video source's type.
MILLICAST_API const std::string & unique_id() const
Get the source's unique_id.
std::shared_ptr< T > SourcePtr
Definition source.h:51
virtual MILLICAST_API ~Source()=default
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.
The Track class represent a media sources.
Definition track.h:32
The VideoCapabilities struct.
Definition capabilities.h:145
The VideoFrame class used to described a VideoFrame.
Definition frames.h:15
The VideoSource class.
Definition source.h:159
Source::SourcePtr< VideoSource > Ptr
Definition source.h:161
MILLICAST_API void set_capability(const VideoCapabilities &capability)
Set the capability to use for the capture.
VideoCapabilities _capability
Definition source.h:212
MILLICAST_API const VideoCapabilities & capability() const
Get the current capability of the source.
~VideoSource() override=default
virtual MILLICAST_API void change_video_source(bool ascending, const std::string &unique_device_id="")
Definition source.h:203
MILLICAST_API void set_capabilities(std::vector< VideoCapabilities > &capabilities)
std::vector< VideoCapabilities > _capabilities
Definition source.h:211
#define MILLICAST_API
Definition exports.h:51
Definition capabilities.h:15
The AudioFrame struct used to described audio data.
Definition frames.h:105
The Builder struct to build an AudioPlayback.
Definition source.h:307
MILLICAST_API Builder() noexcept=default
The Builder struct to build an audio source.
Definition source.h:272
MILLICAST_API Builder() noexcept=default
Builder struct to create a CustomSource.
Definition source.h:341
MILLICAST_API Builder() noexcept
Builder struct to create a CustomVideoSource.
Definition source.h:376
MILLICAST_API Builder() noexcept
The Builder struct to build a video source.
Definition source.h:167
std::vector< VideoCapabilities > capabilities
Definition source.h:169
MILLICAST_API Ptr build() noexcept
Create a new video source.
MILLICAST_API Builder() noexcept=default