A video format. More...
Public Member Functions | |
fm.liveswitch.VideoFormat | clone () |
Clones this instance. More... | |
String | fourCCToFormatName (int fourcc) |
Converts a FourCC value to its format name. More... | |
int | getFourCC () |
Gets the FourCC value for this format. More... | |
fm.liveswitch.FormatInfo | getInfo () |
Gets this format as an info object. More... | |
boolean | getIsAbgr () |
Gets a value indicating whether this format is ABGR. More... | |
boolean | getIsArgb () |
Gets a value indicating whether this format is ARGB. More... | |
boolean | getIsBgr () |
Gets a value indicating whether this format is BGR. More... | |
boolean | getIsBgra () |
Gets a value indicating whether this format is BGRA. More... | |
boolean | getIsCompressed () |
Gets whether this is a compressed format. More... | |
boolean | getIsH264 () |
Gets a value indicating whether this format is H.264. More... | |
boolean | getIsH265 () |
Gets a value indicating whether this format is H.265. More... | |
boolean | getIsI420 () |
Gets a value indicating whether this format is I420. More... | |
boolean | getIsNv12 () |
Gets a value indicating whether this format is NV12. More... | |
boolean | getIsNv21 () |
Gets a value indicating whether this format is NV21. More... | |
boolean | getIsRaw () |
Gets a value indicating whether this format is RGB, BGR, I420, YV12, NV12, NV21, RGBA, BGRA, ARGB, or ABGR. More... | |
boolean | getIsRgb () |
Gets a value indicating whether this format is RGB. More... | |
boolean | getIsRgba () |
Gets a value indicating whether this format is RGBA. More... | |
boolean | getIsRgbaType () |
Gets a value indicating whether this format is RGBA, BGRA, ARGB, or ABGR. More... | |
boolean | getIsRgbType () |
Gets a value indicating whether this format is RGB or BGR. More... | |
boolean | getIsVp8 () |
Gets a value indicating whether this format is VP8. More... | |
boolean | getIsVp9 () |
Gets a value indicating whether this format is VP9. More... | |
boolean | getIsYuvType () |
Gets a value indicating whether this format is I420, YV12, NV12, or NV21. More... | |
boolean | getIsYv12 () |
Gets a value indicating whether this format is YV12. More... | |
String | getParameters () |
Gets the parameters. More... | |
void | setFourCC (int value) |
Sets the FourCC value for this format. More... | |
String | toJson () |
Serializes this instance to JSON. More... | |
VideoFormat (String name) | |
Initializes a new instance of the fm.liveswitch.VideoFormat class. More... | |
VideoFormat (String name, int clockRate) | |
Initializes a new instance of the fm.liveswitch.VideoFormat class. More... | |
VideoFormat (String name, int clockRate, String packetizationMode) | |
Initializes a new instance of the fm.liveswitch.VideoFormat class. More... | |
VideoFormat (String name, int clockRate, String profile, String level) | |
Initializes a new instance of the fm.liveswitch.VideoFormat class. More... | |
VideoFormat (String name, int clockRate, String profile, String level, String packetizationMode) | |
Initializes a new instance of the fm.liveswitch.VideoFormat class. More... | |
VideoFormat (String name, int clockRate, String profile, String level, String packetizationMode, String tier) | |
Initializes a new instance of the fm.liveswitch.VideoFormat class. More... | |
Static Public Member Functions | |
static int | formatNameToFourCC (String formatName) |
Converts a format name to its FourCC value. More... | |
static fm.liveswitch.VideoFormat | fromFormatInfo (fm.liveswitch.FormatInfo info) |
Transforms a FormatInfo into an VideoFormat. More... | |
static fm.liveswitch.VideoFormat | fromJson (String videoFormatJson) |
Deserializes an instance from JSON. More... | |
static fm.liveswitch.VideoFormat | getAbgr () |
Gets an ABGR video format. More... | |
static String | getAbgrName () |
Gets the name of the ABGR video format ("ABGR"). More... | |
static fm.liveswitch.VideoFormat | getArgb () |
Gets an ARGB video format. More... | |
static String | getArgbName () |
Gets the name of the ARGB video format ("ARGB"). More... | |
static fm.liveswitch.VideoFormat | getBgr () |
Gets a BGR video format. More... | |
static fm.liveswitch.VideoFormat | getBgra () |
Gets an BGRA video format. More... | |
static String | getBgraName () |
Gets the name of the BGRA video format ("BGRA"). More... | |
static String | getBgrName () |
Gets the name of the BGR video format ("BGR"). More... | |
static int | getDefaultClockRate () |
Gets the default clock rate. More... | |
static fm.liveswitch.VideoFormat | getH264 () |
Gets an H.264 video format. More... | |
static String | getH264Name () |
Gets the name of the H.264 video format ("H264"). More... | |
static fm.liveswitch.VideoFormat | getH265 () |
Gets an H.265 video format. More... | |
static String | getH265Name () |
Gets the name of the H.265 video format ("H265"). More... | |
static fm.liveswitch.VideoFormat | getI420 () |
Gets an I420 video format. More... | |
static String | getI420Name () |
Gets the name of the I420 video format ("I420"). More... | |
static fm.liveswitch.VideoFormat | getNv12 () |
Gets an NV12 video format. More... | |
static String | getNv12Name () |
Gets the name of the NV12 video format ("NV12"). More... | |
static fm.liveswitch.VideoFormat | getNv21 () |
Gets an NV21 video format. More... | |
static String | getNv21Name () |
Gets the name of the NV21 video format ("NV21"). More... | |
static fm.liveswitch.VideoFormat | getRgb () |
Gets an RGB video format. More... | |
static fm.liveswitch.VideoFormat | getRgba () |
Gets an RGBA video format. More... | |
static String | getRgbaName () |
Gets the name of the RGBA video format ("RGBA"). More... | |
static String | getRgbName () |
Gets the name of the RGB video format ("RGB"). More... | |
static fm.liveswitch.VideoFormat | getVp8 () |
Gets a VP8 video format. More... | |
static String | getVp8Name () |
Gets the name of the VP8 video format ("VP8"). More... | |
static fm.liveswitch.VideoFormat | getVp9 () |
Gets a VP9 video format. More... | |
static String | getVp9Name () |
Gets the name of the VP9 video format ("VP9"). More... | |
static fm.liveswitch.VideoFormat | getYv12 () |
Gets a YV12 video format. More... | |
static String | getYv12Name () |
Gets the name of the YV12 video format ("YV12"). More... | |
static int | toFourCC (char a, char b, char c, char d) |
Converts 4 FourCC characters to an int. More... | |
static int | toFourCC (String fourcc) |
Converts a FourCC string to a int. More... | |
static String | toJson (final fm.liveswitch.VideoFormat videoFormat) |
Serializes an instance to JSON. More... | |
Protected Member Functions | |
fm.liveswitch.VideoFormat | createInstance () |
Creates a new instance. More... | |
String | getMaxLevel (String level1, String level2) |
Gets the maximum level. More... | |
String | getMinLevel (String level1, String level2) |
Gets the minimum level. More... | |
boolean | isLevelCompatible (String level) |
Gets whether a level is compatible. More... | |
boolean | isProfileCompatible (String profile) |
Gets whether a profile is compatible. More... | |
void | updateProfileToCompatible (fm.liveswitch.VideoFormat format) |
Updates the profile to a compatible value. More... | |
VideoFormat () | |
Initializes a new instance of the fm.liveswitch.VideoFormat class. More... | |
A video format.
|
protected |
Initializes a new instance of the fm.liveswitch.VideoFormat class.
fm.liveswitch.VideoFormat.VideoFormat | ( | String | name | ) |
Initializes a new instance of the fm.liveswitch.VideoFormat class.
name | The name. |
fm.liveswitch.VideoFormat.VideoFormat | ( | String | name, |
int | clockRate | ||
) |
Initializes a new instance of the fm.liveswitch.VideoFormat class.
name | The name. |
clockRate | The clock rate. |
fm.liveswitch.VideoFormat.VideoFormat | ( | String | name, |
int | clockRate, | ||
String | packetizationMode | ||
) |
Initializes a new instance of the fm.liveswitch.VideoFormat class.
name | The name. |
clockRate | The clock rate. |
packetizationMode | The packetization mode. |
fm.liveswitch.VideoFormat.VideoFormat | ( | String | name, |
int | clockRate, | ||
String | profile, | ||
String | level | ||
) |
Initializes a new instance of the fm.liveswitch.VideoFormat class.
name | The name. |
clockRate | The clock rate. |
profile | The media format profile. |
level | The media format level. |
fm.liveswitch.VideoFormat.VideoFormat | ( | String | name, |
int | clockRate, | ||
String | profile, | ||
String | level, | ||
String | packetizationMode | ||
) |
Initializes a new instance of the fm.liveswitch.VideoFormat class.
name | The name. |
clockRate | The clock rate. |
packetizationMode | The packetization mode. |
level | The media format level. |
profile | The media format profile. |
fm.liveswitch.VideoFormat.VideoFormat | ( | String | name, |
int | clockRate, | ||
String | profile, | ||
String | level, | ||
String | packetizationMode, | ||
String | tier | ||
) |
Initializes a new instance of the fm.liveswitch.VideoFormat class.
name | The name. |
clockRate | The clock rate. |
packetizationMode | The packetization mode. |
level | The media format level. |
profile | The media format profile. |
tier | The media format tier. |
fm.liveswitch.VideoFormat fm.liveswitch.VideoFormat.clone | ( | ) |
Clones this instance.
|
protected |
Creates a new instance.
Reimplemented in fm.liveswitch.vp9.Format, fm.liveswitch.vp8.Format, and fm.liveswitch.h264.Format.
|
static |
Converts a format name to its FourCC value.
formatName | The format name. |
String fm.liveswitch.VideoFormat.fourCCToFormatName | ( | int | fourcc | ) |
Converts a FourCC value to its format name.
fourcc | The FourCC value. |
|
static |
Transforms a FormatInfo into an VideoFormat.
info | The format info. |
|
static |
Deserializes an instance from JSON.
videoFormatJson | The video format JSON. |
|
static |
Gets an ABGR video format.
|
static |
Gets the name of the ABGR video format ("ABGR").
Indicates that each pixel occupies 32 bits (8 bits for alpha, then 8 bits for blue, then8 bits for green, then 8 bits for red).
|
static |
Gets an ARGB video format.
|
static |
Gets the name of the ARGB video format ("ARGB").
Indicates that each pixel occupies 32 bits (8 bits for alpha, then 8 bits for red, then 8 bits for green, then 8 bits for blue).
|
static |
Gets a BGR video format.
|
static |
Gets an BGRA video format.
|
static |
Gets the name of the BGRA video format ("BGRA").
Indicates that each pixel occupies 32 bits (8 bits for blue, then8 bits for green, then 8 bits for red, then 8 bits for alpha).
|
static |
Gets the name of the BGR video format ("BGR").
Indicates that each pixel occupies 24 bits (8 bits for blue, then8 bits for green, then 8 bits for red).
|
static |
Gets the default clock rate.
int fm.liveswitch.VideoFormat.getFourCC | ( | ) |
Gets the FourCC value for this format.
|
static |
Gets an H.264 video format.
|
static |
Gets the name of the H.264 video format ("H264").
|
static |
Gets an H.265 video format.
|
static |
Gets the name of the H.265 video format ("H265").
|
static |
Gets an I420 video format.
|
static |
Gets the name of the I420 video format ("I420").
Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by U plane and then V plane.
fm.liveswitch.FormatInfo fm.liveswitch.VideoFormat.getInfo | ( | ) |
Gets this format as an info object.
boolean fm.liveswitch.VideoFormat.getIsAbgr | ( | ) |
Gets a value indicating whether this format is ABGR.
boolean fm.liveswitch.VideoFormat.getIsArgb | ( | ) |
Gets a value indicating whether this format is ARGB.
boolean fm.liveswitch.VideoFormat.getIsBgr | ( | ) |
Gets a value indicating whether this format is BGR.
boolean fm.liveswitch.VideoFormat.getIsBgra | ( | ) |
Gets a value indicating whether this format is BGRA.
boolean fm.liveswitch.VideoFormat.getIsCompressed | ( | ) |
Gets whether this is a compressed format.
boolean fm.liveswitch.VideoFormat.getIsH264 | ( | ) |
Gets a value indicating whether this format is H.264.
boolean fm.liveswitch.VideoFormat.getIsH265 | ( | ) |
Gets a value indicating whether this format is H.265.
boolean fm.liveswitch.VideoFormat.getIsI420 | ( | ) |
Gets a value indicating whether this format is I420.
boolean fm.liveswitch.VideoFormat.getIsNv12 | ( | ) |
Gets a value indicating whether this format is NV12.
boolean fm.liveswitch.VideoFormat.getIsNv21 | ( | ) |
Gets a value indicating whether this format is NV21.
boolean fm.liveswitch.VideoFormat.getIsRaw | ( | ) |
Gets a value indicating whether this format is RGB, BGR, I420, YV12, NV12, NV21, RGBA, BGRA, ARGB, or ABGR.
boolean fm.liveswitch.VideoFormat.getIsRgb | ( | ) |
Gets a value indicating whether this format is RGB.
boolean fm.liveswitch.VideoFormat.getIsRgba | ( | ) |
Gets a value indicating whether this format is RGBA.
boolean fm.liveswitch.VideoFormat.getIsRgbaType | ( | ) |
Gets a value indicating whether this format is RGBA, BGRA, ARGB, or ABGR.
boolean fm.liveswitch.VideoFormat.getIsRgbType | ( | ) |
Gets a value indicating whether this format is RGB or BGR.
boolean fm.liveswitch.VideoFormat.getIsVp8 | ( | ) |
Gets a value indicating whether this format is VP8.
boolean fm.liveswitch.VideoFormat.getIsVp9 | ( | ) |
Gets a value indicating whether this format is VP9.
boolean fm.liveswitch.VideoFormat.getIsYuvType | ( | ) |
Gets a value indicating whether this format is I420, YV12, NV12, or NV21.
boolean fm.liveswitch.VideoFormat.getIsYv12 | ( | ) |
Gets a value indicating whether this format is YV12.
|
protected |
Gets the maximum level.
level1 | The first level. |
level2 | The second level. |
|
protected |
Gets the minimum level.
level1 | The first level. |
level2 | The second level. |
|
static |
Gets an NV12 video format.
|
static |
Gets the name of the NV12 video format ("NV12").
Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by interleaved U/V plane.
|
static |
Gets an NV21 video format.
|
static |
Gets the name of the NV21 video format ("NV21").
Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by interleaved V/U plane.
String fm.liveswitch.VideoFormat.getParameters | ( | ) |
Gets the parameters.
|
static |
Gets an RGB video format.
|
static |
Gets an RGBA video format.
|
static |
Gets the name of the RGBA video format ("RGBA").
Indicates that each pixel occupies 32 bits (8 bits for red, then 8 bits for green, then 8 bits for blue, then 8 bits for alpha).
|
static |
Gets the name of the RGB video format ("RGB").
Indicates that each pixel occupies 24 bits (8 bits for red, then 8 bits for green, then 8 bits for blue).
|
static |
Gets a VP8 video format.
|
static |
Gets the name of the VP8 video format ("VP8").
|
static |
Gets a VP9 video format.
|
static |
Gets the name of the VP9 video format ("VP9").
|
static |
Gets a YV12 video format.
|
static |
Gets the name of the YV12 video format ("YV12").
Indicates that each pixel occupies 12 bits (8 bits for Y, 2 bits for U, and 2 bits for V). Y plane is followed by V plane and then U plane.
|
protected |
Gets whether a level is compatible.
level | The level. |
|
protected |
Gets whether a profile is compatible.
profile | The profile. |
void fm.liveswitch.VideoFormat.setFourCC | ( | int | value | ) |
Sets the FourCC value for this format.
|
static |
Converts 4 FourCC characters to an int.
|
static |
Converts a FourCC string to a int.
fourcc | The fourcc. |
String fm.liveswitch.VideoFormat.toJson | ( | ) |
Serializes this instance to JSON.
|
static |
Serializes an instance to JSON.
videoFormat | The video format. |
|
protected |
Updates the profile to a compatible value.
format | The format. |