FPlayerStreamInfo
播放器媒体流的所有信息。
C++
USTRUCT(BlueprintType)
struct FPlayerStreamInfo
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int streamIndex = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
EMEDIA_STREAM_TYPE streamType = EMEDIA_STREAM_TYPE::STREAM_TYPE_UNKNOWN;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
FString codecName = "";
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
FString language = "";
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int videoFrameRate = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int videoBitRate = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int videoWidth = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int videoHeight = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int videoRotation = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int audioSampleRate = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int audioChannels = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int audioBitsPerSample = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|PlayerStreamInfo")
int duration = 0;
FPlayerStreamInfo(){}
FPlayerStreamInfo(const agora::media::base::PlayerStreamInfo & AgoraData){
streamIndex = AgoraData.streamIndex;
streamType = (EMEDIA_STREAM_TYPE)AgoraData.streamType;
codecName = UTF8_TO_TCHAR(AgoraData.codecName);
language = UTF8_TO_TCHAR(AgoraData.language);
videoFrameRate = AgoraData.videoFrameRate;
videoBitRate = AgoraData.videoBitRate;
videoWidth = AgoraData.videoWidth;
videoHeight = AgoraData.videoHeight;
videoRotation = AgoraData.videoRotation;
audioSampleRate = AgoraData.audioSampleRate;
audioChannels = AgoraData.audioChannels;
audioBitsPerSample = AgoraData.audioBitsPerSample;
duration = AgoraData.duration;
}
agora::media::base::PlayerStreamInfo CreateAgoraData() const {
agora::media::base::PlayerStreamInfo AgoraData;
AgoraData.streamIndex = streamIndex;
AgoraData.streamType = (agora::media::base::MEDIA_STREAM_TYPE)streamType;
SET_UABT_FSTRING_TO_CHAR_ARRAY(AgoraData.codecName, codecName,agora::media::base::kMaxCharBufferLength)
SET_UABT_FSTRING_TO_CHAR_ARRAY(AgoraData.language, language, agora::media::base::kMaxCharBufferLength)
AgoraData.videoFrameRate = videoFrameRate;
AgoraData.videoBitRate = videoBitRate;
AgoraData.videoWidth = videoWidth;
AgoraData.videoHeight = videoHeight;
AgoraData.videoRotation = videoRotation;
AgoraData.audioSampleRate = audioSampleRate;
AgoraData.audioChannels = audioChannels;
AgoraData.audioBitsPerSample = audioBitsPerSample;
AgoraData.duration = duration;
return AgoraData;
}
void FreeAgoraData(agora::media::base::PlayerStreamInfo & AgoraData) const {
}
};
streamIndex
媒体流的索引值。
streamType
此条媒体流的类型。详见 EMEDIA_STREAM_TYPE。
codecName
此条媒体流的编码规格。
language
此条媒体流的语言。
videoFrameRate
该参数仅对视频流生效,表示视频帧率 (fps)。
videoBitRate
该参数仅对视频流生效,表示视频码率 (bps)。
videoWidth
该参数仅对视频流生效,表示视频宽度 (px)。
videoHeight
该参数仅对视频流生效,表示视频高度 (px)。
videoRotation
该参数仅对视频流生效,表示旋转角度。
audioSampleRate
该参数仅对音频流生效,表示音频采样率 (Hz)。
audioChannels
该参数仅对音频流生效,表示声道数。
audioBitsPerSample
该参数仅对音频流生效,表示每个音频采样点的位数 (bit)。
duration
媒体流的时长(毫秒)。