public class LiveVideo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CAMERA_ID_PROPERTY
Property keywords for the video streaming.
|
static java.lang.String |
FPS_PROPERTY |
static java.lang.String |
VIDEO_PROPERTIES |
Constructor and Description |
---|
LiveVideo(XPMobileSDK connection,
VideoReceiver receiver,
java.util.HashMap<java.lang.String,java.lang.Object> requestParams)
Constructs a new LiveVideo object instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Crop(int left,
int top,
int right,
int bottom)
Sends Crop request.
|
ErrorState |
getError()
Gets the last occurred error.
|
boolean |
getIsPull()
Gets the type of streaming.
|
java.lang.String |
getVideoId()
Gets the video id which is set when the requestVideo is executed successfully.
|
ErrorState |
requestVideo()
Requests a video from the Mobile server and if the request is successfully executed then it sets the value for the videoId variable.
|
boolean |
Rescale(int width,
int height)
Sends Rescale request.
|
void |
setIsPull(boolean isPull)
Sets the type of streaming.
|
public static final java.lang.String CAMERA_ID_PROPERTY
public static final java.lang.String VIDEO_PROPERTIES
public static final java.lang.String FPS_PROPERTY
public LiveVideo(XPMobileSDK connection, VideoReceiver receiver, java.util.HashMap<java.lang.String,java.lang.Object> requestParams)
connection
- the connection to the Mobile server.receiver
- the object that implements VideoReceiver interface and will receive the Frames from the Mobile server.requestParams
- the parameters that will be included when the request is created.public ErrorState requestVideo()
public boolean Rescale(int width, int height) throws java.lang.InterruptedException
width
- the width of the Frame that will be requested.height
- the height of the Frame that will be requested.true
if the request is sent successfully
false
if it is not sent successfully .java.lang.InterruptedException
public boolean Crop(int left, int top, int right, int bottom)
left
- Left coordinate (X) of the cropping rectangle.top
- Top coordinate (Y) of the cropping rectangle.right
- Right coordinate (X) of the cropping rectangle.bottom
- Bottom coordinate (Y) of the cropping rectangle.true
if the request is sent successfully
false
if it is not sent successfully .public void setIsPull(boolean isPull)
isPull
- true
- Mobile server pushes only one frame on client request.
false
- Mobile server pushes unlimited stream of frames to the client on its request.public boolean getIsPull()
true
- Mobile server pushes only one frame on client request.
false
- Mobile server pushes unlimited stream of frames to the client on its request.public java.lang.String getVideoId()
public ErrorState getError()