public class VideoStreamOutput extends VideoOutput implements IVideoStreamOutput
METADATA_AU_HEADER_LEN, options
Constructor and Description |
---|
VideoStreamOutput(VideoOutputOptions options)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the stream.
|
OutputStatistics |
getStatistics()
Get output statistics.
|
boolean |
isOpen()
Check if the stream is open.
|
void |
open(String url)
Open a stream for writing.
|
void |
queueMetadataFrame(MetadataFrame metadataFrame)
Queue a
MetadataFrame for output. |
void |
queueVideoFrame(VideoFrame videoFrame)
Queue a
VideoFrame for output. |
public VideoStreamOutput(VideoOutputOptions options)
options
- Options for video outputpublic void open(String url) throws IOException
IVideoStreamOutput
The required syntax for the URL is udp://hostname:port
.
open
in interface IVideoStreamOutput
url
- The URL to openIOException
- if the stream could not be openedpublic boolean isOpen()
IVideoStreamOutput
isOpen
in interface IVideoStreamOutput
public void close()
IVideoStreamOutput
close
in interface AutoCloseable
close
in interface IVideoStreamOutput
public void queueVideoFrame(VideoFrame videoFrame)
IVideoStreamOutput
VideoFrame
for output.queueVideoFrame
in interface IVideoStreamOutput
videoFrame
- The video frame to sendpublic void queueMetadataFrame(MetadataFrame metadataFrame) throws IOException
IVideoStreamOutput
MetadataFrame
for output.
Note that metadata frames will be buffered internally based pts values. Queued metadata frames will be sent once a video frame with greater or equal pts has been sent.
queueMetadataFrame
in interface IVideoStreamOutput
metadataFrame
- The metadata frame to sendIOException
- if the stream could not be writtenpublic OutputStatistics getStatistics()
IVideoStreamOutput
getStatistics
in interface IVideoStreamOutput
Copyright © 2022 West Ridge Systems. All rights reserved.