floo::BMXVideoAttachment#
視訊訊息附件
#include <bmx_video_attachment.h>
Inherits from floo::BMXFileAttachment, floo::BMXMessageAttachment, BMXBaseObject
Public Functions#
| Name | |
|---|---|
| BMXVideoAttachment(const std::string & path, int duration, const [Size] & size, const std::string & displayName ="") 構造函數,構建發送視訊訊息附件 | |
| BMXVideoAttachment(const std::string & path, const std::string & thumbnailPath, int duration, const [Size] & size, const std::string & displayName ="") 構造函數,構建發送視訊訊息附件 | |
| BMXVideoAttachment(const std::string & ratelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength) 構造函數,構建接收視訊訊息附件 | |
| BMXVideoAttachment(const std::string & ratelUrl, const std::string & thumbnailRatelUrl, int duration, const [Size] & size, const std::string & displayName, int64_t fileLength) 構造函數,構建接收視訊訊息附件 | |
| virtual | ~BMXVideoAttachment() 析構函數 |
| virtual Type | type() const 回傳檔案類型 |
| virtual BMXMessageAttachmentPtr | clone() const 克隆函數 |
| const [Size] & | size() const 視訊大小,寬度和高度 |
| int32_t | duration() const 視訊片段時長 |
| void | setThumbnail(const std::string & path) 設定發送視訊片段訊息縮略圖 |
| const std::string & | thumbnailPath() const 縮略圖本地路徑 |
| const std::string & | thumbnailUrl() const 遠程縮略圖使用URL |
| void | setThumbnailRatelUrl(const std::string & thumbnailRatelUrl) 設定發送視訊片段訊息縮略圖ratel伺服器路徑 |
| const std::string & | thumbnailRatelUrl() const 縮略圖ratel伺服器路徑 |
| DownloadStatus | thumbnailDownloadStatus() const 縮略圖下載狀態 |
Friends#
Additional inherited members#
Public Functions inherited from floo::BMXFileAttachment
| Name | |
|---|---|
| BMXFileAttachment(const std::string & path, const std::string & displayName ="") 構造函數,構建發送檔案訊息附件 | |
| BMXFileAttachment(const std::string & ratelUrl, const std::string & displayName, int64_t fileLength) 構造函數,構建接收檔案訊息附件 | |
| virtual | ~BMXFileAttachment() 析構函數 |
| const std::string & | path() const 本地路徑 |
| const std::string & | displayName() const 顯示名 |
| const std::string & | ratelUrl() const 遠程ratel使用URL |
| const std::string & | url() const 遠程使用URL |
| int64_t | fileLength() const 檔案長度 |
| DownloadStatus | downloadStatus() const 附件下載狀態 |
Protected Attributes inherited from floo::BMXFileAttachment
| Name | |
|---|---|
| std::string | mPath |
| std::string | mDisplayName |
| std::string | mRatelUrl |
| std::string | mUrl |
| int64_t | mFileLength |
| DownloadStatus | mDownloadStatus |
Friends inherited from floo::BMXFileAttachment
| Name | |
|---|---|
| class | Encoder< BMXFileAttachment > |
| class | Decoder< BMXFileAttachment > |
Public Types inherited from floo::BMXMessageAttachment
| Name | |
|---|---|
| enum class | Type { Image, Voice, Video, File, Location, Command, Forward} 附件類型 |
| enum class | DownloadStatus { Downloaing, Successed, Failed, NotStart, Canceled} 附件下載狀態 |
Public Functions inherited from floo::BMXMessageAttachment
| Name | |
|---|---|
| BMXMessageAttachment() 構造函數 | |
| virtual | ~BMXMessageAttachment() 析構函數 |
Public Functions Documentation#
function BMXVideoAttachment#
BMXVideoAttachment(
const std::string & path,
int duration,
const Size & size,
const std::string & displayName =""
)
構造函數,構建發送視訊訊息附件
Parameters:
- path 檔案的本地路徑
- duration 視訊片段時長
- size 視訊大小,寬度和高度
- displayName 檔案展示名
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}
function BMXVideoAttachment#
BMXVideoAttachment(
const std::string & path,
const std::string & thumbnailPath,
int duration,
const Size & size,
const std::string & displayName =""
)
構造函數,構建發送視訊訊息附件
Parameters:
- path 檔案的本地路徑
- thumbnailPath 縮略圖檔案的本地路徑
- duration 視訊片段時長
- size 視訊大小,寬度和高度
- displayName 檔案展示名
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}
function BMXVideoAttachment#
BMXVideoAttachment(
const std::string & ratelUrl,
int duration,
const Size & size,
const std::string & displayName,
int64_t fileLength
)
構造函數,構建接收視訊訊息附件
Parameters:
- ratelUrl ratel檔案伺服器地址
- duration 視訊片段時長
- size 視訊大小,寬度和高度
- displayName 檔案展示名
- fileLength 檔案大小
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}
function BMXVideoAttachment#
BMXVideoAttachment(
const std::string & ratelUrl,
const std::string & thumbnailRatelUrl,
int duration,
const Size & size,
const std::string & displayName,
int64_t fileLength
)
構造函數,構建接收視訊訊息附件
Parameters:
- ratelUrl ratel檔案伺服器地址
- thumbnailRatelUrl 縮略圖ratel檔案伺服器地址
- duration 視訊片段時長
- size 視訊大小,寬度和高度
- displayName 檔案展示名
- fileLength 檔案大小
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="BMXVideoAttachment" %}{% endlanying_code_snippet %}
function ~BMXVideoAttachment#
inline virtual ~BMXVideoAttachment()
析構函數
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="~BMXVideoAttachment" %}{% endlanying_code_snippet %}
function type#
inline virtual Type type() const
回傳檔案類型
Return: Type
Reimplements: floo::BMXFileAttachment::type
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="type" %}{% endlanying_code_snippet %}
function clone#
virtual BMXMessageAttachmentPtr clone() const
克隆函數
Return: BMXMessageAttachmentPtr
Reimplements: floo::BMXFileAttachment::clone
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="clone" %}{% endlanying_code_snippet %}
function size#
const Size & size() const
視訊大小,寬度和高度
Return: Size
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="size" %}{% endlanying_code_snippet %}
function duration#
int32_t duration() const
視訊片段時長
Return: int32_t
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="duration" %}{% endlanying_code_snippet %}
function setThumbnail#
void setThumbnail(
const std::string & path
)
設定發送視訊片段訊息縮略圖
Parameters:
- path 視訊片段訊息縮略圖
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="setThumbnail" %}{% endlanying_code_snippet %}
function thumbnailPath#
const std::string & thumbnailPath() const
縮略圖本地路徑
Return: std::string
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailPath" %}{% endlanying_code_snippet %}
function thumbnailUrl#
const std::string & thumbnailUrl() const
遠程縮略圖使用URL
Return: std::string
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailUrl" %}{% endlanying_code_snippet %}
function setThumbnailRatelUrl#
void setThumbnailRatelUrl(
const std::string & thumbnailRatelUrl
)
設定發送視訊片段訊息縮略圖ratel伺服器路徑
Parameters:
- thumbnailRatelUrl 視訊片段訊息縮略圖伺服器路徑
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="setThumbnailRatelUrl" %}{% endlanying_code_snippet %}
function thumbnailRatelUrl#
const std::string & thumbnailRatelUrl() const
縮略圖ratel伺服器路徑
Return: std::string
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailRatelUrl" %}{% endlanying_code_snippet %}
function thumbnailDownloadStatus#
DownloadStatus thumbnailDownloadStatus() const
縮略圖下載狀態
Return: DownloadStatus
Friends#
friend Encoder< BMXVideoAttachment >#
friend class Encoder< BMXVideoAttachment >(
Encoder< BMXVideoAttachment >
);
friend Decoder< BMXVideoAttachment >#
friend class Decoder< BMXVideoAttachment >(
Decoder< BMXVideoAttachment >
);
Example:
{% lanying_code_snippet repo="lanying-im-embedded",class="BMXVideoAttachment",function="thumbnailDownloadStatus" %}{% endlanying_code_snippet %}
Updated on 2022-01-26 at 17:20:40 +0800