public class VideoFactory
extends java.lang.Object
Constructor and Description |
---|
VideoFactory(XPMobileSDK connection,
VideoReceiver receiver)
Constructs a new VideoFactory object instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Crop(int left,
int top,
int right,
int bottom)
Sends Crop request.
|
java.lang.String |
getVideoId()
Gets the video id of the successfully requested video stream.
|
boolean |
Rescale(int width,
int height)
Sends Rescale request.
|
ErrorState |
startVideo(boolean requiredNativeStreaming,
java.lang.String cameraId,
java.lang.String fps,
java.util.HashMap<java.lang.String,java.lang.String> imageProps,
boolean isLiveVideo,
boolean pullVideo)
Constructs a new VideoFactory object instance.
|
public VideoFactory(XPMobileSDK connection, VideoReceiver receiver)
connection
- the connection to the Mobile server.receiver
- the object that implements VideoReceiver interface and will receive the Frames from the Mobile server.public ErrorState startVideo(boolean requiredNativeStreaming, java.lang.String cameraId, java.lang.String fps, java.util.HashMap<java.lang.String,java.lang.String> imageProps, boolean isLiveVideo, boolean pullVideo)
requiredNativeStreaming
- true
if direct streaming is the only one supported and false
if not.cameraId
- Id of the camera from which will present live videofps
- Frame per second value for the video streaming.imageProps
- The properties of the video stream as width or height of the video and etc.isLiveVideo
- flag thatindicates if the request is for live or for playback video.pullVideo
- Flag that determine the streaming method where:
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 boolean Rescale(int width, int height)
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 .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 .