Class WebRTCStreamer#
Defined in File webrtc_streamer.ixx
Nested Relationships#
Nested Types#
Class Documentation#
-
class WebRTCStreamer#
Public Functions
-
WebRTCStreamer()#
-
~WebRTCStreamer()#
-
WebRTCStreamer(const WebRTCStreamer&) = delete#
-
auto operator=(const WebRTCStreamer&) -> WebRTCStreamer& = delete#
-
WebRTCStreamer(WebRTCStreamer&&) noexcept#
-
auto operator=(WebRTCStreamer&&) noexcept -> WebRTCStreamer&#
-
auto configure(const StreamConfig &config) -> std::expected<void, WebRTCError>#
-
auto start() -> std::expected<void, WebRTCError>#
-
auto stop() -> std::expected<void, WebRTCError>#
-
auto pause() -> std::expected<void, WebRTCError>#
-
auto resume() -> std::expected<void, WebRTCError>#
-
auto get_state() const -> StreamState#
-
auto is_streaming() const -> bool#
-
auto get_producer_id() const -> std::string#
-
auto set_state_callback(StateCallback callback) -> void#
-
auto set_error_callback(ErrorCallback callback) -> void#
-
auto set_bitrate(std::uint32_t bitrate_kbps) -> std::expected<void, WebRTCError>#
Public Static Functions
-
static auto initialize(int *argc = nullptr, char ***argv = nullptr) -> std::expected<void, WebRTCError>#
-
static auto deinitialize() -> void#
-
struct Impl#
Public Functions
-
inline ~Impl()#
-
inline void cleanup()#
-
inline void set_state(StreamState new_state)#
-
inline void report_error(WebRTCError error, const std::string &message = "")#
-
inline auto build_source_element() const -> std::string#
-
inline auto build_pipeline_description() -> std::string#
Public Members
-
StreamConfig config#
-
GstElement *pipeline = {nullptr}#
-
GstElement *webrtcsink = {nullptr}#
-
GMainLoop *main_loop = {nullptr}#
-
std::thread main_loop_thread#
-
std::atomic<StreamState> state = {StreamState::Idle}#
-
StateCallback state_callback#
-
ErrorCallback error_callback#
-
std::string producer_id#
-
std::mutex callback_mutex#
Public Static Functions
-
static inline auto on_bus_error(GstBus*, GstMessage *msg, gpointer user_data) -> gboolean#
-
static inline auto on_bus_state_changed(GstBus*, GstMessage *msg, gpointer user_data) -> gboolean#
-
static inline auto on_bus_eos(GstBus*, GstMessage*, gpointer user_data) -> gboolean#
-
static inline auto on_bus_element(GstBus*, GstMessage *msg, gpointer user_data) -> gboolean#
-
inline ~Impl()#
-
WebRTCStreamer()#