Loading...
Searching...
No Matches
ml::ScreenSender< Manifest > Class Template Reference

Typed screen sender — reads config from a manifest struct. More...

#include <Malena/Screen/ScreenSender.h>

Inheritance diagram for ml::ScreenSender< Manifest >:
[legend]

Public Member Functions

 ScreenSender ()
bool isPublishing () const
const std::string & senderName () const
void setCaptureIndex (int index)
void setCaptureWindow (unsigned int windowId)
void setUrl (const std::string &rtspUrl)
void setWindowHelperPath (const std::string &path)
void start ()
void stop ()
const std::string & url () const

Detailed Description

template<typename Manifest>
class ml::ScreenSender< Manifest >

Typed screen sender — reads config from a manifest struct.

struct AdminShareManifest {
static constexpr const char* name = "Admin desktop";
static constexpr const char* url = "rtsp://192.168.4.1:8554/admin";
};
share.start();
const std::string & url() const
Typed screen sender — reads config from a manifest struct.

Definition at line 113 of file ScreenSender.h.

Constructor & Destructor Documentation

◆ ScreenSender()

template<typename Manifest>
ml::ScreenSender< Manifest >::ScreenSender ( )
inline

Definition at line 116 of file ScreenSender.h.

Member Function Documentation

◆ isPublishing()

bool ml::ScreenSenderBase::isPublishing ( ) const
inherited

True while the pipeline is live (PLAYING with no recent error).

◆ senderName()

const std::string & ml::ScreenSenderBase::senderName ( ) const
inherited

◆ setCaptureIndex()

void ml::ScreenSenderBase::setCaptureIndex ( int index)
inherited

Choose which display (monitor) to capture. macOS: avfvideosrc device-index; Windows: d3d11screencapturesrc monitor-index; Linux currently ignores it (whole primary screen). Restarts if running. Default 0 (primary display). Also selects whole-display capture mode (the default).

◆ setCaptureWindow()

void ml::ScreenSenderBase::setCaptureWindow ( unsigned int windowId)
inherited

Capture a single window instead of a whole display (macOS only). Streams via an external helper (set with setWindowHelperPath) that uses ScreenCaptureKit, since the built-in GStreamer screen sources can only grab a full display. If no helper is configured, falls back to whole-display capture. Restarts if running.

Parameters
windowIdNative window id (macOS CGWindowID / SCWindow.windowID).

◆ setUrl()

void ml::ScreenSenderBase::setUrl ( const std::string & rtspUrl)
inherited

Change the publish destination. Restarts the pipeline if running, so the caller can derive the URL at runtime (e.g. from a configured media host) rather than fixing it at construction. No-op if unchanged.

◆ setWindowHelperPath()

void ml::ScreenSenderBase::setWindowHelperPath ( const std::string & path)
inherited

Path to the per-window capture helper executable (e.g. LockInWindowCapture). Spawned with --window-id <id> --url <url> when in window-capture mode.

◆ start()

void ml::ScreenSenderBase::start ( )
inherited

Start (or restart) capturing + publishing. Non-blocking.

◆ stop()

void ml::ScreenSenderBase::stop ( )
inherited

Stop publishing and release the pipeline.

◆ url()

const std::string & ml::ScreenSenderBase::url ( ) const
inherited

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