Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
Android Documentation
VirtualDisplayEncoder

Class VirtualDisplayEncoder

Hierarchy

java.lang.Object

Package
com.smartdevicelink.encoder

Constructors

VirtualDisplayEncoder()

public VirtualDisplayEncoder()

Methods

init( Context context, IVideoStreamListener outputListener, VideoStreamingParameters streamingParams )

Initialization method for VirtualDisplayEncoder object. MUST be called before start() or shutdown() Will overwrite previously set videoWeight and videoHeight

public void init(Context context,IVideoStreamListener outputListener,VideoStreamingParameters streamingParams) throws java.lang.Exception

Method Parameters

context
to create the virtual display
outputListener
the listener that the video frames will be sent through
streamingParams
parameters to create the virtual display and encoder

Throws

  • java.lang.Exception

getStreamingParams()

public com.smartdevicelink.streaming.video.VideoStreamingParameters getStreamingParams()

setStreamingParams( int displayDensity, ImageResolution resolution, int frameRate, int bitrate, int interval, VideoStreamingFormat format )

Deprecated
This method is deprecated; setStreamingParams with having stableFrameRate should be used.

public void setStreamingParams(int displayDensity,ImageResolution resolution,int frameRate,int bitrate,int interval,VideoStreamingFormat format)

Method Parameters

displayDensity
resolution
frameRate
bitrate
interval
format

setStreamingParams( int displayDensity, ImageResolution resolution, int frameRate, int bitrate, int interval, VideoStreamingFormat format, boolean stableFramerate )

setter of every parameter in streamingParams.

public void setStreamingParams(int displayDensity,ImageResolution resolution,int frameRate,int bitrate,int interval,VideoStreamingFormat format,boolean stableFramerate)

Method Parameters

displayDensity
resolution
frameRate
bitrate
interval
format
stableFramerate

setStreamingParams( VideoStreamingParameters streamingParams )

public void setStreamingParams(VideoStreamingParameters streamingParams)

Method Parameters

streamingParams

start()

NOTE: Must call init() without error before calling this method. Prepares the encoder and virtual display.

public void start() throws java.lang.Exception

Throws

  • java.lang.Exception

shutDown()

public void shutDown()

getVirtualDisplay()

public android.view.Display getVirtualDisplay()

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section