screen.h(3)Bark

NAME

screen.h - Bark screen-sharing session management and capture source listing.

SYNOPSIS

Classes

struct bark_screen_cfg

Screen-share capture and encoding parameters.

Typedefs

typedef struct bark_screen bark_screen_t

Opaque screen-share controller handle.

typedef struct bark_screen_cfg bark_screen_cfg_t

Screen-share capture and encoding parameters.

typedef void(* bark_screen_local_fn) (void *user, int active, uint16_t w, uint16_t h, int rc)

Main-thread lifecycle callback invoked when local screen sharing starts, resizes, stops, or fails to start (rc != BARK_OK).

Functions

bark_screen_t * bark_screen_create (struct bark_rtc *rtc, struct bark_view *view, int headless, bark_screen_local_fn on_local, void *user)

Create a screen-share controller wired to rtc and view.

void bark_screen_destroy (bark_screen_t *scr)

Stop sharing and destroy the controller.

uint32_t bark_screen_caps (const bark_screen_t *scr)

Query capture provider capability flags (BARK_CAPTURE_FLAG_OS_PICKER, BARK_CAPTURE_FLAG_ENUM_SOURCES).

int bark_screen_list_sources (const bark_screen_t *scr, bark_capture_source_t *out, uint32_t max_count)

Enumerate selectable monitors and windows into out. Returns count or negative bark_err_t.

int bark_screen_start (bark_screen_t *scr, const bark_screen_cfg_t *cfg)

Start local screen sharing with cfg. Returns BARK_OK or BARK_ERR_UNAVAILABLE if denied.

int bark_screen_update (bark_screen_t *scr, const bark_screen_cfg_t *cfg)

Update live resolution, FPS, or bitrate of an active screen share.

void bark_screen_stop (bark_screen_t *scr)

Stop local screen sharing and clear the local preview source.

void bark_screen_poll (bark_screen_t *scr)

Pump pending local capture state transitions and frame uploads on the main thread.

int bark_screen_is_active (const bark_screen_t *scr)

Return non-zero if local screen sharing is currently active.

void bark_screen_push_remote_rgba (bark_screen_t *scr, const char *peer_id, const uint8_t *rgba, uint16_t w, uint16_t h)

Submit a decoded remote RGBA8 video frame for peer_id.

void bark_screen_clear_remote (bark_screen_t *scr, const char *peer_id)

Clear the remote video source associated with peer_id.

void bark_screen_bind_slot (bark_screen_t *scr, const char *slot_id, const char *source_key)

Bind a DOM <video id=...">elementtoanamedsourcekey(e.g."local"orpeer_id).

Detailed Description

Bark screen-sharing session management and capture source listing.

High-level screen-sharing controller bridging capture, WebRTC, and view video slots.

Orchestrates local screen capture -> VP8 WebRTC publishing -> local preview, remote video frame intake, and declarative <video id="..."> slot bindings.

Author

Generated automatically by Doxygen for Bark from the source code.