public class

WaterMarkCapture

extends Object
java.lang.Object
   ↳ org.opencdnunion.media.streamer.capture.WaterMarkCapture

Class Overview

Watermark capture module.

Summary

Fields
public ImgBufSrcPin mLogoBufSrcPin
public ImgTexSrcPin mLogoTexSrcPin
public ImgBufSrcPin mTimeBufSrcPin
public ImgTexSrcPin mTimeTexSrcPin
Public Constructors
WaterMarkCapture(GLRender glRender)
Public Methods
ImgBufSrcPin getLogoBufSrcPin()
ImgTexSrcPin getLogoTexSrcPin()
ImgBufSrcPin getTimeBufSrcPin()
ImgTexSrcPin getTimeTexSrcPin()
void hideLogo()
Clear logo image.
void hideTime()
Clear time image.
void release()
void setPreviewSize(int w, int h)
Set the actual size of preview view, ie, the size of GLSurfaceView or TextureView set to preview camera data.
void setTargetSize(int w, int h)
Set the target streaming resolution.
void showLogo(Bitmap bitmap, float fw, float fh)
Transfer logo image frame to the connected module.
void showLogo(Context context, String uri, float fw, float fh)
Decode logo image and transfer image frame to the connected module.
void showTime(int color, String dateFormat, float fw, float fh)
Start to generate time watermark every seconds, and transfer image to the connected module.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public ImgBufSrcPin mLogoBufSrcPin

public ImgTexSrcPin mLogoTexSrcPin

public ImgBufSrcPin mTimeBufSrcPin

public ImgTexSrcPin mTimeTexSrcPin

Public Constructors

public WaterMarkCapture (GLRender glRender)

Public Methods

public ImgBufSrcPin getLogoBufSrcPin ()

public ImgTexSrcPin getLogoTexSrcPin ()

public ImgBufSrcPin getTimeBufSrcPin ()

public ImgTexSrcPin getTimeTexSrcPin ()

public void hideLogo ()

Clear logo image.

public void hideTime ()

Clear time image.

public void release ()

public void setPreviewSize (int w, int h)

Set the actual size of preview view, ie, the size of GLSurfaceView or TextureView set to preview camera data.

Parameters
w width
h height

public void setTargetSize (int w, int h)

Set the target streaming resolution.

Parameters
w width
h height

public void showLogo (Bitmap bitmap, float fw, float fh)

Transfer logo image frame to the connected module.

Parameters
bitmap logo to show, must not be recycled by caller
fw relative width, should between 0~1, if set 0, width would be calculated by fh and image radio
fh relative height, should between 0~1, if set 0, height would be calculated by fw and image radio

public void showLogo (Context context, String uri, float fw, float fh)

Decode logo image and transfer image frame to the connected module.

Parameters
context app context
uri logo uri, support file:// and assets://
fw relative width, should between 0~1, if set 0, width would be calculated by fh and image radio
fh relative height, should between 0~1, if set 0, height would be calculated by fw and image radio

public void showTime (int color, String dateFormat, float fw, float fh)

Start to generate time watermark every seconds, and transfer image to the connected module.

Parameters
color color in ARGB
dateFormat time format to show, default "yyyy-MM-dd HH:mm:ss"
fw relative width, should between 0~1, if set 0, width would be calculated by fh and image radio
fh relative height, should between 0~1, if set 0, height would be calculated by fw and image radio