tpMediaFile类
ExternUtils
2025-07-05
基础信息
头文件: | include <tpMediaFile.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | |
派生类: |
Public 类型
enum tpMediaFileType {
TP_MEDIA_FILE_NONE, TP_MEDIA_FILE_AUDIO, TP_MEDIA_FILE_VIDEO
}
Public 成员函数
tpMediaFile(const tpString &file) | ||
---|---|---|
~tpMediaFile() | ||
getDuration() | 获取文件时长 | |
getBitRate() | 获取比特率(音频) | |
getType() | 获取文件是音频还ushi视频 | |
getFormat() | 获取文件格式 | |
getWidth() | 获取视频帧宽度 | |
getHeight() | 获取视频帧高度 | |
getResolution(tpUInt32 *width, tpUInt32 *height) | 获取视频分辨率 | |
getFrameRate() | 获取视频码率 |
成员枚举类型说明
enum tpMediaFile::tpMediaFileType
名称 | 值 | 描述 |
---|---|---|
TP_MEDIA_FILE_NONE | 0 | |
TP_MEDIA_FILE_AUDIO | 1 | |
TP_MEDIA_FILE_VIDEO | 2 |
成员函数说明
tpMediaFile::tpMediaFile(const tpString &file)
暂无注释...
tpMediaFile::~tpMediaFile()
暂无注释...
tpInt64 tpMediaFile::getDuration()
点击查看...
获取文件时长
返回值:
秒
tpInt64 tpMediaFile::getBitRate()
点击查看...
获取比特率(音频)
返回值:
kbps
tpMediaFile::tpMediaFileType tpMediaFile::getType()
点击查看...
获取文件是音频还ushi视频
int tpMediaFile::getFormat()
点击查看...
获取文件格式
返回值:
(MP3,WAV,MP4....)
tpUInt32 tpMediaFile::getWidth()
点击查看...
获取视频帧宽度
tpUInt32 tpMediaFile::getHeight()
点击查看...
获取视频帧高度
int tpMediaFile::getResolution(tpUInt32 *width, tpUInt32 *height)
点击查看...
获取视频分辨率
返回值:
linebreak
tpUInt32 tpMediaFile::getFrameRate()
点击查看...
获取视频码率