C++ SDK Methods
Meeting
The Meeting constructor creates a new meeting instance. A MeetingConfig struct is passed into it to configure the meeting.
MeetingConfig
The MeetingConfig struct holds the meeting ID, authentication token, and the local participant's display name.
Properties
| Property | Type | Description |
|---|---|---|
meetingId | std::string | The meeting/room ID to connect to. |
token | std::string | The authentication token from VideoSDK dashboard. |
name | std::string | The display name for the local participant. |
Example
videosdk::MeetingConfig config;
config.meetingId = "MEETING_ID";
config.token = "TOKEN";
config.name = "Raspberry Pi";
videosdk::Meeting meeting(config);
join()
The join method connects the local participant to the meeting session.
Parameters
- void
Example
meeting.join(); // Connect the local participant to the meeting session
leave()
The leave method disconnects the local participant from the meeting and releases the session.
Parameters
- void
Example
meeting.leave(); // Leave the meeting and end the session
enableMic()
The enableMic method starts capturing audio from the device microphone (via PulseAudio) and sends the audio stream to other participants.
Parameters
- source_name
- type:
std::string OPTIONAL(default:"default")- The PulseAudio source to capture audio from.
- type:
Example
meeting.enableMic(); // Start capturing and sending microphone audio
disableMic()
The disableMic method stops capturing audio from the microphone and stops sending the audio stream to other participants.
Parameters
- void
Example
meeting.disableMic(); // Stop capturing and sending microphone audio
enableCamera()
The enableCamera method starts capturing video from a V4L2 camera device and sends the video stream to other participants.
Parameters
- device_path
- type:
std::string OPTIONAL(default:"/dev/video0")- The V4L2 camera device to capture from.
- type:
- width
- type:
int OPTIONAL(default:640)- Capture width in pixels.
- type:
- height
- type:
int OPTIONAL(default:480)- Capture height in pixels.
- type:
- fps
- type:
int OPTIONAL(default:30)- Capture frame rate (frames per second).
- type:
Example
meeting.enableCamera(); // Start capturing and sending camera video
disableCamera()
The disableCamera method stops capturing video from the camera and stops sending the video stream to other participants.
Parameters
- void
Example
meeting.disableCamera(); // Stop capturing and sending camera video
enableSpeaker()
The enableSpeaker method enables audio playback, allowing the device to play received audio streams from other participants.
Parameters
- void
Example
meeting.enableSpeaker(); // Start playing back audio received from other participants
disableSpeaker()
The disableSpeaker method disables audio playback so received audio streams are no longer played on the device.
Parameters
- void
Example
meeting.disableSpeaker(); // Stop playing back received audio
enableVideoDisplay()
The enableVideoDisplay method enables video rendering via SDL2, allowing the device to display received video streams from other participants.
Parameters
- width_hint
- type:
int OPTIONAL(default:1280)- Suggested width of the display window in pixels.
- type:
- height_hint
- type:
int OPTIONAL(default:720)- Suggested height of the display window in pixels.
- type:
- force_fullscreen
- type:
bool OPTIONAL(default:false)- Open the display window in fullscreen mode.
- type:
Example
meeting.enableVideoDisplay(); // Start rendering video received from other participants
disableVideoDisplay()
The disableVideoDisplay method stops rendering received video streams and closes the SDL2 display window.
Parameters
- void
Example
meeting.disableVideoDisplay(); // Stop rendering received video
Got a Question? Ask us on discord

