public class MediaRecorderConfiguration
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
channelNum
The number of audio channels in the recording.
|
private Constants.MediaRecorderContainerFormat |
containerFormat
The format of the recording file.
|
private int |
fps
The frame rate of the recorded video in frames per second.
|
private int |
height
The height of the recorded video in pixels.
|
private int |
maxDurationMs
The maximum recording duration, in milliseconds.
|
private int |
recorderInfoUpdateInterval
The interval (in milliseconds) for updating the recording information.
|
private int |
sampleRate
The sample rate of the recorded audio in Hz.
|
private java.lang.String |
storagePath
The absolute path (including the filename extensions) of the recording file.
|
private Constants.MediaRecorderStreamType |
streamType
The recording content.
|
private Constants.VideoSourceType |
videoSourceType
The video source type for out channel recorder.
|
private int |
width
The width of the recorded video in pixels.
|
| Constructor and Description |
|---|
MediaRecorderConfiguration()
Constructs a MediaRecorderConfiguration object with default values.
|
MediaRecorderConfiguration(java.lang.String storagePath,
Constants.MediaRecorderContainerFormat containerFormat,
Constants.MediaRecorderStreamType streamType,
int maxDurationMs,
int recorderInfoUpdateInterval,
int width,
int height,
int fps,
int sampleRate,
int channelNum,
Constants.VideoSourceType videoSourceType)
Constructs a MediaRecorderConfiguration object with specified values.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getChannelNum()
Gets the number of audio channels.
|
Constants.MediaRecorderContainerFormat |
getContainerFormat()
Gets the container format of the recording file.
|
int |
getFps()
Gets the frame rate of the recorded video.
|
int |
getHeight()
Gets the height of the recorded video.
|
int |
getMaxDurationMs()
Gets the maximum recording duration in milliseconds.
|
int |
getRecorderInfoUpdateInterval()
Gets the interval for updating the recording information in milliseconds.
|
int |
getSampleRate()
Gets the audio sample rate.
|
java.lang.String |
getStoragePath()
Gets the storage path of the recording file.
|
Constants.MediaRecorderStreamType |
getStreamType()
Gets the stream type of the recording content.
|
Constants.VideoSourceType |
getVideoSourceType()
Gets the video source type.
|
int |
getWidth()
Gets the width of the recorded video.
|
void |
setChannelNum(int channelNum)
Sets the number of audio channels.
|
void |
setContainerFormat(Constants.MediaRecorderContainerFormat containerFormat)
Sets the container format of the recording file.
|
void |
setFps(int fps)
Sets the frame rate of the recorded video.
|
void |
setHeight(int height)
Sets the height of the recorded video.
|
void |
setMaxDurationMs(int maxDurationMs)
Sets the maximum recording duration in milliseconds.
|
void |
setRecorderInfoUpdateInterval(int recorderInfoUpdateInterval)
Sets the interval for updating the recording information in milliseconds.
|
void |
setSampleRate(int sampleRate)
Sets the audio sample rate.
|
void |
setStoragePath(java.lang.String storagePath)
Sets the storage path of the recording file.
|
void |
setStreamType(Constants.MediaRecorderStreamType streamType)
Sets the stream type of the recording content.
|
void |
setVideoSourceType(Constants.VideoSourceType videoSourceType)
Sets the video source type.
|
void |
setWidth(int width)
Sets the width of the recorded video.
|
java.lang.String |
toString()
Returns a string representation of the MediaRecorderConfiguration object.
|
private java.lang.String storagePath
Ensure that the specified path exists and is writable.
private Constants.MediaRecorderContainerFormat containerFormat
Constants.MediaRecorderContainerFormat.private Constants.MediaRecorderStreamType streamType
Constants.MediaRecorderStreamType.private int maxDurationMs
private int recorderInfoUpdateInterval
IAgoraMediaRtcRecorderEventHandler.onRecorderInfoUpdated(String, String, RecorderInfo)
callback to report the updated recording information.private int width
private int height
private int fps
private int sampleRate
private int channelNum
private Constants.VideoSourceType videoSourceType
Constants.VideoSourceType.public MediaRecorderConfiguration()
public MediaRecorderConfiguration(java.lang.String storagePath,
Constants.MediaRecorderContainerFormat containerFormat,
Constants.MediaRecorderStreamType streamType,
int maxDurationMs,
int recorderInfoUpdateInterval,
int width,
int height,
int fps,
int sampleRate,
int channelNum,
Constants.VideoSourceType videoSourceType)
storagePath - The absolute path of the recording filecontainerFormat - The format of the recording filestreamType - The recording content typemaxDurationMs - The maximum recording duration in
millisecondsrecorderInfoUpdateInterval - The interval for updating recording
informationwidth - The width of the recorded videoheight - The height of the recorded videofps - The frame rate of the recorded videosampleRate - The sample rate of the recorded audiochannelNum - The number of audio channelsvideoSourceType - The video source typepublic java.lang.String getStoragePath()
public void setStoragePath(java.lang.String storagePath)
storagePath - The storage path to set.public Constants.MediaRecorderContainerFormat getContainerFormat()
public void setContainerFormat(Constants.MediaRecorderContainerFormat containerFormat)
containerFormat - The container format to set.public Constants.MediaRecorderStreamType getStreamType()
public void setStreamType(Constants.MediaRecorderStreamType streamType)
streamType - The stream type to set.public int getMaxDurationMs()
public void setMaxDurationMs(int maxDurationMs)
maxDurationMs - The maximum recording duration to set.public int getRecorderInfoUpdateInterval()
public void setRecorderInfoUpdateInterval(int recorderInfoUpdateInterval)
recorderInfoUpdateInterval - The interval to set.public int getWidth()
public void setWidth(int width)
width - The video width to set in pixelspublic int getHeight()
public void setHeight(int height)
height - The video height to set in pixelspublic int getFps()
public void setFps(int fps)
fps - The video frame rate to set in fpspublic int getSampleRate()
public void setSampleRate(int sampleRate)
sampleRate - The audio sample rate to set in Hzpublic int getChannelNum()
public void setChannelNum(int channelNum)
channelNum - The number of audio channels to setpublic Constants.VideoSourceType getVideoSourceType()
public void setVideoSourceType(Constants.VideoSourceType videoSourceType)
videoSourceType - The video source type to setpublic java.lang.String toString()
toString in class java.lang.Object