Qt Multimedia Module C++ Classes

Qt Multimedia模块提供音频、视频和摄像功能。更多

命名空间

QtAudio

包含音频类使用的枚举

QtVideo

用于摄像机和视频功能的枚举

QAbstractVideoBuffer

视频数据抽象

QAbstractVideoBuffer::MapData

QAbstractVideoBuffer::MapData 结构描述了映射平面布局

QAudioBuffer

代表具有特定格式和采样率的音频样本集合

QAudioBufferInput

用于通过 QMediaCaptureSession 向 QMediaRecorder 提供自定义音频缓冲区

QAudioBufferOutput

用于捕获 QMediaPlayer 提供的音频数据

QAudioDecoder

实现音频解码

QAudioDevice

有关音频设备及其功能的信息

QAudioFormat

存储音频流参数信息

QAudioInput

代表音频输入通道

QAudioOutput

代表音频输出通道

QAudioSink

向音频输出设备发送音频数据的接口

QAudioSource

从音频输入设备接收音频数据的接口

QCamera

系统摄像设备接口

QCameraDevice

有关摄像设备的一般信息

QCameraFormat

描述摄像设备支持的视频格式

QCapturableWindow

用于获取可捕捉窗口的基本信息

QImageCapture

用于记录媒体内容

QMediaCaptureSession

允许捕捉音频和视频内容

QMediaDevices

关于可用多媒体输入和输出设备的信息

QMediaFormat

描述多媒体文件或数据流的编码格式

QMediaMetaData

为媒体文件提供元数据

QMediaPlayer

允许播放媒体文件

QMediaRecorder

用于编码和记录采集会话

QMediaTimeRange

代表一组零或多个不相交的时间间隔

QMediaTimeRange::Interval

QMediaTimeRange::Interval 类表示精度为整数的时间间隔

QScreenCapture

该类用于捕捉屏幕

QSoundEffect

播放低延迟音效的方法

QVideoFrame

代表一帧视频数据

QVideoFrameFormat

指定视频演示界面的流格式

QVideoFrameInput

用于通过 QMediaCaptureSession 向 QMediaRecorder 或视频输出提供自定义视频帧

QVideoSink

代表视频数据的通用汇

QWindowCapture

该类用于捕获窗口

详细说明

使用模块

使用 Qt 模块需要直接或通过其他依赖关系链接模块库。有几种构建工具为此提供了专门支持,包括CMakeqmake

使用 CMake 构建

使用find_package() 命令在Qt6 软件包中找到所需的模块组件:

find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.