public class WZMP4Writer extends Object implements WZSinkAPI.MediaCodecVideoSink, WZSinkAPI.MediaCodecAudioSink
Constructor and Description |
---|
WZMP4Writer() |
Modifier and Type | Method and Description |
---|---|
WZBroadcastConfig |
getBroadcastConfig()
Returns the configuration settings for an active broadcast session.
|
WZStatus |
getBroadcasterStatus()
Returns the status for a broadcast component
|
String |
getFilePath() |
WZStatus |
getStatus() |
boolean |
isAudioEnabled()
Indicates if a broadcast component is enabled or not
|
boolean |
isAudioPaused()
Indicates if a broadcast component is paused or not
|
boolean |
isVideoEnabled()
Indicates if a broadcast component is enabled or not
|
boolean |
isVideoPaused()
Indicates if a broadcast component is paused or not
|
void |
onAudioFormat(MediaFormat audioFormat) |
void |
onAudioSample(long timecodeMs,
ByteBuffer encodedData,
MediaCodec.BufferInfo bufferInfo) |
void |
onVideoFormat(MediaFormat videoFormat) |
void |
onVideoFrame(long timecode,
ByteBuffer encodedData,
MediaCodec.BufferInfo bufferInfo) |
WZStatus |
prepareForBroadcast(WZBroadcastConfig broadcastConfig)
This method is called to initialize each component of a broadcast.
|
void |
setAudioEnabled(boolean enabled)
Set or unset the flag indicating that a broadcast component is enabled
|
void |
setAudioPaused(boolean paused)
Set or unset the flag indicating that a broadcast component is in a paused state
|
void |
setFilePath(String filePath) |
void |
setVideoEnabled(boolean enabled)
Set or unset the flag indicating that a broadcast component is enabled
|
void |
setVideoPaused(boolean paused)
Set or unset the flag indicating that a broadcast component is in a paused state
|
WZStatus |
startBroadcasting()
This method is called on each broadcast component to begin a live streaming broadcast.
|
WZStatus |
stopBroadcasting()
This method is called on each broadcast component to end a live streaming broadcast.
|
public String getFilePath()
public void setFilePath(String filePath)
public WZStatus prepareForBroadcast(WZBroadcastConfig broadcastConfig)
WZBroadcastAPI.Broadcaster
WZState.READY
or WZState.IDLE
and indicate the error in the status as well.prepareForBroadcast
in interface WZBroadcastAPI.Broadcaster
broadcastConfig
- The broadcast configurationWZState.READY
public WZStatus startBroadcasting()
WZBroadcastAPI.Broadcaster
WZState.RUNNING
or WZState.IDLE
and indicate the error in the status as wellstartBroadcasting
in interface WZBroadcastAPI.Broadcaster
WZState.RUNNING
public WZStatus stopBroadcasting()
WZBroadcastAPI.Broadcaster
WZState.IDLE
stopBroadcasting
in interface WZBroadcastAPI.Broadcaster
WZState.IDLE
public WZBroadcastConfig getBroadcastConfig()
WZBroadcastAPI.Broadcaster
getBroadcastConfig
in interface WZBroadcastAPI.Broadcaster
public WZStatus getBroadcasterStatus()
WZBroadcastAPI.Broadcaster
getBroadcasterStatus
in interface WZBroadcastAPI.Broadcaster
public WZStatus getStatus()
getStatus
in interface WZBroadcastAPI.Broadcaster
public boolean isVideoEnabled()
WZSinkAPI.VideoSink
isVideoEnabled
in interface WZSinkAPI.VideoSink
public void setVideoEnabled(boolean enabled)
WZSinkAPI.VideoSink
setVideoEnabled
in interface WZSinkAPI.VideoSink
public boolean isVideoPaused()
WZSinkAPI.VideoSink
isVideoPaused
in interface WZSinkAPI.VideoSink
public void setVideoPaused(boolean paused)
WZSinkAPI.VideoSink
setVideoPaused
in interface WZSinkAPI.VideoSink
public void onVideoFormat(MediaFormat videoFormat)
onVideoFormat
in interface WZSinkAPI.MediaCodecVideoSink
public void onVideoFrame(long timecode, ByteBuffer encodedData, MediaCodec.BufferInfo bufferInfo)
onVideoFrame
in interface WZSinkAPI.MediaCodecVideoSink
public boolean isAudioEnabled()
WZSinkAPI.AudioSink
isAudioEnabled
in interface WZSinkAPI.AudioSink
public void setAudioEnabled(boolean enabled)
WZSinkAPI.AudioSink
setAudioEnabled
in interface WZSinkAPI.AudioSink
public boolean isAudioPaused()
WZSinkAPI.AudioSink
isAudioPaused
in interface WZSinkAPI.AudioSink
public void setAudioPaused(boolean paused)
WZSinkAPI.AudioSink
setAudioPaused
in interface WZSinkAPI.AudioSink
public void onAudioFormat(MediaFormat audioFormat)
onAudioFormat
in interface WZSinkAPI.MediaCodecAudioSink
public void onAudioSample(long timecodeMs, ByteBuffer encodedData, MediaCodec.BufferInfo bufferInfo)
onAudioSample
in interface WZSinkAPI.MediaCodecAudioSink
© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal