public class WZGLBroadcaster extends WZH264Broadcaster
WZCameraView| Constructor and Description |
|---|
WZGLBroadcaster()
Construct a new instance
|
WZGLBroadcaster(EGLContext eglContext)
Construct a new instance specifying a shared
EGLContext to use when creating OpenGL ES resources on the video encoder's thread |
WZGLBroadcaster(EGLContext eglContext,
EGLSurface eglSurface) |
| Modifier and Type | Method and Description |
|---|---|
EGLSurface |
generateEglSuface(Surface sourceSurface)
Utility function to wrap a
Surface instance with an EGLSurface. |
EGLContext |
getEglContext() |
EGLSurface |
getEglSurface() |
WZRenderAPI.VideoFrameRenderer |
getVideoFrameRenderer() |
void |
onFrameAvailable()
Call to notify the broadcaster that a new frame is available for capture.
|
void |
onFrameAvailable(long frameTimestampNs)
Call to notify the broadcaster that a new frame is available for capture with the specified timestamp.
|
void |
setEglContext(EGLContext eglContext) |
void |
setEglSurface(EGLSurface eglSurface)
Set a
EGLSurface instance to use for direct copy operations that has been created on the
EGLContext supplied in the constructor for this instance or in a call to setEglContext(EGLContext) |
void |
setFrameRotation(int frameRotation)
Call to notify the broadcaster of a change in the video source's orientation during a broadcast.
|
void |
setFrameSize(int frameWidth,
int frameHeight)
Call to notify the broadcaster of a change in the video source's frame size during a broadcast such as when
a device's orientation changes (e.g from portrait to landscape)
|
void |
setVideoFrameRenderer(WZRenderAPI.VideoFrameRenderer videoFrameRenderer)
Specify an instance implementing the
WZRenderAPI.VideoFrameRenderer interface to call when a frame is available
that will render the frame content to this broadcaster's encoder's input surface. |
getBroadcastConfig, getBroadcasterStatus, getStatus, getVideoSourceConfig, isVideoEnabled, isVideoPaused, prepareForBroadcast, setVideoEnabled, setVideoPaused, startBroadcasting, stopBroadcastingchangeAdaptiveBitrate, changeAdaptiveFramerate, encodeInputSurfaceContents, flushEncoder, getAdaptiveBitrate, getAdaptiveFramerate, getEglEnv, getEncoderConfig, getEncoderInputSurface, getMediaCodecName, getMediaFormatDescription, hasFrameRateIntervalElapsed, onEncodeInputSurfaceContents, onFrameSubmittedToEncoder, onFrameSubmittedToEncoder, run, runOnEncoderThread, setSharedContextpublic WZGLBroadcaster(EGLContext eglContext,
EGLSurface eglSurface)
public WZGLBroadcaster(EGLContext eglContext)
EGLContext to use when creating OpenGL ES resources on the video encoder's threadeglContext - a shared EGLContext to use when creating OpenGL ES resources on the video encoder's threadpublic WZGLBroadcaster()
public WZRenderAPI.VideoFrameRenderer getVideoFrameRenderer()
WZRenderAPI.VideoFrameRenderer last specified in a call to setVideoFrameRenderer(WZRenderAPI.VideoFrameRenderer)public void setVideoFrameRenderer(WZRenderAPI.VideoFrameRenderer videoFrameRenderer)
WZRenderAPI.VideoFrameRenderer interface to call when a frame is available
that will render the frame content to this broadcaster's encoder's input surface.videoFrameRenderer - an instance implementing the WZRenderAPI.VideoFrameRenderer interfacepublic EGLContext getEglContext()
EGLContext supplied in the constructor for this instance or in a call to setEglContext(EGLContext)public void setEglContext(EGLContext eglContext)
eglContext - Specify a shared EGLContext to use when creating OpenGL ES resources on the video encoder's threadpublic EGLSurface getEglSurface()
EGLSurface specified in the last call to setEglSurface(EGLSurface)public void setEglSurface(EGLSurface eglSurface)
EGLSurface instance to use for direct copy operations that has been created on the
EGLContext supplied in the constructor for this instance or in a call to setEglContext(EGLContext)eglSurface - a source EGLSurface instancepublic EGLSurface generateEglSuface(Surface sourceSurface)
Surface instance with an EGLSurface.
Note that an EGLContext must have been supplied in the constructor for this
instance or in a call to setEglContext(EGLContext)sourceSurface - the Surface instance to wrapEGLSurface attached to the EGLContext specified to the broadcasterpublic void onFrameAvailable(long frameTimestampNs)
WZRenderAPI.VideoFrameRenderer instance supplied in the last call
to setVideoFrameRenderer(WZRenderAPI.VideoFrameRenderer) to render the frame's content onto the video encoder's
input surfaceframeTimestampNs - the timestamp to use when encoding this frame, in nanosecondspublic void onFrameAvailable()
WZRenderAPI.VideoFrameRenderer instance supplied in the last call
to setVideoFrameRenderer(WZRenderAPI.VideoFrameRenderer) to render the frame's content onto the video encoder's
input surfacepublic void setFrameSize(int frameWidth,
int frameHeight)
frameWidth - the new video frame widthframeHeight - the new video frame heightpublic void setFrameRotation(int frameRotation)
frameRotation - the new video source rotation (0-360)© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal