public class

ImgTexSrcPin

extends SrcPin<T>
java.lang.Object
   ↳ org.opencdnunion.media.streamer.framework.SrcPin<T>
     ↳ org.opencdnunion.media.streamer.capture.ImgTexSrcPin

Class Overview

Convert bitmap image to ImgTexFrame.

Summary

[Expand]
Inherited Fields
From class org.opencdnunion.media.streamer.framework.SrcPin
Public Constructors
ImgTexSrcPin(GLRender glRender)
Public Methods
boolean getUseSyncMode()
void release()
void repeatFrame()
Repeat to send current image frame with current system time as new pts.
void repeatFrame(long pts)
Repeat to send current image frame, do nothing if no frame uploaded yet.
void reset()
void setUseSyncMode(boolean syncMode)
void updateFrame(ByteBuffer buf, int stride, int width, int height)
void updateFrame(ByteBuffer buf, int stride, int width, int height, int rotate, long pts)
Update image frame with RGBA ByteBuffer.
void updateFrame(Bitmap img, int rotate, long pts, boolean recycle)
Update image with Bitmap.
void updateFrame(Bitmap img, boolean recycle)
void updateFrame(ByteBuffer buf, int stride, int width, int height, long pts)
void updateFrame(Bitmap img, long pts, boolean recycle)
void updateYUVFrame(ByteBuffer buf, int[] strides, int width, int height, int rotate, long pts)
Update image frame with YUV420P ByteBuffer.
[Expand]
Inherited Methods
From class org.opencdnunion.media.streamer.framework.SrcPin
From class java.lang.Object

Public Constructors

public ImgTexSrcPin (GLRender glRender)

Public Methods

public boolean getUseSyncMode ()

public void release ()

public void repeatFrame ()

Repeat to send current image frame with current system time as new pts. Do nothing if no frame uploaded yet.

public void repeatFrame (long pts)

Repeat to send current image frame, do nothing if no frame uploaded yet.

Parameters
pts new pts to set

public void reset ()

public void setUseSyncMode (boolean syncMode)

public void updateFrame (ByteBuffer buf, int stride, int width, int height)

public void updateFrame (ByteBuffer buf, int stride, int width, int height, int rotate, long pts)

Update image frame with RGBA ByteBuffer.

Parameters
buf image ByteBuffer with RGBA data
stride stride of current frame, in bytes
width width of frame
height height of frame
rotate rotate degrees, only 0, 90, 180, 270 valid
pts pts of current frame

public void updateFrame (Bitmap img, int rotate, long pts, boolean recycle)

Update image with Bitmap.

Parameters
img source image
rotate rotate degrees, only 0, 90, 180, 270 valid
pts pts of current image frame
recycle should be recycled

public void updateFrame (Bitmap img, boolean recycle)

public void updateFrame (ByteBuffer buf, int stride, int width, int height, long pts)

public void updateFrame (Bitmap img, long pts, boolean recycle)

public void updateYUVFrame (ByteBuffer buf, int[] strides, int width, int height, int rotate, long pts)

Update image frame with YUV420P ByteBuffer.

Parameters
buf image ByteBuffer with I420 data
strides strides of each planar
width width of frame
height height of frame
rotate rotate degrees, only 0, 90, 180, 270 valid
pts pts of current frame