public class VideoProfile extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
VideoProfile.CameraCapabilities
Represents the camera capabilities important to a Video Telephony provider.
|
static interface |
VideoProfile.VideoQuality |
static interface |
VideoProfile.VideoState |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<VideoProfile> |
CREATOR
Responsible for creating VideoProfile objects from deserialized Parcels.
|
static int |
QUALITY_DEFAULT
Use default video quality.
|
static int |
QUALITY_HIGH
"High" video quality.
|
static int |
QUALITY_LOW
"Low" video quality.
|
static int |
QUALITY_MEDIUM
"Medium" video quality.
|
static int |
QUALITY_UNKNOWN
"Unknown" video quality.
|
static int |
STATE_AUDIO_ONLY
Used when answering or dialing a call to indicate that the call does not have a video
component.
|
static int |
STATE_BIDIRECTIONAL
Video signal is bi-directional.
|
static int |
STATE_PAUSED
Video is paused.
|
static int |
STATE_RX_ENABLED
Video reception is enabled.
|
static int |
STATE_TX_ENABLED
Video transmission is enabled.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
VideoProfile(int videoState)
Creates an instance of the VideoProfile
|
VideoProfile(int videoState,
int quality)
Creates an instance of the VideoProfile
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
int |
getQuality()
The desired video quality for the call.
|
int |
getVideoState()
The video state of the call.
|
static boolean |
isAudioOnly(int videoState)
Indicates whether the video state is audio only.
|
static boolean |
isBidirectional(int videoState)
Indicates whether the video state is bi-directional.
|
static boolean |
isPaused(int videoState)
Indicates whether the video state is paused.
|
static boolean |
isReceptionEnabled(int videoState)
Indicates whether the video state has video reception enabled.
|
static boolean |
isTransmissionEnabled(int videoState)
Indicates whether the video state has video transmission enabled.
|
static boolean |
isVideo(int videoState)
Indicates whether video transmission or reception is enabled for a video state.
|
String |
toString()
Returns a string representation of the object.
|
static String |
videoStateToString(int videoState)
Generates a string representation of a video state.
|
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final int QUALITY_UNKNOWN
public static final int QUALITY_HIGH
public static final int QUALITY_MEDIUM
public static final int QUALITY_LOW
public static final int QUALITY_DEFAULT
public static final int STATE_AUDIO_ONLY
Should not be used in comparison checks to determine if a video state represents an audio-only call.
The following, for example, is not the correct way to check if a call is audio-only:
// This is the incorrect way to check for an audio-only call.
if (videoState == VideoProfile.STATE_AUDIO_ONLY) {
// Handle audio-only call.
}
Instead, use the isAudioOnly(int)
helper function to check if a
video state represents an audio-only call:
// This is the correct way to check for an audio-only call.
if (VideoProfile.isAudioOnly(videoState)) {
// Handle audio-only call.
}
public static final int STATE_TX_ENABLED
public static final int STATE_RX_ENABLED
public static final int STATE_BIDIRECTIONAL
public static final int STATE_PAUSED
public static final Parcelable.Creator<VideoProfile> CREATOR
public VideoProfile(int videoState)
videoState
- The video state.public VideoProfile(int videoState, int quality)
videoState
- The video state.quality
- The video quality.public int getVideoState()
STATE_AUDIO_ONLY
,
STATE_BIDIRECTIONAL
,
STATE_TX_ENABLED
,
STATE_RX_ENABLED
,
STATE_PAUSED
.public int getQuality()
QUALITY_HIGH
, QUALITY_MEDIUM
,
QUALITY_LOW
, QUALITY_DEFAULT
.public int describeContents()
describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public static String videoStateToString(int videoState)
videoState
- The video state.public static boolean isAudioOnly(int videoState)
videoState
- The video state.True
if the video state is audio only, false
otherwise.public static boolean isVideo(int videoState)
videoState
- The video state.True
if video transmission or reception is enabled, false
otherwise.public static boolean isTransmissionEnabled(int videoState)
videoState
- The video state.True
if video transmission is enabled, false
otherwise.public static boolean isReceptionEnabled(int videoState)
videoState
- The video state.True
if video reception is enabled, false
otherwise.public static boolean isBidirectional(int videoState)
videoState
- The video state.True
if the video is bi-directional, false
otherwise.public static boolean isPaused(int videoState)
videoState
- The video state.True
if the video is paused, false
otherwise.