VideoChat API example
Description
The VideoChatAPI application is developed in C++ and QML to demonstrate working with the VideoChat API for Aurora OS. In the "Camera" mode, the application emulates the operation of a video call, showing the image from the camera with a delay as the video stream of the interlocutor. It is also possible to change the settings of the resulting image, for example, select a different camera, adjust the bitrate, resolution and codec of the image. In the "Video" mode, the embedded video file is played.
The full list of functions of the VideoChatAPI application is presented below:
- View the list of available cameras.
- View the list of available codecs.
- View the list of available resolutions for the chosen camera.
- Select a camera from the list of available cameras.
- Select a codec from the list of available codecs.
- Select the camera resolution from the list of available camera resolutions.
- Encoding and decoding of the video stream from the camera.
- Displaying the camera preview.
- View the decoded video file.
The following APIs are used in the application:
- Basic APIs: Qt5Core, Qt5Qml, Qt5Quick
- Multimedia: Qt5VideChat
The Qt VideoChat module provides an API for a video camera and access to hardware codecs for video streaming applications. It extends QtMultimedia by providing a video encoding and decoding API.
Table of contents
- Compatibility
- Build features
- Branches info
- Install and run
- Screenshots
- Use cases
- Project structure
- Terms of use and participation in development
Compatibility
The project is compatible with OS Aurora version 5 and higher.
Build features
The project is assembled in the usual way using the Aurora SDK.
Branches info
Install and run
Installation and running is processed according to the instruction Example building.
At the first time launching the app necessary permissions must be provided, and specifically access to the camera.
Screenshots
Use cases
The app has the following use cases:
- Using the back camera of a mobile device with default settings.
- Using the back camera of a mobile device with modified bitrate and resolution settings.
- Using the front camera of a mobile device with default settings.
- Using the front camera of a mobile device with modified bitrate and resolution settings.
- Displaying the screen of a mobile device in the form of a recursion with default settings.
- Displaying the screen of a mobile device in the form of a recursion with changed bitrate and resolution settings.
- Viewing the video embedded in the application.
You can read more about working with the QT VideoChat module here.
Project structure
The project has a standard structure of an application based on C++ and QML for Aurora OS.
- ru.auroraos.VideoChatApi.pro file describes the project structure for the qmake build system.
- icons directory contains application icons for different screen resolutions.
-
qml directory contains the QML source code and the UI resources.
- cover directory contains the application cover implementations.
- images directory contains the additional custom UI icons.
- pages directory contains the application pages.
- VideoChatApi.qml file provides the application window implementation.
- rpm directory contains the rpm-package build settings. ru.auroraos.VideoChatApi.spec file is used by rpmbuild tool.
-
src directory contains the C++ source code.
- filesource directory contains data from the file source.
- h264 directory contains an interface for encoding and decoding files.
- videosource directory contains data from the video file source.
- main.cpp file is the application entry point.
- translations directory contains the UI translation files.
- ru.auroraos.VideoChatApi.desktop file defines the display and parameters for launching the application.
- video directory contains a test video for demonstration.
Terms of use and participation in development
The source code of the project is provided under the license, which allows its use in third-party applications.
Contributor License Agreement.
The contributor agreement documents the rights granted by contributors of the Open Mobile Platform.
Information about the contributors is specified in the AUTHORS file.
Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.
