Preview window control based on TextureView.
More...
|
| NvsLiveWindowExt (Context context) |
|
| NvsLiveWindowExt (Context context, AttributeSet attrs) |
|
| NvsLiveWindowExt (Context context, AttributeSet attrs, int defStyleAttr) |
|
| NvsLiveWindowExt (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) |
|
void | setFillMode (int fillMode) |
| Sets the fill mode of LiveWindow. More...
|
|
int | getFillMode () |
| Gets the fill mode of LiveWindow. More...
|
|
void | setHDRDisplayMode (int hdrMode) |
| Sets the HDR display mode of LiveWindow. More...
|
|
int | getHDRDisplayMode () |
| Gets the HDR display mode of LiveWindow. More...
|
|
PointF | mapCanonicalToView (PointF ptCanonical) |
| Timeline coordinates are converted to view coordinates. More...
|
|
PointF | mapViewToCanonical (PointF ptView) |
| View coordinates are converted to timeline coordinates. More...
|
|
PointF | mapNormalizedToView (PointF ptNormalized) |
| Normalized coordinates are converted to view coordinates. More...
|
|
PointF | mapViewToNormalized (PointF ptView) |
| View coordinates are converted to normalized coordinates. More...
|
|
void | repaintVideoFrame () |
| Repaint video frames in LiveWindow. More...
|
|
void | clearVideoFrame () |
| Clears video frames in LiveWindow. More...
|
|
Bitmap | takeScreenshot () |
| Screen capture. More...
|
|
void | setBackgroundColor (float r, float g, float b) |
| Sets the background color. More...
|
|
void | setBackgroundColor (float r, float g, float b, float a) |
|
Preview window control based on TextureView.
The difference between this preview window and NvsLiveWindow is that it is derived from TextureView instead of SurfaceView, and the PreviewView window is based on TextureView. It is smoother than SurfaceView when performing zoom and rotations. Warning: Individual phones may experience deadlock when drawing with TextureView, please refer to https://stackoverflow.com/questions/15771971/anr-textureview-on-galaxy-s2-gpu-driver-issue. and https://bugs.chromium.org/p/webrtc/issues/detail?id=5702 There is currently no effective solution, so we recommend users to use NvsLiveWindow based on SurfaceView, if users have to use NvsLiveWindowExt there will be a risk of encountering a deadlock problem!
- Warning
- In the NvsLiveWindowExt class, all public APIs are used in the UI thread! ! !
- Since
- 1.15.0
◆ NvsLiveWindowExt() [1/4]
com.meicam.sdk.NvsLiveWindowExt.NvsLiveWindowExt |
( |
Context |
context | ) |
|
|
inline |
◆ NvsLiveWindowExt() [2/4]
com.meicam.sdk.NvsLiveWindowExt.NvsLiveWindowExt |
( |
Context |
context, |
|
|
AttributeSet |
attrs |
|
) |
| |
|
inline |
◆ NvsLiveWindowExt() [3/4]
com.meicam.sdk.NvsLiveWindowExt.NvsLiveWindowExt |
( |
Context |
context, |
|
|
AttributeSet |
attrs, |
|
|
int |
defStyleAttr |
|
) |
| |
|
inline |
◆ NvsLiveWindowExt() [4/4]
com.meicam.sdk.NvsLiveWindowExt.NvsLiveWindowExt |
( |
Context |
context, |
|
|
AttributeSet |
attrs, |
|
|
int |
defStyleAttr, |
|
|
int |
defStyleRes |
|
) |
| |
|
inline |
◆ clearVideoFrame()
void com.meicam.sdk.NvsLiveWindowExt.clearVideoFrame |
( |
| ) |
|
|
inline |
Clears video frames in LiveWindow.
◆ getFillMode()
int com.meicam.sdk.NvsLiveWindowExt.getFillMode |
( |
| ) |
|
|
inline |
Gets the fill mode of LiveWindow.
- Returns
- Returns LiveWindow's Fill Mode
◆ getHDRDisplayMode()
int com.meicam.sdk.NvsLiveWindowExt.getHDRDisplayMode |
( |
| ) |
|
|
inline |
Gets the HDR display mode of LiveWindow.
- Returns
- Returns LiveWindow's HDR display mode
◆ mapCanonicalToView()
PointF com.meicam.sdk.NvsLiveWindowExt.mapCanonicalToView |
( |
PointF |
ptCanonical | ) |
|
|
inline |
Timeline coordinates are converted to view coordinates.
- Parameters
-
- Returns
- Returns the converted view point (PointF object) in view coordinates.
- Since
- 1.1.0
- See also
- mapViewToCanonical
◆ mapNormalizedToView()
PointF com.meicam.sdk.NvsLiveWindowExt.mapNormalizedToView |
( |
PointF |
ptNormalized | ) |
|
|
inline |
Normalized coordinates are converted to view coordinates.
- Parameters
-
ptNormalized | Point in normalized coordinates. |
- Returns
- Returns the converted point (object PointF) in view coordinates.
- Since
- 1.1.0
- See also
- mapViewToNormalized
◆ mapViewToCanonical()
PointF com.meicam.sdk.NvsLiveWindowExt.mapViewToCanonical |
( |
PointF |
ptView | ) |
|
|
inline |
View coordinates are converted to timeline coordinates.
- Parameters
-
- Returns
- Returns the converted point (PointF object) in timeline coordinates.
- Since
- 1.1.0
- See also
- mapCanonicalToView
◆ mapViewToNormalized()
PointF com.meicam.sdk.NvsLiveWindowExt.mapViewToNormalized |
( |
PointF |
ptView | ) |
|
|
inline |
View coordinates are converted to normalized coordinates.
- Parameters
-
ptView | Point in view coordinates. |
- Returns
- Returns the converted point (object PointF) in normalized coordinates.
- Since
- 1.1.0
- See also
- mapNormalizedToView
◆ repaintVideoFrame()
void com.meicam.sdk.NvsLiveWindowExt.repaintVideoFrame |
( |
| ) |
|
|
inline |
Repaint video frames in LiveWindow.
- Since
- 1.15.1
◆ setBackgroundColor() [1/2]
void com.meicam.sdk.NvsLiveWindowExt.setBackgroundColor |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b |
|
) |
| |
|
inline |
Sets the background color.
◆ setBackgroundColor() [2/2]
void com.meicam.sdk.NvsLiveWindowExt.setBackgroundColor |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a |
|
) |
| |
|
inline |
◆ setFillMode()
void com.meicam.sdk.NvsLiveWindowExt.setFillMode |
( |
int |
fillMode | ) |
|
|
inline |
Sets the fill mode of LiveWindow.
- Parameters
-
fillMode | Fill mode. Please refer to [Live Window Fill Mode] for details. (FILLMODE) |
◆ setHDRDisplayMode()
void com.meicam.sdk.NvsLiveWindowExt.setHDRDisplayMode |
( |
int |
hdrMode | ) |
|
|
inline |
Sets the HDR display mode of LiveWindow.
- Parameters
-
◆ takeScreenshot()
Bitmap com.meicam.sdk.NvsLiveWindowExt.takeScreenshot |
( |
| ) |
|
|
inline |
◆ FILLMODE_PRESERVEASPECTCROP
final int com.meicam.sdk.NvsLiveWindowExt.FILLMODE_PRESERVEASPECTCROP = 0 |
|
static |
The image must be evenly filled and further cropped when necessary (It is default mode).
◆ FILLMODE_PRESERVEASPECTFIT
final int com.meicam.sdk.NvsLiveWindowExt.FILLMODE_PRESERVEASPECTFIT = 1 |
|
static |
The image is evenly scaled to fit the window and no cropping is needed.
◆ FILLMODE_STRETCH
final int com.meicam.sdk.NvsLiveWindowExt.FILLMODE_STRETCH = 2 |
|
static |
◆ HDR_DISPLAY_MODE_DEPEND_DEVICE
final int com.meicam.sdk.NvsLiveWindowExt.HDR_DISPLAY_MODE_DEPEND_DEVICE = 1 |
|
static |
If the device supports HDR, use HDR display, and use NO HDR mode display if it is not supported.
◆ HDR_DISPLAY_MODE_SDR
final int com.meicam.sdk.NvsLiveWindowExt.HDR_DISPLAY_MODE_SDR = 0 |
|
static |
Forced to use SDR display, regardless of whether the device supports HDR display.
◆ HDR_DISPLAY_MODE_TONE_MAP_SDR
final int com.meicam.sdk.NvsLiveWindowExt.HDR_DISPLAY_MODE_TONE_MAP_SDR = 2 |
|
static |
If the device supports HDR, use HDR display, and use NO HDR mode display if it is not supported.
◆ m_fillMode
◆ m_hdrDisplayMode
◆ m_internalObject
long com.meicam.sdk.NvsLiveWindowExt.m_internalObject = 0 |
|
protected |
The documentation for this class was generated from the following file: