Communication Quickstart - Windows

Step 1: Download the Sample Code

Download the latest SDK from downloads or contact sales-us@agora.io.

The following shows the windows package structure:

../../_images/windows_0.1.png

Where:

  • ./examples: including the Open Video Call application and Open Live sample codes(Open Video Call is for communication and Open Live is for live broadcast)
  • ./sdk: including the required libraries

Step 2: Prepare the Environments

  1. Ensure that the following development environment requirements are satisfied:

    • Microsoft Visual C++ 2013 or later
    • Microsoft Visual Studio (recommended)
    • Microsoft Windows 7 or above
  2. Be sure that the following libraries are ready.

    1. If you use the sample code downloaded in Step 1: Download the Sample Code , then no extra operation is required for this step.
    2. If you use the sample code downloaded from https://github.com/AgoraIO/OpenVideoCall-Windows:
      • Add the sdk/include folder to the INCLUDE directory of your project.
      • Add the sdk/lib folder to the LIB directory of your project, and make sure that mediasdk.lib is linked with your project.
      • Copy all .dll files under the sdk/dll folder to the directory where your executable file is located.

Step 3: Demonstrate the Video Call

Agora provides a sample code called Open Video Call in the Agora Native SDK for Windows zip file.

Open Video Call includes the basic methods of joining and leaving a call, demonstrates the core operations of Agora Native SDK for Windows and enables audio and video calls with simple method calls.

The following figure highlights the required files to compile and execute the sample code:

../../_images/windows_0.2.png
  • language: The configuration file to set the GUI display languages. The default language is English.
  • OpenVideoCall: The source file folder of the sample code.
  • OpenVideoCall.sln: The project file of the sample code.
  • dll: The required dynamic link libraries.

Compiling the Sample Code

Do the following to compile and execute the sample code:

  1. Open the OpenVideoCall.sln using the Visual Studio 2013 (or later).

  2. Open the AgoraObject.h file and locate the line with #define APP_ID_T(“”) .

    ../../_images/windows_0.3.png
  3. Enter your App ID. You can follow Obtaining an App ID to get your App ID.

  4. Compile the entire solution in the Release mode.

    ../../_images/windows_0.4.png
  5. Copy all the dynamic link libraries under the sdk/dll directory to the Release folder after the compilation is complete.

Executing the Sample Code

  1. Double click the OpenVideoCall.exe and the following page displays:

    ../../_images/windows-video-4.png

    On this page, you can set the resolution, test the devices, and set the encryptionkey if necessary.

  2. Enter a channel name, for example, test, and proceed with Join.