public class WOWZGLBroadcaster extends WOWZH264Broadcaster
WOWZCameraView
.Constructor and Description |
---|
WOWZGLBroadcaster()
Creates and initializes an instance.
|
WOWZGLBroadcaster(EGLContext eglContext)
Creates and initializes an instance specifying a shared
EGLContext to use when creating OpenGL ES resources on the video encoder's thread. |
WOWZGLBroadcaster(EGLContext eglContext,
EGLSurface eglSurface) |
Modifier and Type | Method and Description |
---|---|
EGLSurface |
generateEglSuface(Surface sourceSurface)
Wraps a
Surface instance with an EGLSurface . |
EGLContext |
getEglContext() |
EGLSurface |
getEglSurface() |
WOWZRenderAPI.VideoFrameRenderer |
getVideoFrameRenderer() |
void |
onFrameAvailable()
Notifies the broadcaster that a new frame is available for capture.
|
void |
onFrameAvailable(long frameTimestampNs)
Notifies the broadcaster that a new frame is available for capture with the specified timestamp.
|
void |
setEglContext(EGLContext eglContext) |
void |
setEglSurface(EGLSurface eglSurface)
Sets an
EGLSurface instance to use for direct copy operations that have been created on the
EGLContext supplied in the constructor for this instance or in a call to setEglContext(EGLContext) . |
void |
setFrameRotation(int frameRotation)
Notifies the broadcaster of a change in the video source's orientation during a broadcast.
|
void |
setFrameSize(int frameWidth,
int frameHeight)
Notifies the broadcaster of a change in the video source's frame size during a broadcast, such as when
a device rotates from portrait to landscape orientation.
|
void |
setVideoFrameRenderer(WOWZRenderAPI.VideoFrameRenderer videoFrameRenderer)
Specifies an instance implementing the
WOWZRenderAPI.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, stopBroadcasting
changeAdaptiveBitrate, changeAdaptiveFramerate, encodeInputSurfaceContents, flushEncoder, getAdaptiveBitrate, getAdaptiveFramerate, getEglEnv, getEncoderConfig, getEncoderInputSurface, getMediaCodecName, getMediaFormatDescription, hasFrameRateIntervalElapsed, onEncodeInputSurfaceContents, onFrameSubmittedToEncoder, onFrameSubmittedToEncoder, run, runOnEncoderThread, setSharedContext
public WOWZGLBroadcaster(EGLContext eglContext, EGLSurface eglSurface)
public WOWZGLBroadcaster(EGLContext eglContext)
EGLContext
to use when creating OpenGL ES resources on the video encoder's thread.eglContext
- A shared EGLContext
to use when creating OpenGL ES resources on the video encoder's thread.public WOWZGLBroadcaster()
public WOWZRenderAPI.VideoFrameRenderer getVideoFrameRenderer()
WOWZRenderAPI.VideoFrameRenderer
last specified in a call to setVideoFrameRenderer(WOWZRenderAPI.VideoFrameRenderer)
.public void setVideoFrameRenderer(WOWZRenderAPI.VideoFrameRenderer videoFrameRenderer)
WOWZRenderAPI.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 WOWZRenderAPI.VideoFrameRenderer
interface.public EGLContext getEglContext()
EGLContext
supplied in the constructor for this instance or in a call to setEglContext(EGLContext)
.public void setEglContext(EGLContext eglContext)
eglContext
- The shared EGLContext
to use when creating OpenGL ES resources on the video encoder's thread.public 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 have been created on the
EGLContext
supplied in the constructor for this instance or in a call to setEglContext(EGLContext)
.eglSurface
- A source EGLSurface
instance.public EGLSurface generateEglSuface(Surface sourceSurface)
Surface
instance with an EGLSurface
.
An EGLContext
must have been supplied in the constructor for this
instance or in a call to setEglContext(EGLContext)
.sourceSurface
- The Surface
instance to wrap.EGLSurface
attached to the EGLContext
specified to the broadcaster.public void onFrameAvailable(long frameTimestampNs)
WOWZRenderAPI.VideoFrameRenderer
instance supplied in the last call
to setVideoFrameRenderer(WOWZRenderAPI.VideoFrameRenderer)
to render the frame's content onto the video encoder's
input surface.frameTimestampNs
- The timestamp to use when encoding this frame, in nanoseconds.public void onFrameAvailable()
WOWZRenderAPI.VideoFrameRenderer
instance supplied in the last call
to setVideoFrameRenderer(WOWZRenderAPI.VideoFrameRenderer)
to render the frame's content onto the video encoder's
input surface.public void setFrameSize(int frameWidth, int frameHeight)
frameWidth
- The new frame width.frameHeight
- The new frame height.public void setFrameRotation(int frameRotation)
frameRotation
- The new video source rotation, from 0 degrees to 360 degrees.© 2016 - 2018 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal