Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class VideoStreamManager

Hierarchy

java.lang.Object
     com.smartdevicelink.managers.BaseSubManager

Package
com.smartdevicelink.managers.video

Fields

Inherited Fields

From Class Fields
com.smartdevicelink.managers.BaseSubManager SETTING_UP, READY, LIMITED, SHUTDOWN, ERROR, internalInterface

Constructors

VideoStreamManager( ISdl internalInterface )

public VideoStreamManager(ISdl internalInterface)

Parameters

internalInterface

Methods

start( CompletionListener listener )

public void start(CompletionListener listener)

Parameters

listener

startRemoteDisplayStream( Context context, java.lang.Class<? extends com.smartdevicelink.streaming.video.SdlRemoteDisplay> remoteDisplayClass, VideoStreamingParameters parameters, boolean encrypted )

Starts streaming a remote display to the module if there is a connected session. This method of streaming requires the device to be on API level 19 or higher

public void startRemoteDisplayStream(Context context,java.lang.Class<? extends com.smartdevicelink.streaming.video.SdlRemoteDisplay> remoteDisplayClass,VideoStreamingParameters parameters,boolean encrypted)

Parameters

context
a context that can be used to create the remote display
remoteDisplayClass
class object of the remote display. This class will be used to create an instance of the remote display and will be projected to the module
parameters
streaming parameters to be used when streaming. If null is sent in, the default/optimized options will be used. If you are unsure about what parameters to be used it is best to just send null and let the system determine what works best for the currently connected module.
encrypted
a flag of if the stream should be encrypted. Only set if you have a supplied encryption library that the module can understand.

startVideoService( VideoStreamingParameters parameters, boolean encrypted )

Opens a video service (service type 11) and subsequently provides an IVideoStreamListener to the app to send video data. The supplied VideoStreamingParameters will be set as desired paramaters that will be used to negotiate

protected com.smartdevicelink.proxy.interfaces.IVideoStreamListener startVideoService(VideoStreamingParameters parameters,boolean encrypted)

Parameters

parameters
Video streaming parameters including: codec which will be used for streaming (currently, only VideoStreamingCodec.H264 is accepted), height and width of the video in pixels.
encrypted
Specify true if packets on this service have to be encrypted

stopStreaming()

Stops streaming from the remote display. To restart, call

public void stopStreaming()

resumeStreaming()

Resumes streaming after calling

public void resumeStreaming()

dispose()

Stops streaming, ends video streaming service and removes service listeners.

public void dispose()

isServiceActive()

Check if a video service is currently active

public boolean isServiceActive()

isStreaming()

Check if video is currently streaming and visible

public boolean isStreaming()

isPaused()

Check if video streaming has been paused due to app moving to background or manually stopped

public boolean isPaused()

currentVideoStreamState()

Gets the current video streaming state as defined in @StreamingStateMachine

public int currentVideoStreamState()

convertTouchEvent( OnTouchEvent touchEvent )

protected android.view.MotionEvent convertTouchEvent(OnTouchEvent touchEvent)

Parameters

touchEvent

onTransportUpdate( java.util.List<com.smartdevicelink.transport.utl.TransportRecord> connectedTransports, boolean audioStreamTransportAvail, boolean videoStreamTransportAvail )

protected void onTransportUpdate(java.util.List<com.smartdevicelink.transport.utl.TransportRecord> connectedTransports,boolean audioStreamTransportAvail,boolean videoStreamTransportAvail)

Parameters

connectedTransports
audioStreamTransportAvail
videoStreamTransportAvail

Inherited Methods

From Class Methods
com.smartdevicelink.managers.BaseSubManager start, dispose, transitionToState, getState, handleTransportUpdated, onTransportUpdate
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section