public class StreamingProfile
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StreamingProfile.AudioProfile
Audio profile for encoding.
|
static class |
StreamingProfile.AVProfile
Audio and video profile for encoding.
|
static class |
StreamingProfile.EncoderRCModes
Rate control mode for software encoding only.
|
static class |
StreamingProfile.ENCODING_ORIENTATION
The encoding orientation that can be used.
|
static class |
StreamingProfile.SendingBufferProfile
Running has no effect at current version.
|
static class |
StreamingProfile.Stream
The nested class is the concept for Pili's Stream from Pili Streaming Cloud Service.
|
static class |
StreamingProfile.StreamStatus
The nested class is for feedbacking the av status in real time.
|
static class |
StreamingProfile.StreamStatusConfig
The configuration for
StreamingProfile.StreamStatus |
static class |
StreamingProfile.VideoEncodingSize |
static class |
StreamingProfile.VideoProfile
Video profile for encoding.
|
Modifier and Type | Field and Description |
---|---|
static int |
AUDIO_QUALITY_HIGH1
The Audio Quality High1.
|
static int |
AUDIO_QUALITY_HIGH2
The Audio Quality High2.
|
static int |
AUDIO_QUALITY_LOW1
The Audio Quality Low1.
|
static int |
AUDIO_QUALITY_LOW2
The Audio Quality Low2.
|
static int |
AUDIO_QUALITY_MEDIUM1
The Audio Quality Medium1.
|
static int |
AUDIO_QUALITY_MEDIUM2
The Audio Quality Medium2.
|
static int |
HIGH_LEVEL
The high level for quality.
|
static int |
LOW_LEVEL
The low level for quality.
|
static int |
MEDIUM_LEVEL
The medium level for quality.
|
static int |
QUALITY_HIGH1
Deprecated.
replaced by
VIDEO_QUALITY_HIGH1 |
static int |
QUALITY_HIGH2
Deprecated.
replaced by
VIDEO_QUALITY_HIGH2 |
static int |
QUALITY_HIGH3
Deprecated.
replaced by
VIDEO_QUALITY_HIGH3 |
static int |
QUALITY_LOW1
Deprecated.
replaced by
VIDEO_QUALITY_LOW1 |
static int |
QUALITY_LOW2
Deprecated.
replaced by
VIDEO_QUALITY_LOW2 |
static int |
QUALITY_LOW3
Deprecated.
replaced by
VIDEO_QUALITY_LOW3 |
static int |
QUALITY_MEDIUM1
Deprecated.
replaced by
VIDEO_QUALITY_MEDIUM1 |
static int |
QUALITY_MEDIUM2
Deprecated.
replaced by
VIDEO_QUALITY_MEDIUM2 |
static int |
QUALITY_MEDIUM3
Deprecated.
replaced by
VIDEO_QUALITY_MEDIUM3 |
static int |
VIDEO_ENCODING_HEIGHT_1088
The Video Encoding Size Level for height 1088 in pixels.
|
static int |
VIDEO_ENCODING_HEIGHT_240
The Video Encoding Size Level for height 240 in pixels.
|
static int |
VIDEO_ENCODING_HEIGHT_480
The Video Encoding Size Level for height 480 in pixels.
|
static int |
VIDEO_ENCODING_HEIGHT_544
The Video Encoding Size Level for height 544 in pixels.
|
static int |
VIDEO_ENCODING_HEIGHT_720
The Video Encoding Size Level for height 720 in pixels.
|
static int |
VIDEO_ENCODING_SIZE_FHD
Deprecated.
replaced by
VIDEO_ENCODING_HEIGHT_1088 |
static int |
VIDEO_ENCODING_SIZE_HD
Deprecated.
replaced by
VIDEO_ENCODING_HEIGHT_720 |
static int |
VIDEO_ENCODING_SIZE_QVGA
Deprecated.
replaced by
VIDEO_ENCODING_HEIGHT_240 |
static int |
VIDEO_ENCODING_SIZE_VGA
Deprecated.
replaced by
VIDEO_ENCODING_HEIGHT_480 |
static int |
VIDEO_QUALITY_HIGH1
The Video Quality High1.
|
static int |
VIDEO_QUALITY_HIGH2
The Video Quality High2.
|
static int |
VIDEO_QUALITY_HIGH3
The Video Quality High3.
|
static int |
VIDEO_QUALITY_LOW1
The Video Quality Low1.
|
static int |
VIDEO_QUALITY_LOW2
The Video Quality Low2.
|
static int |
VIDEO_QUALITY_LOW3
The Video Quality Low3.
|
static int |
VIDEO_QUALITY_MEDIUM1
The Video Quality Medium1.
|
static int |
VIDEO_QUALITY_MEDIUM2
The Video Quality Medium2.
|
static int |
VIDEO_QUALITY_MEDIUM3
The Video Quality Medium3.
|
Constructor and Description |
---|
StreamingProfile() |
@Deprecated public static final int QUALITY_LOW1
VIDEO_QUALITY_LOW1
@Deprecated public static final int QUALITY_LOW2
VIDEO_QUALITY_LOW2
@Deprecated public static final int QUALITY_LOW3
VIDEO_QUALITY_LOW3
@Deprecated public static final int QUALITY_MEDIUM1
VIDEO_QUALITY_MEDIUM1
@Deprecated public static final int QUALITY_MEDIUM2
VIDEO_QUALITY_MEDIUM2
@Deprecated public static final int QUALITY_MEDIUM3
VIDEO_QUALITY_MEDIUM3
@Deprecated public static final int QUALITY_HIGH1
VIDEO_QUALITY_HIGH1
@Deprecated public static final int QUALITY_HIGH2
VIDEO_QUALITY_HIGH2
@Deprecated public static final int QUALITY_HIGH3
VIDEO_QUALITY_HIGH3
public static final int VIDEO_QUALITY_LOW1
public static final int VIDEO_QUALITY_LOW2
public static final int VIDEO_QUALITY_LOW3
public static final int VIDEO_QUALITY_MEDIUM1
public static final int VIDEO_QUALITY_MEDIUM2
public static final int VIDEO_QUALITY_MEDIUM3
public static final int VIDEO_QUALITY_HIGH1
public static final int VIDEO_QUALITY_HIGH2
public static final int VIDEO_QUALITY_HIGH3
public static final int AUDIO_QUALITY_LOW1
public static final int AUDIO_QUALITY_LOW2
public static final int AUDIO_QUALITY_MEDIUM1
public static final int AUDIO_QUALITY_MEDIUM2
public static final int AUDIO_QUALITY_HIGH1
public static final int AUDIO_QUALITY_HIGH2
public static final int LOW_LEVEL
public static final int MEDIUM_LEVEL
public static final int HIGH_LEVEL
public static final int VIDEO_ENCODING_HEIGHT_240
public static final int VIDEO_ENCODING_HEIGHT_480
public static final int VIDEO_ENCODING_HEIGHT_544
public static final int VIDEO_ENCODING_HEIGHT_720
public static final int VIDEO_ENCODING_HEIGHT_1088
@Deprecated public static final int VIDEO_ENCODING_SIZE_QVGA
VIDEO_ENCODING_HEIGHT_240
@Deprecated public static final int VIDEO_ENCODING_SIZE_VGA
VIDEO_ENCODING_HEIGHT_480
@Deprecated public static final int VIDEO_ENCODING_SIZE_HD
VIDEO_ENCODING_HEIGHT_720
@Deprecated public static final int VIDEO_ENCODING_SIZE_FHD
VIDEO_ENCODING_HEIGHT_1088
public StreamingProfile setPreferredVideoEncodingSize(int width, int height)
width
- the width in pixels of the encoding size.height
- the height in pixels of the encoding size.public StreamingProfile setEncodingSizeLevel(int level)
Optional values:
level
- the specified encoding size level.java.lang.IllegalArgumentException
- If the level is not in the range of
[VIDEO_ENCODING_HEIGHT_240
, VIDEO_ENCODING_HEIGHT_1088
]public int getEncodingSizeLevel()
public StreamingProfile setSendTimeoutInSecond(int sendTimeout)
sendTimeout
- the timeout valuejava.lang.IllegalArgumentException
- if sendTimeout is lower than 3spublic StreamingProfile setEncoderRCMode(StreamingProfile.EncoderRCModes mode)
mode
- the StreamingProfile.EncoderRCModes
public StreamingProfile.EncoderRCModes getEncoderRCMode()
public StreamingProfile setStream(StreamingProfile.Stream stream)
StreamingProfile.Stream
Object.stream
- the new StreamingProfile.Stream
Object.java.lang.IllegalArgumentException
- if StreamingProfile.Stream
is illegal.public StreamingProfile setPublishUrl(java.lang.String url) throws java.net.URISyntaxException
url
- the publish Url.java.net.URISyntaxException
- if url is invalid.public StreamingProfile setAVProfile(StreamingProfile.AVProfile avProfile)
StreamingProfile.AVProfile
Object which include the StreamingProfile.AudioProfile
and StreamingProfile.VideoProfile
.avProfile
- the StreamingProfile.AVProfile
Object.public StreamingProfile setEncodingOrientation(StreamingProfile.ENCODING_ORIENTATION orientation)
Only restart streaming or switching camera takes effect.
You should pay attention to the encoding orientation is not camera preview orientation.
orientation
- if you didn't set the value before
CameraStreamingManager.prepare(CameraStreamingSetting, StreamingProfile)
,
the encoding orientation will follow Activity's Orientation which set by
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
or
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
public StreamingProfile.ENCODING_ORIENTATION getEncodingOrientation()
StreamingProfile.ENCODING_ORIENTATION
.StreamingProfile.ENCODING_ORIENTATION
.public StreamingProfile setStreamStatusConfig(StreamingProfile.StreamStatusConfig ssConfig)
StreamingProfile.StreamStatusConfig
.ssConfig
- the preferred StreamingProfile.StreamStatusConfig
.public StreamingProfile setDnsManager(DnsManager dnsManager)
DnsManager
.
The following situations you should know:
DnsManager
and access by the original host.DnsManager
, means preferred DnsManager
will be used.Special Reference:
For more information about using HappyDns, click the here
dnsManager
- the DnsManager
public static DnsManager getDnsManager()
DnsManager
DnsManager
public StreamingProfile.Stream getStream()
StreamingProfile.Stream
Object.StreamingProfile.Stream
Object.@Deprecated public StreamingProfile setQuality(int quality)
setVideoQuality(int)
public java.util.Map<java.lang.Integer,java.lang.Integer> getSupportAudioQualities()
level may be:
quality may be:public java.util.Map<java.lang.Integer,java.lang.Integer> getSupportVideoQualities()
level may be:
quality may be:public int getCurrentVideoQuality()
public int getCurrentAudioQuality()
public StreamingProfile setVideoQuality(int vQuality)
Optional values:
vQuality
- the video qualityjava.lang.IllegalArgumentException
- If the video quality is not in the range of
[VIDEO_QUALITY_LOW1
, VIDEO_QUALITY_HIGH3
]public StreamingProfile setAudioQuality(int aQuality)
Optional values:
aQuality
- the audio qualityjava.lang.IllegalArgumentException
- If the audio quality is not in the range of
[AUDIO_QUALITY_LOW1
, AUDIO_QUALITY_HIGH2
]public StreamingProfile.VideoProfile getVideoProfile()
public CPUWorkload getCPUWorkload()
public java.lang.String getLocalFileAbsolutePath()
public StreamingProfile.AudioProfile getAudioProfile()
public StreamingProfile setLocalFileAbsolutePath(java.lang.String path)
public StreamingProfile.SendingBufferProfile getSendingBufferInfo()
public StreamingProfile setSendingBufferProfile(StreamingProfile.SendingBufferProfile bufferInfo)
public boolean reduceVideoQuality(int grade)
public boolean improveVideoQuality(int grade)
public StreamingProfile.StreamStatus getStreamStatus()
public java.lang.String getPublishHost()
public java.util.Map<java.lang.Integer,java.lang.Integer> getVideoQualityRank()
public boolean isStableQuality(int quality)
public int getBestFromVideoQualityRank()
public boolean isQualityBest(int quality)
public StreamingProfile.VideoEncodingSize getVideoEncodingSize(CameraStreamingSetting.PREVIEW_SIZE_RATIO ratio)
public static int getSendTimeout()
public StreamingProfile.StreamStatusConfig getStreamStatusConfig()
public boolean isEncodingLandscape()
public java.lang.String getPublishUrl()