public class VideoViewLayer
extends java.lang.Object
Constructor and Description |
---|
VideoViewLayer(java.lang.String id,
android.view.View v,
android.widget.RelativeLayout.LayoutParams rlp)
Create a video view layer as a set
|
VideoViewLayer(java.lang.String id,
android.view.View v,
android.widget.RelativeLayout.LayoutParams rlp,
boolean alwaysOn)
Construct a Video View Layer with a provided identifier and the view to be drawn over the
top of the video being played.
|
VideoViewLayer(java.lang.String id,
android.view.View v,
android.widget.RelativeLayout.LayoutParams rlp,
boolean alwaysOn,
boolean enableStockMetadata)
Construct a Video View Layer with a provided identifier and the view to be drawn over the
top of the video being played.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Call to close the drop down that is currently open.
|
void |
dispose()
Dispose the components that are set via the initialize
|
void |
enableStructuredDecoding()
Enables more advanced structure decoding required by specifications such as VMTI.
|
void |
error(ConnectionEntry connectionEntry)
Called when video processing was unable to start due to an error.
|
ConnectionEntry |
getEntry()
Get a copy of the connection entry
|
boolean |
isAlwaysOn()
Return true if the layer is always on .
|
void |
metadataChanged(KLVData rawData,
java.util.Map<DecodedMetadataItem.MetadataItemIDs,DecodedMetadataItem> items)
The metadata change listener.
|
void |
onLongPress(android.view.MotionEvent e) |
void |
setPan(int x,
int y)
Called when the video is panned by the user.
|
void |
setScale(double scale)
Called when the video is scaled by the user
|
void |
setViewMatrix(android.graphics.Matrix matrix)
Called when the video is panned or scaled by the user
|
void |
start(ConnectionEntry connectionEntry,
boolean hasMetadata)
Called when video processing has started.
|
void |
stop(ConnectionEntry connectionEntry)
Called when video processing has stopped.
|
void |
videoSizeChanged(int w,
int h)
Called when the video size has changed
|
public VideoViewLayer(java.lang.String id, android.view.View v, android.widget.RelativeLayout.LayoutParams rlp)
id
- the unique identifier that describes the layer.v
- the view that is to be displayedrlp
- the layout parameters associated with the view.public VideoViewLayer(java.lang.String id, android.view.View v, android.widget.RelativeLayout.LayoutParams rlp, boolean alwaysOn)
id
- the id of the video viewv
- the viewrlp
- the layout parameters for the viewalwaysOn
- if the view needs to be explicitly defined in the layers intent string array
extra (false) or if it is always going to be shown (true).public VideoViewLayer(java.lang.String id, android.view.View v, android.widget.RelativeLayout.LayoutParams rlp, boolean alwaysOn, boolean enableStockMetadata)
id
- the id of the video viewv
- the viewrlp
- the layout parameters for the viewalwaysOn
- if the view needs to be explicitly defined in the layers intent string array
extra (false) or if it is always going to be shown (true).enableStockMetadata
- if set to false, the stock metadata display for the frame center
will not be rendered. It is up to this video view layer to
render all desired metadata.public final void enableStructuredDecoding()
public void start(ConnectionEntry connectionEntry, boolean hasMetadata)
connectionEntry
- the connection entry representing the videopublic void stop(ConnectionEntry connectionEntry)
connectionEntry
- the connection entry representing the videopublic void error(ConnectionEntry connectionEntry)
connectionEntry
- the connection entry representing the videopublic final void close()
public void dispose()
public void setPan(int x, int y)
x
- the new center point x valuey
- the new center point y valuepublic void setScale(double scale)
scale
- the new scale valuepublic void setViewMatrix(android.graphics.Matrix matrix)
matrix
- Matrix used to transform a view so it matches the video
Note: Any overlay view MUST match the size of the entire video
surface. Drawing code should treat the video as if it's stretched
to cover the entire surface, since this matrix includes aspect
ratio scaling and centering.public void videoSizeChanged(int w, int h)
w
- New video widthh
- New video heightpublic void metadataChanged(KLVData rawData, java.util.Map<DecodedMetadataItem.MetadataItemIDs,DecodedMetadataItem> items)
rawData
- The raw metadata wrapped in a KLVData object.items
- the decoded values as ids and items.public boolean isAlwaysOn()
public ConnectionEntry getEntry()
public void onLongPress(android.view.MotionEvent e)