Photon Voice v2.53

Public Member Functions | Static Public Member Functions | Properties | List of all members
VoiceInfo Struct Reference

Describes stream properties. More...

Public Member Functions

override string ToString ()
 

Static Public Member Functions

static VoiceInfo CreateAudioOpus (POpusCodec.Enums.SamplingRate samplingRate, int channels, OpusCodec.FrameDuration frameDurationUs, int bitrate, object userdata=null)
 Create stream info for an Opus audio stream. More...
 
static VoiceInfo CreateAudio (Codec codec, int samplingRate, int channels, int frameDurationUs, object userdata=null)
 Create stream info for an audio stream. More...
 
static VoiceInfo CreateVideo (Codec codec, int bitrate, int width, int heigth, int fps, int keyFrameInt, object userdata=null)
 Create stream info for a video stream. More...
 

Properties

Codec Codec [get, set]
 
int SamplingRate [get, set]
 Audio sampling rate (frequency, in Hz). More...
 
int Channels [get, set]
 Number of channels. More...
 
int FrameDurationUs [get, set]
 Uncompressed frame (audio packet) size in microseconds. More...
 
int Bitrate [get, set]
 Target bitrate (in bits/second). More...
 
int Width [get, set]
 Video width. More...
 
int Height [get, set]
 Video height More...
 
int FPS [get, set]
 Video frames per second More...
 
int KeyFrameInt [get, set]
 Video keyframe interval in frames More...
 
object UserData [get, set]
 Optional user data. Should be serializable by Photon. More...
 
int FrameDurationSamples [get]
 Uncompressed frame (data packet) size in samples. More...
 
int FrameSize [get]
 Uncompressed frame (data packet) array size. More...
 

Detailed Description

Describes stream properties.

Member Function Documentation

◆ CreateAudio()

static VoiceInfo CreateAudio ( Codec  codec,
int  samplingRate,
int  channels,
int  frameDurationUs,
object  userdata = null 
)
static

Create stream info for an audio stream.

Parameters
codecAudio codec.
samplingRateAudio sampling rate.
channelsNumber of channels.
frameDurationUsUncompressed frame (audio packet) size in microseconds.
userdataOptional user data. Should be serializable by Photon.
Returns
VoiceInfo instance.

◆ CreateAudioOpus()

static VoiceInfo CreateAudioOpus ( POpusCodec.Enums.SamplingRate  samplingRate,
int  channels,
OpusCodec.FrameDuration  frameDurationUs,
int  bitrate,
object  userdata = null 
)
static

Create stream info for an Opus audio stream.

Parameters
samplingRateAudio sampling rate.
channelsNumber of channels.
frameDurationUsUncompressed frame (audio packet) size in microseconds.
bitrateStream bitrate (in bits/second).
userdataOptional user data. Should be serializable by Photon.
Returns
VoiceInfo instance.

◆ CreateVideo()

static VoiceInfo CreateVideo ( Codec  codec,
int  bitrate,
int  width,
int  heigth,
int  fps,
int  keyFrameInt,
object  userdata = null 
)
static

Create stream info for a video stream.

Parameters
codecVideo codec.
bitrateStream bitrate.
widthStreamed video width. If 0, width and height of video source used (no rescaling).
heigthStreamed video height. If -1, aspect ratio preserved during rescaling.
fpsStreamed video frames per second.
keyFrameIntKeyframes interval in frames.

///

Parameters
userdataOptional user data. Should be serializable by Photon.
Returns
VoiceInfo instance.

Property Documentation

◆ Bitrate

int Bitrate
getset

Target bitrate (in bits/second).

◆ Channels

int Channels
getset

Number of channels.

◆ FPS

int FPS
getset

Video frames per second

◆ FrameDurationSamples

int FrameDurationSamples
get

Uncompressed frame (data packet) size in samples.

◆ FrameDurationUs

int FrameDurationUs
getset

Uncompressed frame (audio packet) size in microseconds.

◆ FrameSize

int FrameSize
get

Uncompressed frame (data packet) array size.

◆ Height

int Height
getset

Video height

◆ KeyFrameInt

int KeyFrameInt
getset

Video keyframe interval in frames

◆ SamplingRate

int SamplingRate
getset

Audio sampling rate (frequency, in Hz).

◆ UserData

object UserData
getset

Optional user data. Should be serializable by Photon.

◆ Width

int Width
getset

Video width.