public class RCRTCCDNInputStreamImpl extends RCInputStreamImpl implements RCRTCCDNInputStream
RCRTCStream.RCRTCType
RONG_TAG, TAG_CDN, TAG_DEFAULT, TAG_MCU_LIVE, TAG_SCREEN_SHARE
构造器和说明 |
---|
RCRTCCDNInputStreamImpl(String cdnServer,
RCRTCRoomType roomType,
String roomId,
RCRTCParamsType.RCRTCVideoResolution highestResolution,
RCRTCParamsType.RCRTCVideoFps highestFPS,
boolean pull_safe,
int originalMaximumWidth,
int originalMaximumHeight) |
限定符和类型 | 方法和说明 |
---|---|
String |
getCDNServer() |
String |
getCurrentPlaybackAddress() |
RCRTCParamsType.RCRTCVideoFps |
getDesiredFPS() |
int |
getDesiredHeight() |
int |
getDesiredWidth() |
RCRTCParamsType.RCRTCVideoFps |
getHighestFPS()
Added from 5.1.5
当前订阅成功的 CDN 流最高支持的帧率
|
RCRTCParamsType.RCRTCVideoResolution |
getHighestResolution()
Added from 5.1.5
当前订阅成功的 CDN 流最高支持的分辨率
|
RCRTCMediaType |
getMediaType()
获取媒体流类型
|
int |
getOriginalMaximumHeight() |
int |
getOriginalMaximumWidth() |
RCRTCResourceState |
getResourceState()
获取媒体流资源状态
|
String |
getStreamId()
获取媒体流 ID
ID 的生成规则是 'userID' + '_' + 'tag'
此 ID 并不能作为唯一标识来区分流,比如同一个用户发布的默认音频和视频流的 ID 是一样的
如果需要获取一个唯一标识,可以用 ID + mediaType
|
String |
getTag()
获取媒体流扩展标识符
userId+mediaType+tag 可以唯一的确定用户发布的流
|
MediaStreamTrack |
getTrack() |
String |
getUri() |
RCRTCParamsType.RCRTCVideoFps |
getVideoFps()
Added from 5.1.5
获取订阅 CDN 流前设置的帧率
|
RCRTCParamsType.RCRTCVideoResolution |
getVideoResolution()
Added from 5.1.5
获取订阅 CDN 流前设置的分辨率
|
RCRTCVideoView |
getVideoView()
Added from 5.1.5
获取视频流的渲染视图
|
boolean |
isMute()
获取媒体流禁用状态
|
boolean |
isPull_safe() |
void |
mute(boolean mute)
设置媒体流禁用状态
对于本地资源流:如果 mute 为 true 则不在发送本地资源(不影响资源采集和本地预览)
对于远端资源流:如果 mue 为 true 则不在播放或渲染远端资源(但还是会正常接收远端资源)
|
void |
setCurrentPlaybackAddress(String mCurrentPlaybackAddress) |
void |
setDesiredVideoResolution(int desiredW,
int desiredH,
RCRTCParamsType.RCRTCVideoFps desiredFPS) |
void |
setHighestFPS(RCRTCParamsType.RCRTCVideoFps mHighestFPS) |
void |
setHighestResolution(RCRTCParamsType.RCRTCVideoResolution mHighestResolution) |
void |
setMute(boolean mMute) |
void |
setOriginalMaximum(int width,
int height)
记录当前房间中CDN流最高分辨率,不能使用setHighestResolution 设置的。
|
void |
setStreamConfig(RCRTCParamsType.RCRTCVideoResolution videoResolution,
RCRTCParamsType.RCRTCVideoFps fps) |
void |
setTrack(MediaStreamTrack track) |
void |
setVideoConfig(RCRTCParamsType.RCRTCVideoResolution videoResolution,
RCRTCParamsType.RCRTCVideoFps videoFps,
IRCRTCResultCallback callback)
Added from 5.1.5
该方法有两个功能如下:
1.
|
void |
setVideoView(RCRTCVideoView videoView)
Added from 5.1.5
设置视频流的渲染视图
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType, getUserId
public RCRTCCDNInputStreamImpl(String cdnServer, RCRTCRoomType roomType, String roomId, RCRTCParamsType.RCRTCVideoResolution highestResolution, RCRTCParamsType.RCRTCVideoFps highestFPS, boolean pull_safe, int originalMaximumWidth, int originalMaximumHeight)
public void setVideoView(RCRTCVideoView videoView)
RCRTCCDNInputStream
setVideoView
在接口中 RCRTCCDNInputStream
videoView
- RCRTCVideoViewpublic RCRTCVideoView getVideoView()
RCRTCCDNInputStream
getVideoView
在接口中 RCRTCCDNInputStream
public void setVideoConfig(RCRTCParamsType.RCRTCVideoResolution videoResolution, RCRTCParamsType.RCRTCVideoFps videoFps, IRCRTCResultCallback callback)
RCRTCCDNInputStream
setVideoConfig
在接口中 RCRTCCDNInputStream
videoResolution
- 默认为null。为null时默认订阅原始 CDN 流分辨率videoFps
- 默认为null。为null时默认订阅原始 CDN 流帧率public RCRTCParamsType.RCRTCVideoFps getVideoFps()
RCRTCCDNInputStream
getVideoFps
在接口中 RCRTCCDNInputStream
RCRTCCDNInputStream.getHighestFPS()
。通过RCRTCCDNInputStream#setVideoConfig(RCRTCVideoResolution, RCRTCVideoFps, IRCRTCResultCallback)
设置public RCRTCParamsType.RCRTCVideoResolution getVideoResolution()
RCRTCCDNInputStream
getVideoResolution
在接口中 RCRTCCDNInputStream
RCRTCCDNInputStream.getHighestResolution()
。通过RCRTCCDNInputStream#setVideoConfig(RCRTCVideoResolution, RCRTCVideoFps, IRCRTCResultCallback)
设置public RCRTCParamsType.RCRTCVideoResolution getHighestResolution()
RCRTCCDNInputStream
getHighestResolution
在接口中 RCRTCCDNInputStream
public RCRTCParamsType.RCRTCVideoFps getHighestFPS()
RCRTCCDNInputStream
getHighestFPS
在接口中 RCRTCCDNInputStream
public void setHighestResolution(RCRTCParamsType.RCRTCVideoResolution mHighestResolution)
public void setHighestFPS(RCRTCParamsType.RCRTCVideoFps mHighestFPS)
public void setOriginalMaximum(int width, int height)
width
- height
- public String getStreamId()
RCRTCStream
ID 的生成规则是 'userID' + '_' + 'tag' 此 ID 并不能作为唯一标识来区分流,比如同一个用户发布的默认音频和视频流的 ID 是一样的 如果需要获取一个唯一标识,可以用 ID + mediaType
getStreamId
在接口中 RCRTCStream
public void setTrack(MediaStreamTrack track)
public MediaStreamTrack getTrack()
public RCRTCMediaType getMediaType()
RCRTCStream
getMediaType
在接口中 RCRTCStream
RCRTCMediaType
public String getUri()
public String getTag()
RCRTCStream
getTag
在接口中 RCRTCStream
public RCRTCResourceState getResourceState()
RCRTCStream
getResourceState
在接口中 RCRTCStream
RCRTCResourceState
public void mute(boolean mute)
RCRTCStream
对于本地资源流:如果 mute 为 true 则不在发送本地资源(不影响资源采集和本地预览) 对于远端资源流:如果 mue 为 true 则不在播放或渲染远端资源(但还是会正常接收远端资源)
mute
在接口中 RCRTCStream
public boolean isMute()
RCRTCStream
isMute
在接口中 RCRTCStream
public void setMute(boolean mMute)
public String getCDNServer()
public void setStreamConfig(RCRTCParamsType.RCRTCVideoResolution videoResolution, RCRTCParamsType.RCRTCVideoFps fps)
public String getCurrentPlaybackAddress()
public void setCurrentPlaybackAddress(String mCurrentPlaybackAddress)
public boolean isPull_safe()
public int getOriginalMaximumWidth()
public int getOriginalMaximumHeight()
public int getDesiredWidth()
public int getDesiredHeight()
public RCRTCParamsType.RCRTCVideoFps getDesiredFPS()
public void setDesiredVideoResolution(int desiredW, int desiredH, RCRTCParamsType.RCRTCVideoFps desiredFPS)