dtkmultimedia
DTK Multimedia module
|
DMultiOperateInterface类提供多媒体信息查看与转换功能. 更多...
#include <dmultioperateinterface.h>
Public 类型 | |
enum | videoCodecName { h264 = 0 , Hevc , mpeg4 , vp8 , vp9 , avs2 } |
多媒体视频格式 更多... | |
enum | audioCodecName { aac = 0 , mp3 , ac_3 , flac , vorbis , opus } |
多媒体音频格式 更多... | |
enum | muxerName { mp4 = 0 , mkv , webm } |
多媒体音频格式 更多... | |
Public 成员函数 | |
DMultiOperateInterface (QObject *parent=nullptr) | |
QStringList | showVideoMuxList (const videoCodecName &name) |
获取视频格式支持的容器格式列表. | |
QStringList | showAudioMuxList (const audioCodecName &name) |
获取音频格式支持的容器格式列表. | |
QString | nameOfMuxer (const muxerName &name) |
获取容器格式的名称. | |
QString | nameOfVideoCodec (const videoCodecName &name) |
获取视频格式的名称. | |
QString | nameOfAudioCodec (const audioCodecName &name) |
获取音频格式的名称. | |
void | setOutFilePath (const QString &outFileName) |
设置输出文件路径. | |
QString | outFilePath () |
获取输出文件路径. | |
QString | showFileInfo (const QString &fileName) |
显示媒体文件媒体信息. | |
QString | showVideoInfo (const QString &fileName) |
显示媒体文件视频流信息. | |
QString | showAudioInfo (const QString &fileName) |
显示媒体文件音频流信息. | |
QString | showSubtitleInfo (const QString &fileName) |
显示媒体文件字幕流信息. | |
bool | videoConvert (const QString &fileName, const videoCodecName &destCodecName, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
指定格式视频转换. | |
bool | audioConvert (const QString &fileName, const audioCodecName &destCodecName, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
指定格式音频转换. | |
bool | muxerConvert (const QString &fileName, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
指定媒体容器格式转换. | |
bool | adjustRate (const QString &fileName, const qint64 &minSize, const qint64 &maxSize, const qint64 &cacheSize, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
调整视频码率. | |
bool | changeResolution (const QString &fileName, const QSize &Resolution, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
改变视频分辨率. | |
bool | changeResolution (const QString &fileName, const int &nWidth, const int &nHeight, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
改变视频分辨率. | |
bool | audioStreamFile (const QString &fileName, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc, const int audioId=-1) |
媒体文件中提取音频流. | |
bool | videoStreamFile (const QString &fileName, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
媒体文件中提取视频流. | |
bool | addAudioforVideo (const QString &videoName, const QString &audioName, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
为媒体文件添加音轨. | |
bool | cutVideoToDuration (const QString &fileName, const QString &startTime, const QString &durationTime, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
为媒体文件添加音轨. | |
bool | cutVideoToEnd (const QString &fileName, const QString &startTime, const QString &endTime, const muxerName &outMuxerFormat, const QString &sOutFileName, QString &strErrDesc) |
媒体文件裁剪视频,根据时间段,指定开始时间与结束时间. | |
Protected 属性 | |
QScopedPointer< DMultiOperateInterfacePrivate > | d_ptr |
DMultiOperateInterface类提供多媒体信息查看与转换功能.
bool DMultiOperateInterface::addAudioforVideo | ( | const QString & | videoName, |
const QString & | audioName, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
为媒体文件添加音轨.
[in] | videoName | 媒体文件名. |
[in] | audioName | 音频文件名. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::adjustRate | ( | const QString & | fileName, |
const qint64 & | minSize, | ||
const qint64 & | maxSize, | ||
const qint64 & | cacheSize, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
调整视频码率.
[in] | fileName | 媒体文件名. |
[in] | minSize | 最小码率. |
[in] | maxSize | 最大码率. |
[in] | cacheSize | 缓存区大小. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::audioConvert | ( | const QString & | fileName, |
const audioCodecName & | destCodecName, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
指定格式音频转换.
[in] | fileName | 媒体文件名. |
[in] | destCodecName | 目标音频编码名称. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::audioStreamFile | ( | const QString & | fileName, |
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc, | ||
const int | audioId = -1 |
||
) |
媒体文件中提取音频流.
[in] | fileName | 媒体文件名. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
[in] | audioId | 音频id,默认为-1,自动取媒体中的默认音频流. |
bool DMultiOperateInterface::changeResolution | ( | const QString & | fileName, |
const int & | nWidth, | ||
const int & | nHeight, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
改变视频分辨率.
[in] | fileName | 媒体文件名. |
[in] | nWidth | 视频分辨率宽. |
[in] | nHeight | 视频分辨率高. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::changeResolution | ( | const QString & | fileName, |
const QSize & | Resolution, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
改变视频分辨率.
[in] | fileName | 媒体文件名. |
[in] | Resolution | 视频分辨率大小. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::cutVideoToDuration | ( | const QString & | fileName, |
const QString & | startTime, | ||
const QString & | durationTime, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
为媒体文件添加音轨.
媒体文件裁剪视频,根据持续时间.
[in] | startTime | 视频开始时间. |
[in] | durationTime | 视频持续时间. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::cutVideoToEnd | ( | const QString & | fileName, |
const QString & | startTime, | ||
const QString & | endTime, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
媒体文件裁剪视频,根据时间段,指定开始时间与结束时间.
[in] | startTime | 剪切视频开始时间. |
[in] | endTime | 剪切视频结束时间. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::muxerConvert | ( | const QString & | fileName, |
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
指定媒体容器格式转换.
[in] | fileName | 媒体文件名. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
QString DMultiOperateInterface::nameOfAudioCodec | ( | const audioCodecName & | name | ) |
获取音频格式的名称.
[in] | name | 音频格式. |
QString DMultiOperateInterface::nameOfMuxer | ( | const muxerName & | name | ) |
获取容器格式的名称.
[in] | name | 容器格式. |
QString DMultiOperateInterface::nameOfVideoCodec | ( | const videoCodecName & | name | ) |
获取视频格式的名称.
[in] | name | 视频格式. |
QString DMultiOperateInterface::outFilePath | ( | ) |
获取输出文件路径.
void DMultiOperateInterface::setOutFilePath | ( | const QString & | outFileName | ) |
设置输出文件路径.
[in] | outFileName | 输出文件路径. |
QString DMultiOperateInterface::showAudioInfo | ( | const QString & | fileName | ) |
显示媒体文件音频流信息.
[in] | fileName | 媒体文件名. |
QStringList DMultiOperateInterface::showAudioMuxList | ( | const audioCodecName & | name | ) |
获取音频格式支持的容器格式列表.
[in] | name | 视频格式. |
QString DMultiOperateInterface::showFileInfo | ( | const QString & | fileName | ) |
显示媒体文件媒体信息.
[in] | fileName | 媒体文件名. |
QString DMultiOperateInterface::showSubtitleInfo | ( | const QString & | fileName | ) |
显示媒体文件字幕流信息.
[in] | fileName | 媒体文件名. |
QString DMultiOperateInterface::showVideoInfo | ( | const QString & | fileName | ) |
显示媒体文件视频流信息.
[in] | fileName | 媒体文件名. |
QStringList DMultiOperateInterface::showVideoMuxList | ( | const videoCodecName & | name | ) |
获取视频格式支持的容器格式列表.
[in] | name | 视频格式. |
bool DMultiOperateInterface::videoConvert | ( | const QString & | fileName, |
const videoCodecName & | destCodecName, | ||
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
指定格式视频转换.
[in] | fileName | 媒体文件名. |
[in] | destCodecName | 目标视频编码名称. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |
bool DMultiOperateInterface::videoStreamFile | ( | const QString & | fileName, |
const muxerName & | outMuxerFormat, | ||
const QString & | sOutFileName, | ||
QString & | strErrDesc | ||
) |
媒体文件中提取视频流.
[in] | fileName | 媒体文件名. |
[in] | outMuxerFormat | 目标媒体容器格式名称. |
[in] | sOutFileName | 输出媒体容器文件名. |
[out] | strErrDesc | 错误描述. |