### Start Camera Preview Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/PreviewVideoHandler.md Starts the camera preview stream by calling IZoomVideoSDKVideoHelper::startVideoPreview. Returns false if the SDK is unavailable or the preview fails to start. ```cpp PreviewVideoHandler* preview = new PreviewVideoHandler(renderer); if (!preview->StartPreview()) { printf("Failed to start preview, error code logged\n"); delete preview; } ``` -------------------------------- ### Start Camera Preview Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Use this snippet to start a camera preview using the PreviewVideoHandler. Ensure a renderer is initialized. ```cpp PreviewVideoHandler* preview = new PreviewVideoHandler(renderer); preview->StartPreview(); ``` -------------------------------- ### Install Build Prerequisites Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Install necessary development packages for building the Video SDK on Linux, including build-essential, CMake, GTKMM, SDL2, ALSA, and libcurl. ```bash sudo apt install build-essential cmake libgtkmm-3.0-dev libsdl2-dev libasound2-dev libcurl4-openssl-dev ``` -------------------------------- ### Typical Zoom Video SDK Usage Example Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md This example demonstrates the complete lifecycle of using the Zoom Video SDK, from initialization and setting up delegates to joining a session and running the application's main loop. It covers essential steps for integrating the SDK into a GTK-based application. ```cpp int main() { // 1. Initialize SDK IZoomVideoSDK* sdk = CreateZoomVideoSDKObj(); ZoomVideoSDKInitParams init_params; init_params.domain = "https://zoom.us"; init_params.enableLog = true; sdk->initialize(init_params); ZoomVideoSDKDelegate delegate; sdk->setDelegate(&delegate); // 2. Setup UI (GTK) Gtk::Application app(0, nullptr); // ... create UI ... // 3. User joins session ZoomVideoSDKSessionContext ctx; ctx.sessionName = "my-session"; ctx.userName = "Alice"; ctx.token = "jwt_token_here"; sdk->joinSession(ctx); // 4. SDK calls delegate callbacks // onSessionJoin() → setup audio/video // onUserJoin() → log users // onUserVideoStatusChanged() → subscribe to remote video // onMixedAudioRawDataReceived() → play audio // 5. Run GTK main loop int status = app.run(); // 6. Cleanup sdk->leaveSession(); return status; } ``` -------------------------------- ### Install Ubuntu/Debian Dependencies Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Installs necessary development libraries for building the Zoom Video SDK application on Ubuntu/Debian systems. ```bash sudo apt update sudo apt install build-essential cmake sudo apt install libgtkmm-3.0-dev libsdl2-dev sudo apt install libglib2.0-dev libasound2-dev libcurl4-openssl-dev ``` -------------------------------- ### Install ALSA Development Headers Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Install ALSA development headers if encountering build errors related to missing ALSA. ```bash # Missing ALSA development headers sudo apt install libasound2-dev ``` -------------------------------- ### Install CMake Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Install CMake if encountering build errors related to missing CMake. ```bash # Missing CMake sudo apt install cmake ``` -------------------------------- ### Verify SDL2 Installation Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Confirm the SDL2 installation and version using pkg-config. ```bash # Verify SDL2 installation pkg-config --modversion sdl2 ``` -------------------------------- ### Install GTK Development Headers Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Install GTK development headers if encountering build errors related to missing GTK. ```bash # Missing GTK development headers sudo apt install libgtkmm-3.0-dev ``` -------------------------------- ### Install SDL2 Development Headers Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Install SDL2 development headers if encountering build errors related to missing SDL2. ```bash # Missing SDL2 development headers sudo apt install libsdl2-dev ``` -------------------------------- ### Install CentOS/RHEL/Fedora Dependencies Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Installs necessary development libraries for building the Zoom Video SDK application on CentOS/RHEL/Fedora systems. ```bash sudo yum groupinstall "Development Tools" sudo yum install cmake gtkmm30-devel SDL2-devel sudo yum install glib2-devel alsa-lib-devel libcurl-devel ``` -------------------------------- ### Install cURL Development Headers Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Install cURL development headers if encountering build errors related to missing cURL. ```bash # Missing cURL development headers sudo apt install libcurl4-openssl-dev ``` -------------------------------- ### Initialize PreviewVideoHandler Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/PreviewVideoHandler.md Creates an instance of PreviewVideoHandler, requiring a VideoRenderer to display the preview. The preview does not start automatically. ```cpp VideoRenderer* renderer = new VideoRenderer(); renderer->Init(); renderer->CreateEmbeddedRenderer(drawing_area); PreviewVideoHandler* preview = new PreviewVideoHandler(renderer); if (preview->StartPreview()) { printf("Camera preview started\n"); } ``` -------------------------------- ### Initialize Global SDK Object Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/types.md Example of how to initialize the global IZoomVideoSDK object using CreateZoomVideoSDKObj(). ```cpp video_sdk_obj = CreateZoomVideoSDKObj(); ``` -------------------------------- ### Build and Run the Video SDK Application Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Compile the SDK source code using CMake and make, then run the SkeletonDemo executable. Ensure all build prerequisites are installed. ```bash # Build cd src mkdir build && cd build cmake .. make # Run cd ../bin ./SkeletonDemo ``` -------------------------------- ### Session Configuration Example Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Edit src/bin/config.json to set session name, password, and JWT token. ```json { "session_name": "learning-session-001", "session_psw": "", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } ``` -------------------------------- ### StartPreview Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/PreviewVideoHandler.md Starts the camera preview stream by calling the Zoom SDK's video preview function. Returns true on success and false on failure. ```APIDOC ## StartPreview ### Description Starts the camera preview stream. This method calls `IZoomVideoSDKVideoHelper::startVideoPreview(this)` to subscribe the handler as a raw data pipe delegate. It returns early with `false` if the video SDK object or the video renderer is null. The `is_preview_active_` flag is set to `true` upon successful start. ### Signature ```cpp bool StartPreview() ``` ### Parameters No parameters. ### Return Type `bool` - Returns `true` on success, `false` if the SDK is unavailable or the preview start fails. ### Example ```cpp PreviewVideoHandler* preview = new PreviewVideoHandler(renderer); if (!preview->StartPreview()) { printf("Failed to start preview, error code logged\n"); delete preview; } ``` ``` -------------------------------- ### Build Application with CMake Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md These bash commands navigate to the source directory, create a build directory, and then use CMake to configure and build the application. Ensure you have CMake installed. ```bash cd src && mkdir build && cd build cmake .. make ``` -------------------------------- ### Configuration File Example Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md This JSON file contains essential session details including the session name, JWT token, and an optional password. Ensure the token is valid and has a future expiration. ```json { "session_name": "my-session", "token": "your_generated_jwt_token", "session_psw": "" } ``` -------------------------------- ### Install Ubuntu/Debian Build Dependencies Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md Installs essential build tools, CMake, GTKmm, SDL2, GLib, ALSA, and cURL development libraries on Ubuntu/Debian systems. ```bash # Ubuntu/Debian sudo apt install build-essential cmake sudo apt install libgtkmm-3.0-dev libsdl2-dev sudo apt install libglib2.0-dev libasound2-dev libcurl4-openssl-dev sudo apt install pkg-config ``` -------------------------------- ### Check GTK Version Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Verify the installed GTK version using pkg-config. ```bash # Check GTK version pkg-config --modversion gtk+-3.0 ``` -------------------------------- ### PreviewVideoHandler Constructor Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/PreviewVideoHandler.md Initializes the PreviewVideoHandler with a VideoRenderer to display camera preview frames. The preview does not start automatically. ```APIDOC ## PreviewVideoHandler Constructor ### Description Creates a camera preview handler and initializes it with a renderer target. The preview is not started automatically; `StartPreview()` must be called explicitly. ### Signature ```cpp PreviewVideoHandler(VideoRenderer* renderer) ``` ### Parameters #### Path Parameters - **renderer** (`VideoRenderer*`) - Required - The VideoRenderer instance to which preview frames will be displayed. ### Return Type Instance of PreviewVideoHandler ### Example ```cpp VideoRenderer* renderer = new VideoRenderer(); renderer->Init(); renderer->CreateEmbeddedRenderer(drawing_area); PreviewVideoHandler* preview = new PreviewVideoHandler(renderer); if (preview->StartPreview()) { printf("Camera preview started\n"); } ``` ``` -------------------------------- ### Install CentOS/RHEL/Fedora Build Dependencies Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md Installs essential build tools, CMake, GTKmm, SDL2, GLib, ALSA, and cURL development libraries on CentOS/RHEL/Fedora systems. ```bash # CentOS/RHEL/Fedora sudo yum groupinstall "Development Tools" sudo yum install cmake gtkmm30-devel SDL2-devel sudo yum install glib2-devel alsa-lib-devel libcurl-devel ``` -------------------------------- ### Display Self-View using Preview Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Starts a local video preview for self-view using a simpler approach. Requires a renderer object. ```cpp PreviewVideoHandler* preview = new PreviewVideoHandler(renderer); if (preview->StartPreview()) { printf("Self-view started\n"); } ``` -------------------------------- ### Start Camera Preview Before Session Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/PreviewVideoHandler.md Initialize and display a camera preview using PreviewVideoHandler before joining a session. Ensure the VideoRenderer is properly initialized and attached to the drawing area. ```cpp void on_show_preview_clicked() { VideoRenderer* preview_renderer = new VideoRenderer(); preview_renderer->Init(); preview_renderer->CreateEmbeddedRenderer(preview_drawing_area); g_preview_handler = new PreviewVideoHandler(preview_renderer); if (!g_preview_handler->StartPreview()) { printf("Camera not available\n"); delete g_preview_handler; g_preview_handler = nullptr; } } ``` -------------------------------- ### Session Name Examples Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md Provides example values for the session_name field. This identifier is case-sensitive and can contain alphanumeric characters, hyphens, and underscores. ```json "session_name": "learning-session-001" ``` ```json "session_name": "team-meeting-2024" ``` ```json "session_name": "demo-call-abc123" ``` -------------------------------- ### JWT Token Example Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md An example of a JWT token used for authenticating with the Zoom Video SDK. The token must be valid and not expired. ```json "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ``` -------------------------------- ### Session Join Flow Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md Illustrates the sequence of events and delegate callbacks when a user joins a session. It covers audio initialization, video setup, and UI updates. ```text User clicks "Join" ↓ ZoomVideoSDKDelegate::onSessionJoin() ├─ Audio: Initialize AudioPlayback ├─ Video: Setup self-view (PreviewVideoHandler or ZoomVideoRenderer) └─ UI: Update button states ↓ ZoomVideoSDKDelegate::onUserJoin() └─ Log remote user(s) ↓ ZoomVideoSDKDelegate::onUserVideoStatusChanged() └─ Create RemoteVideoRawDataHandler for remote video ``` -------------------------------- ### Configuration JSON Example Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md This JSON snippet defines the configuration parameters for a session, including the session name, authentication token, and an optional password. Ensure the token is valid for authentication. ```json { "session_name": "my-session", "token": "jwt_token_here", "session_psw": "" } ``` -------------------------------- ### Start Self-View Display Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/ZoomVideoRenderer.md Initiates the display of the local user's video feed. Requires a valid IZoomVideoSDKSession and IZoomVideoSDKUser object. The renderer is subscribed to the local user with a 720P resolution. ```cpp void on_session_join() { IZoomVideoSDKSession* session = video_sdk_obj->getSessionInfo(); IZoomVideoSDKUser* myself = session->getMyself(); g_self_renderer = new ZoomVideoRenderer(self_video_renderer); if (g_self_renderer->SubscribeToUser(myself, ZoomVideoSDKResolution_720P)) { printf("Self-view display started\n"); } } ``` -------------------------------- ### Video Helper Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md Provides methods to control video-related functionalities, such as starting video, selecting cameras, and managing video renderers. ```APIDOC ## Video Helper ### Get Video Helper #### Description Retrieves an interface for managing video functionalities. #### Method ```cpp IZoomVideoSDKVideoHelper* videoHelper = video_sdk_obj->getVideoHelper(); ``` ### Start Video #### Description Starts the local user's video. #### Method ```cpp videoHelper->startVideo(); ``` ### Select Camera #### Description Selects the camera to be used for video. #### Method ```cpp videoHelper->selectCamera(camera_id); ``` #### Parameters - **camera_id** (string) - The ID of the camera to select. ``` -------------------------------- ### Access Zoom Video and Audio Helpers Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md Retrieves helper objects for managing video and audio functionalities. Used for starting video, selecting devices, and controlling audio. ```cpp IZoomVideoSDKVideoHelper* videoHelper = video_sdk_obj->getVideoHelper(); videoHelper->startVideo(); videoHelper->selectCamera(camera_id); IZoomVideoSDKAudioHelper* audioHelper = video_sdk_obj->getAudioHelper(); audioHelper->muteAudio(user); audioHelper->selectMic(mic_id, mic_name); IZoomVideoSDKSession* session = video_sdk_obj->getSessionInfo(); IZoomVideoSDKUser* myself = session->getMyself(); IVideoSDKVector* remoteUsers = session->getRemoteUsers(); ``` -------------------------------- ### Audio Initialization Check Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/AudioPlayback.md Check the return value of the audio initialization function to handle potential errors such as ALSA not being installed, no audio device available, device in use, permission issues, or hardware parameter setting failures. ```cpp if (!audio->init()) { // Possible causes: // - ALSA not installed // - No audio device available // - Device in use // - Permission denied // - Failed to set hardware parameters } ``` -------------------------------- ### Create ZoomVideoRenderer Instance Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/ZoomVideoRenderer.md Initializes a display-only video renderer. Ensure the VideoRenderer is properly initialized and has a drawing area created before passing it to the ZoomVideoRenderer constructor. The renderer starts in an unsubscribed state. ```cpp VideoRenderer* display_renderer = new VideoRenderer(); display_renderer->Init(); display_renderer->CreateEmbeddedRenderer(drawing_area); ZoomVideoRenderer* zoom_renderer = new ZoomVideoRenderer(display_renderer); ``` -------------------------------- ### Full JWT Token Example Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md Illustrates the structure of a complete JWT token, including Header, Payload, and Signature. This token is required for authentication. ```text eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ. SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c ``` -------------------------------- ### Run Zoom Video SDK Demo Application Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Navigates to the binary directory and runs the SkeletonDemo application. ```bash cd ../bin ./SkeletonDemo ``` -------------------------------- ### init() Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/AudioPlayback.md Initializes the ALSA PCM device for audio playback with specific hardware parameters. Returns true on success, false on failure. ```APIDOC ## init() ### Description Initializes ALSA PCM device for playback. ### Parameters No parameters. ### Return Type `bool` — true on successful initialization, false on error ### Throws/Rejects None (errors are logged to stderr) ### Description Opens the default PCM device (`"default"`) for playback, configures hardware parameters, and prepares the device. Configures: - Format: 16-bit signed little-endian PCM (`SND_PCM_FORMAT_S16_LE`) - Channels: 2 (stereo) - Sample Rate: 44,100 Hz (negotiated via `snd_pcm_hw_params_set_rate_near`) - Access Mode: Interleaved (`SND_PCM_ACCESS_RW_INTERLEAVED`) Sets `initialized = true` on success. ### Example ```cpp AudioPlayback* audio = new AudioPlayback(); if (!audio->init()) { printf("Audio initialization failed\n"); delete audio; return false; } printf("Audio playback ready\n"); ``` ``` -------------------------------- ### Initialize and Join Session Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Initializes the Video SDK, sets a delegate for callbacks, and joins a session using provided context. Ensure initialization parameters and session context are correctly configured before calling. ```cpp video_sdk_obj->initialize(init_params); video_sdk_obj->setDelegate(&delegate); ZoomVideoSDKSessionContext ctx = {...}; video_sdk_obj->joinSession(ctx); ``` -------------------------------- ### Initialize Zoom Video SDK Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md Initializes the Zoom Video SDK with necessary parameters. Ensure the domain is correctly set and logging is enabled if needed. ```cpp IZoomVideoSDK* video_sdk_obj = CreateZoomVideoSDKObj(); ZoomVideoSDKInitParams params; params.domain = "https://zoom.us"; params.enableLog = true; video_sdk_obj->initialize(params); ``` -------------------------------- ### Get User by ID Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Retrieves a specific user object by their unique user ID. ```APIDOC ## Get User by ID ### Description Retrieves a specific user object from the session using their user ID. ### Method ```cpp IZoomVideoSDKUser* getUserById(const char* target_id) ``` ### Parameters #### Path Parameters - **target_id** (string) - Required - The unique identifier of the user to retrieve. ### Response Example ```cpp IZoomVideoSDKUser* user = session->getUserById(target_id); if (user) { printf("Found user: %s\n", user->getUserName()); } ``` ``` -------------------------------- ### Get Remote Users Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Retrieves a list of all currently connected remote users in the session. ```APIDOC ## Get Remote Users ### Description Retrieves a list of all remote users currently in the session. ### Method ```cpp IVideoSDKVector* getRemoteUsers() ``` ### Parameters None ### Response Example ```cpp for (int i = 0; i < remote_users->GetCount(); i++) { IZoomVideoSDKUser* user = remote_users->GetItem(i); printf("Remote user %d: %s\n", i, user->getUserName()); } ``` ``` -------------------------------- ### Start/Stop Your Video Transmission Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Controls the transmission of your own video stream, allowing you to start or stop your camera. ```APIDOC ## Start/Stop Your Video Transmission ### Description Allows you to start or stop transmitting your video stream (camera). ### Method ```cpp ZoomVideoSDKErrors startVideo() ZoomVideoSDKErrors stopVideo() ``` ### Parameters None ### Response Example ```cpp // Start video transmission (camera) ZoomVideoSDKErrors err = videoHelper->startVideo(); if (err == ZoomVideoSDKErrors_Success) { printf("Video started\n"); } // Stop video transmission err = videoHelper->stopVideo(); if (err == ZoomVideoSDKErrors_Success) { printf("Video stopped\n"); } ``` ``` -------------------------------- ### Initialize and Play Audio Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Initializes an AudioPlayback object and plays audio data from a buffer. Ensure the buffer and length are valid before playback. ```cpp AudioPlayback* audio = new AudioPlayback(); audio->init(); audio->playAudio(buffer, len); ``` -------------------------------- ### Session Management Methods Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Methods for initializing the SDK, joining and leaving sessions, and retrieving helper objects for session information, video, audio, and chat. ```APIDOC ## Session Management ### Methods - **`sdk->initialize(params)`** - **Parameters**: - **`params`** (InitializationParams object) - Parameters required for SDK initialization. - **Returns**: `ZoomVideoSDKErrors` - The result of the initialization operation. - **`sdk->joinSession(context)`** - **Parameters**: - **`context`** (JoinSessionContext object) - Contextual information for joining a session. - **Returns**: `ZoomVideoSDKErrors` - The result of joining the session. - **`sdk->leaveSession()`** - **Returns**: `ZoomVideoSDKErrors` - The result of leaving the session. - **`sdk->getSessionInfo()`** - **Returns**: `IZoomVideoSDKSession*` - A pointer to the current session information object. - **`sdk->getVideoHelper()`** - **Returns**: `IZoomVideoSDKVideoHelper*` - A pointer to the video helper object. - **`sdk->getAudioHelper()`** - **Returns**: `IZoomVideoSDKAudioHelper*` - A pointer to the audio helper object. - **`sdk->getChatHelper()`** - **Returns**: `IZoomVideoSDKChatHelper*` - A pointer to the chat helper object. ``` -------------------------------- ### Get Current User (Self) Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Retrieves information about the current user, including their name and ID. ```APIDOC ## Get Current User (Self) ### Description Retrieves the current user's information (name and ID) from the session. ### Method ```cpp IZoomVideoSDKUser* getMyself() ``` ### Parameters None ### Response Example ```cpp printf("My name: %s\n", myself->getUserName()); printf("My ID: %s\n", myself->getUserId()); ``` ``` -------------------------------- ### Audio/Video Control Methods Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Methods for controlling the start and stop of video streams, and for muting/unmuting audio for users. ```APIDOC ## Audio/Video Control ### Methods - **`videoHelper->startVideo()`** - **Returns**: `ZoomVideoSDKErrors` - The result of starting the video stream. - **`videoHelper->stopVideo()`** - **Returns**: `ZoomVideoSDKErrors` - The result of stopping the video stream. - **`audioHelper->muteAudio(user)`** - **Parameters**: - **`user`** (User object) - The user whose audio should be muted. - **Returns**: `ZoomVideoSDKErrors` - The result of the mute operation. - **`audioHelper->unMuteAudio(user)`** - **Parameters**: - **`user`** (User object) - The user whose audio should be unmuted. - **Returns**: `ZoomVideoSDKErrors` - The result of the unmute operation. ``` -------------------------------- ### Handle Camera Hot-Swapping Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Responds to camera changes by selecting a new camera and refreshing the video display. Ensure `setupSelfVideo` is called after `selectCamera` to update the view. ```cpp void on_camera_changed() { std::string selectedId = g_camera_combo->get_active_id(); videoHelper->selectCamera(selectedId.c_str()); // Refresh video after camera change cleanupSelfVideo(); setupSelfVideo(); } ``` -------------------------------- ### List Available Microphones Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Get a list of all available microphone devices. This function returns a vector containing microphone devices. ```cpp IZoomVideoSDKAudioHelper* audioHelper = video_sdk_obj->getAudioHelper(); if (!audioHelper) return; IVideoSDKVector* mics = audioHelper->getMicList(); if (mics) { for (int i = 0; i < mics->GetCount(); i++) { IZoomVideoSDKMicDevice* mic = mics->GetItem(i); printf("Microphone %d: %s\n", i, mic->getDeviceName()); } } ``` -------------------------------- ### Get Attached Drawing Area Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/VideoRenderer.md Returns the attached GTK DrawingArea widget. Returns nullptr if the renderer is not attached to a widget. ```cpp Gtk::DrawingArea* GetDrawingArea() const { return m_pDrawingArea; } ``` ```cpp auto drawing_area = renderer.GetDrawingArea(); if (drawing_area) { drawing_area->set_size_request(800, 600); } ``` -------------------------------- ### Initialization Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md Initializes the Zoom Video SDK with provided parameters. This is a crucial first step before calling any other SDK functions. ```APIDOC ## Initialization ### Description Initializes the Zoom Video SDK. This function must be called before any other SDK functions. ### Method ```cpp IZoomVideoSDK* video_sdk_obj = CreateZoomVideoSDKObj(); ZoomVideoSDKInitParams params; params.domain = "https://zoom.us"; params.enableLog = true; video_sdk_obj->initialize(params); ``` ### Parameters #### Initialization Parameters - **params** (ZoomVideoSDKInitParams) - Structure containing initialization parameters. - **domain** (string) - The domain for Zoom services. - **enableLog** (bool) - Flag to enable SDK logging. ``` -------------------------------- ### Initialize and Join Zoom Session Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Initializes the Zoom Video SDK and joins a session. Ensure you have the correct domain and provide a valid token for joining. ```cpp // Initialize the SDK ZoomVideoSDKInitParams init_params; init_params.domain = "https://zoom.us"; init_params.enableLog = true; video_sdk_obj->initialize(init_params); // Join a session ZoomVideoSDKSessionContext session_context; session_context.sessionName = session_name.c_str(); session_context.userName = username.c_str(); session_context.token = signature.c_str(); video_sdk_obj->joinSession(session_context); ``` -------------------------------- ### Get Current Video Resolution Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/VideoDisplayBridge.md Returns the current video resolution that the bridge is subscribed to. This is useful for checking the active stream quality. ```cpp ZoomVideoSDKResolution GetCurrentResolution() const { return current_resolution_; } ``` -------------------------------- ### Get Current Subscribed User Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/RemoteVideoRawDataHandler.md Retrieve a pointer to the currently subscribed remote user. Returns nullptr if no user is currently subscribed. ```cpp if (auto user = handler->GetCurrentUser()) { printf("Displaying: %s\n", user->getUserName()); } ``` -------------------------------- ### AudioPlayback Constructor Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/AudioPlayback.md Creates an uninitialized AudioPlayback instance. You must call init() before playback. ```cpp AudioPlayback* audio = new AudioPlayback(); ``` -------------------------------- ### Start and Stop Video Transmission Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Controls the initiation and termination of the local user's video stream. Use this to manage your camera feed. ```cpp IZoomVideoSDKVideoHelper* videoHelper = video_sdk_obj->getVideoHelper(); if (!videoHelper) return; // Start video transmission (camera) ZoomVideoSDKErrors err = videoHelper->startVideo(); if (err == ZoomVideoSDKErrors_Success) { printf("Video started\n"); } // Stop video transmission err = videoHelper->stopVideo(); if (err == ZoomVideoSDKErrors_Success) { printf("Video stopped\n"); } ``` -------------------------------- ### AudioPlayback Constructor Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/AudioPlayback.md Creates an uninitialized AudioPlayback instance. The init() method must be called before playback can begin. ```APIDOC ## AudioPlayback() ### Description Creates an uninitialized audio playback instance. ### Return Type Instance of AudioPlayback ### Description Initializes PCM handle to nullptr and sets `initialized = false`. Must call `init()` before playback. ### Example ```cpp AudioPlayback* audio = new AudioPlayback(); ``` ``` -------------------------------- ### Get User by ID Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Finds a specific user within the session using their unique ID. Returns a pointer to the user object if found. ```cpp const char* target_id = "user123"; IZoomVideoSDKUser* user = session->getUserById(target_id); if (user) { printf("Found user: %s\n", user->getUserName()); } ``` -------------------------------- ### Get Remote Users List Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Fetches a list of all remote users currently in the session and prints their names. Requires a valid session object. ```cpp IZoomVideoSDKSession* session = video_sdk_obj->getSessionInfo(); if (!session) return; IVideoSDKVector* remote_users = session->getRemoteUsers(); if (remote_users) { for (int i = 0; i < remote_users->GetCount(); i++) { IZoomVideoSDKUser* user = remote_users->GetItem(i); printf("Remote user %d: %s\n", i, user->getUserName()); } } ``` -------------------------------- ### IZoomVideoSDK Interface Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/types.md Provides the main SDK functionalities including initialization, session management, and access to helper modules. This is a global singleton object. ```cpp class IZoomVideoSDK { public: ZoomVideoSDKErrors initialize(const ZoomVideoSDKInitParams& params); ZoomVideoSDKErrors joinSession(const ZoomVideoSDKSessionContext& context); ZoomVideoSDKErrors leaveSession(); IZoomVideoSDKSession* getSessionInfo(); IZoomVideoSDKVideoHelper* getVideoHelper(); IZoomVideoSDKAudioHelper* getAudioHelper(); IZoomVideoSDKChatHelper* getChatHelper(); void setDelegate(IZoomVideoSDKDelegate* delegate); }; ``` -------------------------------- ### Get Current User Information Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Retrieves the current user's name and ID from the session. Ensure the session object is valid before calling. ```cpp IZoomVideoSDKSession* session = video_sdk_obj->getSessionInfo(); if (!session) return; IZoomVideoSDKUser* myself = session->getMyself(); if (myself) { printf("My name: %s\n", myself->getUserName()); printf("My ID: %s\n", myself->getUserId()); } ``` -------------------------------- ### Device Management Methods Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/README.md Methods for retrieving and selecting cameras, microphones, and speakers available to the SDK. ```APIDOC ## Device Management ### Methods - **`videoHelper->getCameraList()`** - **Returns**: `IVideoSDKVector` - A list of available camera devices. - **`audioHelper->getMicList()`** - **Returns**: `IVideoSDKVector` - A list of available microphone devices. - **`audioHelper->getSpeakerList()`** - **Returns**: `IVideoSDKVector` - A list of available speaker devices. - **`videoHelper->selectCamera(id)`** - **Parameters**: - **`id`** (string) - The ID of the camera to select. - **Returns**: `bool` - True if the camera was successfully selected, false otherwise. - **`audioHelper->selectMic(id, name)`** - **Parameters**: - **`id`** (string) - The ID of the microphone to select. - **`name`** (string) - The name of the microphone to select. - **Returns**: `ZoomVideoSDKErrors` - The result of the microphone selection operation. - **`audioHelper->selectSpeaker(id, name)`** - **Parameters**: - **`id`** (string) - The ID of the speaker to select. - **`name`** (string) - The name of the speaker to select. - **Returns**: `ZoomVideoSDKErrors` - The result of the speaker selection operation. ``` -------------------------------- ### Get and Select Camera Devices Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Retrieves a list of available cameras and allows selection of a specific camera. This is useful for configuring video input. ```cpp // Get available cameras IZoomVideoSDKVideoHelper* videoHelper = video_sdk_obj->getVideoHelper(); IVideoSDKVector* cameraList = videoHelper->getCameraList(); // Select a camera videoHelper->selectCamera(selectedCameraId); ``` -------------------------------- ### Initialize VideoRenderer Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/VideoRenderer.md Default constructor for VideoRenderer. Initializes internal state to null/false. Must call Init() before use. ```cpp VideoRenderer(); ``` -------------------------------- ### Get Currently Subscribed User Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/ZoomVideoRenderer.md Retrieves a pointer to the user whose video feed is currently being displayed. Returns nullptr if no user is currently subscribed. ```cpp if (auto user = renderer->GetSubscribedUser()) { printf("Currently displaying: %s\n", user->getUserName()); } ``` -------------------------------- ### Init Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/VideoRenderer.md Initializes the SDL2 video subsystem. This method must be called before creating embedded renderers and is safe to call multiple times. ```APIDOC ## Init ### Description Initializes the SDL2 video subsystem by calling `SDL_Init(SDL_INIT_VIDEO)`. This is a prerequisite for creating embedded renderers and is idempotent. ### Method `bool Init()` ### Parameters No parameters. ### Return Type `bool` - `true` on successful SDL initialization, `false` on error. ### Example ```cpp VideoRenderer renderer; if (!renderer.Init()) { std::cerr << "SDL initialization failed" << std::endl; return false; } ``` ``` -------------------------------- ### Control Self Video Transmission Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Toggles the transmission and display of the user's own video feed. Call `stopVideo` and `cleanupSelfVideo` to stop, or `startVideo` and `setupSelfVideo` to start. ```cpp // Self video (your camera) void on_self_video_clicked() { if (g_self_video_enabled) { videoHelper->stopVideo(); // Stop transmission cleanupSelfVideo(); // Clean display } else { videoHelper->startVideo(); // Start transmission setupSelfVideo(); // Setup display } } ``` -------------------------------- ### Set Minimum CMake Version and Project Name Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/src/CMakeLists.txt Specifies the minimum required CMake version and the project name. This is a standard starting point for CMake projects. ```cmake cmake_minimum_required(VERSION 3.14) project(SkeletonDemo CXX) ``` -------------------------------- ### Initialize Zoom Video SDK Parameters Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md Parameters passed to the SDK during initialization. These are hardcoded in the source and not configurable via config.json. ```cpp ZoomVideoSDKInitParams init_params; init_params.domain = "https://zoom.us"; init_params.enableLog = true; ``` -------------------------------- ### Initialize Audio Playback Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/AudioPlayback.md Initializes the ALSA PCM device for audio playback. Call this after creating an AudioPlayback instance and before playing any audio. Returns false if initialization fails. ```cpp AudioPlayback* audio = new AudioPlayback(); if (!audio->init()) { printf("Audio initialization failed\n"); delete audio; return false; } printf("Audio playback ready\n"); ``` -------------------------------- ### Device Management Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/INDEX.txt APIs for enumerating and selecting audio and video devices. ```APIDOC ## Device Enumeration (IZoomVideoSDKDeviceHelper) ### Description Provides functionality to enumerate available cameras, microphones, and speakers. ### Methods - **enumerate cameras**: Lists all available camera devices. - **enumerate microphones**: Lists all available microphone devices. - **enumerate speakers**: Lists all available speaker devices. ``` -------------------------------- ### Implement ZoomVideoSDKDelegate for Session Events Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Implement the IZoomVideoSDKDelegate interface to handle various session-related events such as joining, leaving, user status changes, and receiving audio data. This is crucial for managing the session lifecycle and user interactions. ```cpp class ZoomVideoSDKDelegate : public IZoomVideoSDKDelegate { public: virtual void onSessionJoin() { // Called when successfully joined session printf("Session joined\n"); // Initialize audio playback g_audio_playback = new AudioPlayback(); g_audio_playback->init(); // Setup self-view display setupSelfVideo(); // Update UI g_in_session = true; updateButtonStates(); } virtual void onSessionLeave() { // Called when disconnected from session printf("Session left\n"); // Cleanup g_in_session = false; } virtual void onSessionLeave(ZoomVideoSDKSessionLeaveReason reason) { // Called with disconnect reason printf("Session left with reason: %d\n", (int)reason); } virtual void onError(ZoomVideoSDKErrors errorCode, int detailErrorCode) { // Called on session errors printf("Session error: %d (detail: %d)\n", (int)errorCode, detailErrorCode); } virtual void onUserJoin(IZoomVideoSDKUserHelper* helper, IVideoSDKVector* userList) { // Called when remote user(s) join for (int i = 0; i < userList->GetCount(); i++) { IZoomVideoSDKUser* user = userList->GetItem(i); printf("User joined: %s\n", user->getUserName()); } } virtual void onUserLeave(IZoomVideoSDKUserHelper* helper, IVideoSDKVector* userList) { // Called when remote user(s) leave for (int i = 0; i < userList->GetCount(); i++) { IZoomVideoSDKUser* user = userList->GetItem(i); printf("User left: %s\n", user->getUserName()); } } virtual void onUserVideoStatusChanged(IZoomVideoSDKVideoHelper* helper, IVideoSDKVector* userList) { // Called when remote user enables/disables video for (int i = 0; i < userList->GetCount(); i++) { IZoomVideoSDKUser* user = userList->GetItem(i); if (user->GetVideoPipe()) { // User has video enabled subscribeToRemoteVideo(user); } else { // User disabled video unsubscribeFromRemoteVideo(user); } } } virtual void onMixedAudioRawDataReceived(AudioRawData* data) { // Called for mixed audio (all participants) if (g_audio_playback) { g_audio_playback->playAudio(data->GetBuffer(), data->GetBufferLen()); } } virtual void onOneWayAudioRawDataReceived(AudioRawData* data, IZoomVideoSDKUser* user) { // Called for individual user audio if (g_audio_playback && user) { printf("Audio from %s\n", user->getUserName()); g_audio_playback->playAudio(data->GetBuffer(), data->GetBufferLen()); } } }; ``` -------------------------------- ### IZoomVideoSDKUser Class Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/types.md Represents a participant in a Zoom session. Provides methods to get user information and access video/sharing interfaces. Used throughout the SDK for managing participants. ```cpp class IZoomVideoSDKUser { public: const zchar_t* getUserName() const; const zchar_t* getUserId() const; IZoomVideoSDKRawDataPipe* GetVideoPipe(); IVideoSDKVector* getShareActionList(); }; ``` -------------------------------- ### Clone and Build Zoom Video SDK Application Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/README.md Clones the project repository and builds the Zoom Video SDK application using CMake. ```bash git clone https://github.com/zoom/videosdk-linux-gtk-quickstart.git cd videosdk-linux-gtk-quickstart cd src mkdir -p build cd build cmake .. make ``` -------------------------------- ### JWT Token Generation (Python) Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md Python code example for generating a JWT token using the PyJWT library. Ensure you replace placeholders with your actual SDK Key and Secret. ```python import jwt import time sdk_key = "your_sdk_key" sdk_secret = "your_sdk_secret" session_name = "my-session" payload = { "app_key": sdk_key, "tpc": session_name, "role_type": 1, # 0 = attendee, 1 = host "iat": int(time.time()), "exp": int(time.time()) + 3600 # Valid for 1 hour } token = jwt.encode(payload, sdk_secret, algorithm="HS256") print(token) ``` -------------------------------- ### Find Optional GUI Dependencies (GTKmm, SDL2) Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/src/CMakeLists.txt Attempts to find GTKmm and SDL2 libraries, which are optional for GUI support. The build will adapt based on their availability. ```cmake # Try to find GTKmm and SDL2 (optional for GUI) pkg_check_modules(GTKMM gtkmm-3.0) find_package(SDL2) ``` -------------------------------- ### CMake Build System Overview Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md The CMake workflow involves checking dependencies like GTKmm and SDL2, finding libraries such as ALSA and GLib, configuring include paths for the Zoom SDK headers, and linking necessary libraries. It also handles copying configuration files and creating symbolic links for libraries. ```cmake cmake .. -DCMAKE_BUILD_TYPE=Debug make ``` -------------------------------- ### SDK Initialization Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/session-api.md Initializes the Zoom Video SDK. This must be called before any other session operations. ```APIDOC ## SDK Initialization ### Description Initializes the Zoom Video SDK. This must be called before any other session operations. ### Method ```cpp IZoomVideoSDK::initialize ``` ### Parameters #### Request Body - **domain** (string) - Required - SDK service endpoint (always `"https://zoom.us"`) - **enableLog** (boolean) - Optional - Enable debug logging to `~/.zoom/logs/` ``` -------------------------------- ### PreviewVideoHandler Error Handling Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/api-reference/PreviewVideoHandler.md Checks the return value of StartPreview() for errors. Errors are logged by the handler, and possible causes include SDK initialization issues, hardware problems, or permission denials. ```cpp if (!preview->StartPreview()) { // Error already logged with error code // Possible causes: // - SDK not initialized (video_sdk_obj == nullptr) // - Video helper unavailable // - Camera hardware issue // - Permission denied } ``` -------------------------------- ### IVideoSDKVector Generic Collection Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/types.md A template class representing a generic vector or list interface used by the Zoom SDK for collections of objects. Provides methods to get the count and retrieve items by index. ```cpp template class IVideoSDKVector { public: int GetCount() const; T GetItem(int index); }; ``` ```cpp IVideoSDKVector* users = session->getRemoteUsers(); for (int i = 0; i < users->GetCount(); i++) { IZoomVideoSDKUser* user = users->GetItem(i); } ``` -------------------------------- ### Link Directories and Definitions for GLib/GIO Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/src/CMakeLists.txt Configures library search paths and preprocessor definitions for GLib and GIO. Ensures these libraries are correctly linked. ```cmake link_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib/zoom_video_sdk) link_directories(${GLIB_LIBRARY_DIRS} ${GIO_LIBRARY_DIRS}) include_directories(${GLIB_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS}) add_definitions(${GLIB_CFLAGS_OTHER} ${GIO_CFLAGS_OTHER}) ``` -------------------------------- ### Include Project and SDK Headers Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/src/CMakeLists.txt Adds include directories for project-specific headers and the Zoom Video SDK headers. This makes SDK components accessible. ```cmake include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/zoom_video_sdk) ``` -------------------------------- ### Link Core and Optional Libraries Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/src/CMakeLists.txt Links the executable against required libraries (PkgConfig, Video SDK, curl, GLib, GIO, ALSA) and optionally GUI libraries (GTKmm, SDL2) if BUILD_GUI is true. ```cmake target_link_libraries(${TARGET_NAME} PkgConfig::deps) target_link_libraries(${TARGET_NAME} videosdk) target_link_libraries(${TARGET_NAME} curl) target_link_libraries(${TARGET_NAME} ${GLIB_LIBRARIES} ${GIO_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${ALSA_LIBRARIES}) # Conditionally link GUI libraries if(BUILD_GUI) target_link_libraries(${TARGET_NAME} ${GTKMM_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${SDL2_LIBRARIES}) endif() ``` -------------------------------- ### IZoomVideoSDK Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/types.md The IZoomVideoSDK interface is the main entry point for the Zoom Video SDK, acting as a global singleton. It provides methods for initializing the SDK, joining and leaving sessions, and accessing helper interfaces for video, audio, and chat functionalities. ```APIDOC ## Interface IZoomVideoSDK ### Description Main SDK interface (global singleton). Provides core functionalities for interacting with the Zoom Video SDK. ### Methods - **initialize(const ZoomVideoSDKInitParams& params)**: Initializes the SDK with the provided parameters. Returns `ZoomVideoSDKErrors`. - **joinSession(const ZoomVideoSDKSessionContext& context)**: Joins a video session with the specified context. Returns `ZoomVideoSDKErrors`. - **leaveSession()**: Leaves the current video session. Returns `ZoomVideoSDKErrors`. - **getSessionInfo()**: Retrieves information about the current session. Returns `IZoomVideoSDKSession*`. - **getVideoHelper()**: Retrieves the video helper interface. Returns `IZoomVideoSDKVideoHelper*`. - **getAudioHelper()**: Retrieves the audio helper interface. Returns `IZoomVideoSDKAudioHelper*`. - **getChatHelper()**: Retrieves the chat helper interface. Returns `IZoomVideoSDKChatHelper*`. - **setDelegate(IZoomVideoSDKDelegate* delegate)**: Sets the delegate for receiving session events. ``` -------------------------------- ### Device Selection Flow Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md Outlines the process for selecting a camera device. It involves a callback triggered by user selection and updating the video helper. ```text User selects camera in dropdown ↓ on_camera_changed() callback ├─ Get selected device ID ├─ Call videoHelper->selectCamera(deviceId) └─ Refresh preview (if active) ↓ Video transmission uses selected camera ``` -------------------------------- ### Set C++ Standard and GUI Preprocessor Definitions Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/configuration.md Configures the build to use the C++11 standard and defines preprocessor macros for GUI availability. Use -DBUILD_GUI=1 for enabled GUI and -DBUILD_GUI=0 for disabled GUI. ```cmake add_definitions(-std=c++11) // C++11 standard add_definitions(-DBUILD_GUI=1) // When GUI enabled add_definitions(-DBUILD_GUI=0) // When GUI disabled ``` -------------------------------- ### Video Rendering Pipeline Source: https://github.com/tanchunsiong/videosdk-linux-gtk-quickstart/blob/main/_autodocs/modules.md Illustrates the process of converting YUV420 video frames to RGB and rendering them to a GTK DrawingArea. ```text YUV420 frame (from SDK) ↓ UpdateVideoTexture() — YUV→RGB conversion (ITU-R BT.601) ↓ on_draw() — Cairo rendering with aspect ratio preservation ↓ GTK DrawingArea (screen) ```